Method for accessing baseboard management controller by using script

By executing scripts containing instructions to be executed and excerpted in the substrate management controller, the instruction execution process is optimized, and the Redfish API information acquisition speed and cumbersome commands are solved, and more efficient information acquisition and data processing are achieved.

CN119025175APending Publication Date: 2024-11-26JABIL CIRCUIT (SINGAPORE) PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310601854.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the server, when the Redfish API is used to read data from the substrate management controller, the information acquisition speed is slow and the command is cumbersome. Users need to judge the command interval time by themselves, which can easily lead to timeout or inefficiency.

Method used

By executing scripts in the substrate management controller, including instructions to be executed, run time, excerpt instructions and storage instructions, the instruction execution process is optimized, information acquisition efficiency is improved, and data readability is enhanced through excerpts.

Benefits of technology

Accelerate the efficiency of information acquisition, reduce the user's trial and error costs, improve the value and readability of data, automatically judge the successful restart of the computer system, and avoid overtime problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025175A_ABST
    Figure CN119025175A_ABST
Patent Text Reader

Abstract

A method for accessing a baseboard management controller by using a script is implemented by the baseboard management controller included in a computer system, and comprises the following steps: (A) after the baseboard management controller receives the script from a control end and related to accessing the baseboard management controller, the baseboard management controller executes the script, the script comprises a plurality of instructions to be executed, a plurality of running times, an extraction instruction and a series of storage instructions; (B) the baseboard management controller generates an execution result in response to execution of the script; (C) the baseboard management controller responds to execution of the script and extracts the execution result according to the extraction mode to obtain an extraction result; and (D) in response to the execution of the script, the baseboard management controller stores the execution result and the extraction result according to the storage mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data access method, and in particular to a method for accessing a baseboard management controller by using a script. Background Art

[0002] In the server, Redfish is a REST API for platform management, which combines the current common Web technologies, such as RESTful API, JSON format, etc. The control end issues redfish commands to the board management controller (BMC) in the server through the network cable or the Redfish host interface to read the data related to inventory. Since the datagram contains many components, such as BIOS information, BMC information, CPU information, memory module information, PCIe adapter card information, and storage device information, the baseboard management controller processes the collection of this information and generates a JSON format file, which is then stored in the internal Redfish database, and finally transmitted back to the control end through the redfish API.

[0003] The entire information acquisition process is very slow and the commands are cumbersome. The user needs to issue commands separately and wait for the resources to be generated before reading them back separately. In addition, the interval between multiple commands needs to be judged by the user. If the user makes a wrong judgment due to lack of experience, it is easy to cause a timeout and fail to correctly obtain the desired information. If the interval is set too long, the efficiency of the information acquisition process will be too low. Summary of the invention

[0004] The purpose of the present invention is to provide a method for using scripts to define the best instruction execution method, so that the instructions of the baseboard management controller can execute one or more instructions in a series of optimization steps to accelerate information acquisition efficiency and reduce the user's trial and error cost.

[0005] The method of using a script to access a baseboard management controller of the present invention is implemented by a baseboard management controller included in a computer system, and the method of using a script to access a baseboard management controller includes the following steps: (A) after the baseboard management controller receives a script related to accessing the baseboard management controller from a control end, the baseboard management controller executes the script, the script including a plurality of instructions to be executed, a plurality of running times corresponding to the instructions to be executed, a note instruction for note-taking an execution result related to the instructions to be executed according to a note-taking method, and a series of storage instructions for storing the execution result and the note result related to the note instruction according to a storage method; (B) the baseboard management controller generates the execution result in response to the execution of the script; (C) the baseboard management controller notes the execution result in response to the execution of the script according to the note-taking method to obtain the note result; and (D) the baseboard management controller stores the execution result and the note result in response to the execution of the script according to the storage method.

[0006] The present invention uses a method for accessing a baseboard management controller using a script. In step (A), the script is one of a series of Redfish commands, firmware update, software information detection, hardware information detection, and system status detection.

[0007] The present invention utilizes a method for accessing a baseboard management controller using a script, wherein step (A) includes the following steps: (A-1) after the baseboard management controller receives the script, the baseboard management controller sets the execution status of the script to waiting for execution, and transmits a uniform resource identifier for obtaining the execution status of the script to the control end; (A-2) the baseboard management controller determines whether a start-up execution instruction related to starting to execute the script is received from the control end; and (A-3) when the baseboard management controller determines that the start-up execution instruction is received, the baseboard management controller executes the script and updates the execution status of the script to executing.

[0008] The present invention uses a method for accessing a baseboard management controller using a script. In step (D), the baseboard management controller responds to the execution of the script and also updates the execution status of the script to execution completion.

[0009] The method of using scripts to access a baseboard management controller of the present invention further includes, after step (D), a step (H), wherein the baseboard management controller responds to the execution of the script and transmits a uniform resource identifier for obtaining the execution result and summary result of the script to the control terminal.

[0010] The present invention uses a method for accessing a baseboard management controller using a script. In step (A), the storage method includes a storage location and a storage format related to the execution result and the summary result.

[0011] The present invention uses a method for accessing a baseboard management controller using a script. In step (A), the note-taking method includes a plurality of regular expressions.

[0012] The present invention utilizes a script to access a baseboard management controller. In step (A), the regular expression includes at least one of a regular expression for capturing a return result corresponding to at least one specific parameter in the execution result, and a regular expression for capturing a message indicating at least one of a warning, an error, and a failure in the execution result.

[0013] The beneficial effect of the present invention is that the script related to accessing the baseboard management controller and including the to-be-executed instructions, the running time, the note instructions, and the series of storage instructions is executed by the baseboard management controller to generate and store the execution results and the note results, thereby allowing the baseboard management controller instructions to execute one or more instructions in a series of optimization steps to accelerate information acquisition efficiency and reduce the user's trial and error cost. In addition, summarizing the execution results in the note method can increase the value and readability of the data. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a block diagram illustrating a computer system implementing an embodiment of the method of accessing a baseboard management controller using a script according to the present invention;

[0015] Figure 2 is a block diagram illustrating another computer system and a control terminal connected to the other computer system via a communication network in accordance with an embodiment of the method for accessing a baseboard management controller using a script according to the present invention;

[0016] Figure 3 is a flow chart illustrating an embodiment of a method for accessing a baseboard management controller using a script according to the present invention; and

[0017] Figure 4 The invention is a flow chart illustrating how a baseboard management controller determines whether to start executing a script. DETAILED DESCRIPTION

[0018] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0019] See also Figure 1The embodiment of the method of accessing a baseboard management controller using a script of the present invention is implemented by a computer system 1. The computer system 1 includes a host end 11 installed with a providing software for providing multiple playbooks and serving as a control end, and a baseboard management controller 12 electrically connected to the host end 11. The scripts can be written in the form of JSON or YAML, and include scripts related to a series of Redfish commands, a firmware update script, a software information detection script, a hardware information detection script, and a system status detection script. The script is written in a declarative language such as YAML. They usually include a series of tasks executed in a specific order, which are used to perform tasks such as deploying software, configuring servers and managing network devices. The script is used for automated tasks across multiple servers and other information technology infrastructures, and provides better idempotence, so that it will not cause unexpected side effects after running multiple times. This method of commanding the baseboard management controller 12 through the host end 11 to perform write, read, command and other actions is in-band management. It is worth mentioning that, in other embodiments, the method of using scripts to access the baseboard management controller of the present invention can also be implemented by a computer system 1 and the control terminal 2 connected to the computer system 1 via a communication network (see Figure 2 ), at this time, the provided software is installed on the control terminal 2, and the host terminal 11 of the computer system 1 does not install the provided software. This method of issuing commands to the baseboard management controller 12 in the computer system 1 through the remote control terminal 2 to perform write, read, command and other actions is called Out-Of-Band management.

[0020] See also Figure 1 and Figure 3 , an embodiment of the method of using scripts to access a baseboard management controller of the present invention includes the following steps.

[0021] In step 31, after the baseboard management controller 12 receives a script from a control end and related to accessing the baseboard management controller 12, the baseboard management controller 12 executes the script, which includes multiple instructions to be executed, multiple running times corresponding to the waiting execution instructions, a note instruction for summarizing an execution result related to the waiting execution instruction according to a note method, and a series of storage instructions for storing the execution result and a note result related to the note instruction according to a storage method.

[0022] It is worth mentioning that step 31 includes the following sub-steps (see Figure 4 ).

[0023] In sub-step 311, after the baseboard management controller 12 receives the script, the baseboard management controller 12 sets the execution status of the script to wait for execution, and transmits a Uniform Resource Locator (URL) for obtaining the execution status of the script to the control end.

[0024] In sub-step 312, the baseboard management controller 12 determines whether a startup execution instruction related to starting to execute the script is received from the control end. When the baseboard management controller 12 determines that the startup execution instruction is received, the process proceeds to sub-step 313; when the baseboard management controller 12 determines that the startup execution instruction is not received, it returns to sub-step 312.

[0025] In sub-step 313 , the baseboard management controller 12 executes the script and updates the execution status of the script to being executed.

[0026] In step 32 , the baseboard management controller 12 generates the execution result in response to the execution of the script.

[0027] In step 33, the baseboard management controller 12 summarizes the execution result according to the summary method in response to the execution of the script to obtain the summary result. The summary method includes a plurality of regular expressions, and the regular expressions include at least one of a regular expression for capturing a return result corresponding to at least one specific parameter in the execution result, and a regular expression for capturing a message of at least one of a warning, an error, and a failure in the execution result. The at least one specific parameter may be, for example, an identifier of a specific hardware device, a name of a specific hardware device, and a location of a specific hardware device, but is not limited thereto. For example, the identifier of the specific hardware device is an identifier of a network card, the name of the specific hardware device is a name of the network card, and the location of the specific hardware device is a location of the network card, then the regular expression corresponding to the return result of the at least one specific parameter can summarize the identifier of the network card such as 001, the name of the network card such as Intel I210, and the location of the network card such as Slot 1.

[0028] In step 34, the baseboard management controller 12 stores the execution result and the summary result according to the storage method in response to the execution of the script, and updates the execution status of the script to execution completion. The storage method includes a storage location and a storage format related to the execution result and the summary result. For example, the storage location defines the location where the execution result and the summary result are stored in a specified file or table, and the storage format defines the file format for storing the execution result and the summary result.

[0029] In step 35, the baseboard management controller 12 transmits another uniform resource identifier for obtaining the execution result and the summary result of the script to the control end in response to the execution of the script.

[0030] In summary, the method of accessing the baseboard management controller 12 of the present invention generates and stores the execution result and the summary result by executing the script related to accessing the baseboard management controller 12 and including the waiting execution instruction, the running time, the note instruction, and the series of storage instructions through the baseboard management controller 12, so as to allow the instructions of the baseboard management controller 12 to execute one or more instructions in a series of optimization steps to accelerate the efficiency of information acquisition and reduce the trial and error cost of the user. In addition, the execution result is summarized by the note method, which can increase the value and readability of the data. Furthermore, when the executed script is related to the firmware update, the computer system 1 needs to be restarted. At this time, the script is executed by the baseboard management controller 12, and the baseboard management controller 12 can automatically determine whether the computer system 1 is successfully restarted, thereby replacing the prior art that requires the user to first set a timer to determine whether the computer system 1 is successfully restarted, and then issue a command to read whether the firmware version is updated. When the counting time of the timer is not set well, a timeout may occur and it may not be possible to correctly determine whether the firmware version is updated. Therefore, through the method of accessing the baseboard management controller 12 of the present invention, the automatic execution of the uncontrollable restart judgment can be replaced by the baseboard management controller 12, thereby becoming a controllable step, so the purpose of the present invention can be achieved.

[0031] The above are merely embodiments of the present invention and should not be used to limit the scope of the present invention. That is, any simple equivalent changes and modifications made according to the claims and description of the present invention still fall within the scope of the present invention.

Claims

1. A method for accessing a baseboard management controller using a script, implemented by a baseboard management controller included in a computer system, It is characterized in that The method of accessing a baseboard management controller using a script comprises the following steps: (A) after the baseboard management controller receives a script related to accessing the baseboard management controller from the control end, the baseboard management controller executes the script, wherein the script includes a plurality of instructions to be executed, a plurality of running times corresponding to the instructions to be executed, a note instruction for note-taking the execution results related to the instructions to be executed according to a note-taking method, and a series of storage instructions for storing the execution results and the note results related to the note instruction according to a storage method; (B) the baseboard management controller generates the execution result in response to the execution of the script; (C) the baseboard management controller summarizes the execution result according to the summary method in response to the execution of the script to obtain the summary result; and (D) The baseboard management controller stores the execution result and the summary result according to the storage method in response to the execution of the script.

2. The method for accessing a baseboard management controller using a script according to claim 1, It is characterized in that In step (A), the script is one of a series of Redfish commands, firmware update, software information detection, hardware information detection and system status detection.

3. The method for accessing a baseboard management controller using a script according to claim 1, It is characterized in that Step (A) comprises the following steps: (A-1) After the baseboard management controller receives the script, the baseboard management controller sets the execution status of the script to wait for execution, and transmits a uniform resource identifier for obtaining the execution status of the script to the control end; (A-2) the baseboard management controller determines whether a start-up execution instruction related to starting to execute the script is received from the control end; and (A-3) When the baseboard management controller determines that the start execution instruction is received, the baseboard management controller executes the script and updates the execution status of the script to being executed.

4. The method for accessing a baseboard management controller using a script according to claim 3, It is characterized in that In step (D), in response to the execution of the script, the baseboard management controller also updates the execution status of the script to execution completion.

5. The method for accessing a baseboard management controller using a script according to claim 1, It is characterized in that After step (D), the method further includes step (H), wherein the baseboard management controller transmits a uniform resource identifier for obtaining the execution result and summary result of the script to the control end in response to the execution of the script.

6. The method for accessing a baseboard management controller using a script according to claim 1, It is characterized in that In step (A), the storage method includes a storage location and a storage format related to the execution result and the summary result.

7. The method for accessing a baseboard management controller using a script according to claim 1, It is characterized in that In step (A), the summary method includes a plurality of regular expressions.

8. The method for accessing a baseboard management controller using a script according to claim 7, It is characterized in that In step (A), the regular expression includes at least one of a regular expression for capturing a return result corresponding to at least one specific parameter in the execution result and a regular expression for capturing a message of at least one of a warning, an error and a failure in the execution result.