CN113515397B - IPMI command processing method, server, and non-transitory computer readable storage medium - Google Patents
IPMI command processing method, server, and non-transitory computer readable storage medium Download PDFInfo
- Publication number
- CN113515397B CN113515397B CN202110826898.8A CN202110826898A CN113515397B CN 113515397 B CN113515397 B CN 113515397B CN 202110826898 A CN202110826898 A CN 202110826898A CN 113515397 B CN113515397 B CN 113515397B
- Authority
- CN
- China
- Prior art keywords
- processing module
- message processing
- ipmi
- command
- active message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 title claims abstract description 130
- 238000003672 processing method Methods 0.000 title claims abstract description 35
- 238000012545 processing Methods 0.000 claims abstract description 205
- 238000000034 method Methods 0.000 claims abstract description 30
- 230000008569 process Effects 0.000 claims abstract description 22
- 230000004044 response Effects 0.000 claims abstract description 15
- 230000002159 abnormal effect Effects 0.000 claims abstract description 12
- 230000008439 repair process Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 10
- 238000004891 communication Methods 0.000 claims description 8
- 230000005856 abnormality Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Abstract
The application discloses an IPMI command processing method, a server and a non-transitory computer readable storage medium. The IPMI command processing method comprises the following steps: the main process of the mainboard management controller starts an active message processing module and a standby message processing module; the active message processing module receives and executes corresponding processing and response according to the IPMI request command; the standby message processing module continuously detects the state of the active message processing module; when the standby message processing module detects that the active message processing module is abnormal, the standby message processing module automatically replaces the active message processing module to execute work, and resets and restores the active message processing module; and when the standby message processing module detects that the active message processing module is repaired, entering a sleep mode, and operating the active message processing module again. Therefore, the problem that the subsequent IPMI request command cannot be processed due to the abnormality of the active message processing module can be avoided.
Description
Technical Field
The present application relates to the field of server technologies, and in particular, to a method for processing commands through an intelligent platform management interface (INTELLIGENT PLATFORM MANAGEMENT INTERFACE, IPMI), a server, and a non-transitory computer readable storage medium.
Background
The server's motherboard management controller (Baseboard Management Controller, BMC) needs to handle IPMI request commands sent by the external interfaces of the server (e.g., system interface (SYSTEM INTERFACE) for IPMI communication with the BMC, intelligent platform management bus interface (i.e., IPMI communication interface based on I 2 C) for IPMI communication with the BMC, and network interface (LAN INTERFACE) for IPMI communication with the BMC). All the IPMI request commands sent by the external interfaces are sequentially processed by the message processing module (MESSAGE HANDLER) started by the BMC. If the message processing module is abnormal according to the processing program called by the IPMI request command, the subsequent IPMI request command cannot be processed and responded, and finally the problem that the external IPMI command interface (namely the external interface) of the BMC is completely invalid is caused.
In summary, how to provide an IPMI command processing method, so that when an abnormality occurs in the message processing module started by the BMC due to processing of the IPMI request command, the IPMI request command sent by the subsequent external interface can still be processed and responded, which is a problem to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the application provides an IPMI command processing method, a server and a non-transitory computer readable storage medium, which solve the problem that a message processing module started by a BMC cannot obtain processing of a subsequent IPMI request command due to exception of processing the IPMI request command, and finally leads to complete failure of an external IPMI command interface of the BMC.
In order to solve the technical problems, the application is realized as follows:
In a first aspect, an embodiment of the present application provides an IPMI command processing method, including the following steps: the master process of the BMC starts an active message processing module and a standby message processing module; the active message processing module receives and executes corresponding processing and response according to the IPMI request command in the IPMI command queue (IPMI Command Queue) after starting; the standby message processing module continuously detects the state of the active message processing module after being started; when the standby message processing module detects that the active message processing module is in an abnormal state, the standby message processing module automatically replaces the active message processing module to execute work, and resets the repair active message processing module, and continuously detects whether the repair of the active message processing module is completed; and when the standby message processing module detects that the active message processing module is repaired, the standby message processing module enters a sleep mode, and the active message processing module operates again.
In a second aspect, an embodiment of the present application provides a server, including: one or more processors and memory. The memory is used for storing one or more computer programs, which when executed by one or more processors, cause the one or more processors to implement the IPMI command processing method according to the embodiments of the present application.
In a third aspect, an embodiment of the present application provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements an IPMI command processing method as provided by an embodiment of the present application.
In the embodiment of the application, the design of the two message processing modules (namely the active message processing module and the standby message processing module) is started through the main process of the BMC, so that when the active message processing module is abnormal due to the processing of the IPMI request command, the standby message processing module immediately replaces the active message processing module to execute work, and the subsequent IPMI request command can be processed without interval. In addition, the standby message processing module can repair the active message processing module, and the IPMI request command processing authority is returned to the active message processing module after the active message processing module is repaired.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flowchart illustrating an exemplary IPMI command processing method according to the present application;
FIG. 2 is a schematic diagram of a server according to an embodiment of the application; and
FIG. 3 is a schematic diagram of a non-transitory computer readable storage medium according to an embodiment of the application.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings. In the drawings, like reference numerals designate identical or similar components or process flows.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification, are taken to specify the presence of stated features, values, method steps, operation processes, components, and/or groups of components, but do not preclude the addition of further features, values, method steps, operation processes, components, and groups of components, or groups of any of the above.
It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Conversely, when an element is described as being "directly connected" or "directly coupled" to another element, there are no intervening elements present.
Please refer to fig. 1, which is a flowchart illustrating an exemplary IPMI command processing method according to the present application. In this embodiment, the IPMI command processing method may be applied to a BMC of a server, as shown in fig. 1, and the IPMI command processing method includes the following steps: the master process of the BMC starts an active message processing module and a standby message processing module (step 11); the active message processing module receives and executes corresponding processing and response according to the IPMI request command in the IPMI command queue after starting (step 12); the standby message processing module continuously detects the state of the active message processing module after starting (step 13); when the standby message processing module detects that the active message processing module is in an abnormal state, the standby message processing module automatically replaces the active message processing module to execute work, and resets the repair active message processing module, and continuously detects whether the repair of the active message processing module is completed (step 14); and when the standby message processing module detects that the active message processing module is repaired, the standby message processing module enters a sleep mode, and the active message processing module operates again (step 15).
More specifically, under normal conditions, the active message processing module sequentially processes and responds to the IPMI request command in the IPMI command queue after being started, and the standby message processing module does not receive the IPMI request command in the IPMI command queue after being started, and only continuously detects the state of the active message processing module; when the active message processing module cannot normally work due to the exception of the IPMI request command, the standby message processing module enters an operation mode and immediately replaces the active message processing module to execute work (namely, continuously receives and executes corresponding processing and response according to the IPMI request command in the IPMI command queue), so that the subsequent IPMI request command can be processed without intervals, and the active message processing module can be repaired; when the standby message processing module detects that the active message processing module is repaired, the standby message processing module returns the IPMI request command processing permission to the active message processing module, continuously detects the state of the active message processing module (i.e. enters a sleep mode), and the active message processing module resumes normal operation (i.e. continuously receives and executes corresponding processing and response according to the IPMI request command in the IPMI command queue). Therefore, the problem that the subsequent IPMI request command cannot be processed due to the abnormality of the active message processing module can be avoided.
It should be noted that the active message processing module and the standby message processing module may be, but are not limited to, the same message processing module, and the difference between the two is that the responsibilities are different (i.e., under normal conditions, the active message processing module is a message processing module in an operation mode, the standby message processing module is a message processing module in a sleep mode, when the active message processing module is abnormal, the standby message processing module is changed into a message processing module in an operation mode, the active message processing module is repaired to become a message processing module in an operation mode, and the standby message processing module is changed back to the message processing module in the sleep mode).
In an embodiment, in step 11, the master process of the BMC may start the active message processing module and the standby message processing module at the same time.
In another embodiment, in step 11, the master process of the BMC may start the active message processing module and the standby message processing module sequentially. It should be noted that the standby message processing module needs to be started by the main process of the BMC during the normal operation of the active message processing module.
In one embodiment, before step 12, the IPMI command processing method may further include: the external interface sends the IPMI request command to the IPMI command queue via Inter-Process communication (Inter-Process Communication, IPC) (step 10). The external interface may be, but is not limited to, a system interface for IPMI communication with the BMC, an intelligent platform management bus interface, and a network interface. That is, the IPMI request command sent by the external interface is sequentially stored in the IPMI command queue, and the IPMI request command stored in the IPMI command queue at the earliest is processed by the active message processing module at the earliest. In another embodiment, the step 10 may also be performed before the step 11.
In one embodiment, in step 12, the receiving and executing corresponding processing and responding according to the IPMI request command in the IPMI command queue may include: and receiving and calling a corresponding processing program according to the IPMI request command in the IPMI command queue to process, and transmitting the processing result back to an external interface for transmitting the IPMI request command. In this embodiment, the foregoing external interface for transmitting the IPMI request command back to the processing result may include: and returning the processing result to an external interface for sending the IPMI request command through a corresponding Response Queue (Response Queue). In one example, when the processed IPMI request command is sent by the network interface, the processing result is returned to the network interface through the network response queue. In another example, when the processed IPMI request command is sent by the system interface, the processing result is returned to the system interface through the system response queue. In yet another example, when the processed IPMI request command is sent by the IPMI management bus interface, the processing result is returned to the IPMI management bus interface through the IPMI response queue.
In an embodiment, the IPMI command processing method may further include: after the active message processing module receives the IPMI request command in the IPMI command queue each time, setting a Timeout counter value (i.e. the numerical value of u8 RemainTimeoutMs), and setting a Timeout flag bit (i.e. Timeout) to 1 to start a timer thread, wherein the Timeout counter value is greater than or equal to a default counter value; the timer thread decrements the timeout counter value after starting until the timeout counter value is decremented to 0; and when the standby message processing module detects that the timeout flag bit is 1 and the timeout counter value is reduced to 0, the standby message processing module detects that the active message processing module is in an abnormal state. The time corresponding to the default counter value is the time required by the active message processing module to normally process an IPMI request command; the timeout flag bit and the timeout counter value may be stored in a shared Memory (Share Memory); the timer thread may decrement the timeout counter value by one every millisecond until the timeout counter value is decremented to 0; however, the present embodiment is not limited to the present application, and can be adjusted according to practical requirements. In this embodiment, the IPMI command processing method may further include: the active message processing module sets the timeout flag bit to 0 after each processing and response to one IPMI request command. Therefore, when the standby message processing module detects that the timeout flag bit is 0, the standby message processing module detects that the active message processing module is in a normal state.
In an embodiment, in step 14, the reset repair active message processing module may include: killing the active message processing module; and restarting the active message processing module and setting the timeout flag bit to 0. In other words, after the active message processing module is restarted, the timeout flag bit is cleared. In this embodiment, the IPMI command processing method may further include: when the standby message processing module detects that the timeout flag bit is 0, the active message processing module is detected to repair. In other words, the standby message processing module confirms whether the active message processing module is repaired by detecting the timeout flag bit of the active message processing module.
In one embodiment, before step 15, the IPMI command processing method may further include: after each processing and responding to an IPMI request command, the standby message processing module detects whether the active message processing module is repaired (step 16). In another embodiment, the standby message processing module may continually detect whether the active message processing module is completed with a repair. In yet another embodiment, the standby message processing module may periodically and continuously detect whether the active message processing module is completed with repair.
In an embodiment, the IPMI command processing method may further include: after receiving IPMI request commands in an IPMI command queue each time, the active message processing module puts the IPMI request commands into a shared memory; and when the standby message processing module judges that the active message processing module is in an abnormal state, the standby message processing module reads the IPMI request command finally put into the shared memory and executes corresponding processing and response. Therefore, the standby message processing module can process and respond to the IPMI request command in the IPMI command queue in advance, and also can process and respond to the IPMI request command causing the exception of the active message processing module.
Fig. 2 is a schematic structural diagram of a server according to an embodiment of the application. As shown in fig. 2, the server 2 includes: one or more processors 21 and a memory 22, the memory 22 being for storing one or more computer programs 221. When executed by the one or more processors 21, the one or more computer programs 221 cause the one or more processors 21 to implement the IPMI command processing method described above. The one or more computer programs 221 may be, but are not limited to, software programs, computer executable programs, and modules, such as modules corresponding to the IPMI command processing method in the above embodiment (e.g., an active message processing module and a standby message processing module), and the processor 21 executes various functional applications and data processing of the server 2 by running the software programs, computer executable programs, and modules stored in the memory 22, such as implementing the IPMI command processing method described above.
In the present embodiment, fig. 2 only depicts one processor 21 and one program 221 as examples; the processor 21 and the memory 22 in the server 2 may be connected by a bus or otherwise, in fig. 2 by way of example.
In the present embodiment, the memory 22 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store various data. Further, the memory 22 may include a high-speed random access memory, and may also include a nonvolatile memory such as: at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
Referring to FIG. 3, a schematic diagram of a non-transitory computer readable storage medium according to an embodiment of the application is shown. As shown in fig. 3, the non-transitory computer readable storage medium 3 stores a computer program 31, and the computer program 31 implements the IPMI command processing method described above when executed by a processor. The non-transitory computer readable storage medium 3 may be, but is not limited to, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
In summary, in the embodiment of the present application, the two message processing modules (i.e., the active message processing module and the standby message processing module) are started by the main process of the BMC, so that when the active message processing module is abnormal in processing the IPMI request command, the standby message processing module immediately replaces the active message processing module to execute the work, and can process the subsequent IPMI request command without interval. In addition, the standby message processing module can repair the active message processing module, and the IPMI request command processing authority is returned to the active message processing module after the active message processing module is repaired. In addition, the standby message processing module can detect the state of the active message processing module and confirm whether the active message processing module is repaired or not according to the design of the timeout counter value and the timeout flag bit. Furthermore, the active message processing module is used for putting the received IPMI request command into the shared memory each time, so that the standby message processing module can process and respond the IPMI request command in the IPMI command queue continuously, and can also process and respond the IPMI request command causing the abnormality of the active message processing module.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a server to perform the method according to the embodiments of the present application.
While the invention has been illustrated by the above examples, it should be noted that the description is not intended to limit the invention. On the contrary, this invention covers modifications and similar arrangements apparent to those skilled in the art. Therefore, the scope of the claims is to be accorded the broadest interpretation so as to encompass all such obvious modifications and similar arrangements.
Claims (12)
1. An IPMI command processing method, which is applicable to a server, includes the following steps:
the main process of the mainboard management controller starts an active message processing module and a standby message processing module;
The active message processing module receives and executes corresponding processing and response according to the IPMI request command in the IPMI command queue after starting;
the standby message processing module continuously detects the state of the active message processing module after being started;
When the standby message processing module detects that the active message processing module is in an abnormal state, the standby message processing module automatically replaces the active message processing module to execute work, and restores the active message processing module again, and continuously detects whether the active message processing module is restored; and
When the standby message processing module detects that the active message processing module is repaired, the standby message processing module continuously detects the state of the active message processing module again, and the active message processing module operates again.
2. The IPMI command processing method of claim 1, further comprising:
and the external interface sends the IPMI request command to the IPMI command queue through inter-process communication.
3. The IPMI command processing method according to claim 1, wherein said receiving and executing corresponding processing and responding according to the IPMI request command in the IPMI command queue comprises:
and receiving and calling a corresponding processing program according to the IPMI request command in the IPMI command queue to process, and transmitting a processing result back to an external interface for transmitting the IPMI request command.
4. The IPMI command processing method according to claim 3, wherein said transmitting back the processing result to the external interface transmitting said IPMI request command comprises:
and returning the processing result to the external interface for sending the IPMI request command through a corresponding response queue.
5. The IPMI command processing method of claim 1, further comprising:
after the active message processing module receives the IPMI request command in the IPMI command queue each time, setting a timeout counter value, and setting a timeout flag bit to be 1 so as to start a timer thread, wherein the timeout counter value is larger than or equal to a default counter value;
The timer thread decrements the timeout counter value after starting until the timeout counter value is decremented to 0; and
When the standby message processing module detects that the timeout flag bit is 1 and the timeout counter value is reduced to 0, the standby message processing module detects that the active message processing module is in the abnormal state.
6. The IPMI command processing method of claim 5, wherein said resetting repairs said active message processing module, comprising:
killing the active message processing module; and
Restarting the active message processing module, and setting the timeout flag bit to 0.
7. The IPMI command processing method of claim 6, further comprising:
and when the standby message processing module detects that the overtime zone bit is 0, the active message processing module is detected to be repaired.
8. The IPMI command processing method of claim 5, further comprising:
and setting the overtime zone bit to 0 after the active message processing module processes and responds to one IPMI request command each time.
9. The IPMI command processing method of claim 1, further comprising:
And after each processing and responding to one IPMI request command, the standby message processing module detects whether the active message processing module is repaired.
10. The IPMI command processing method of claim 1, further comprising:
After each time the active message processing module receives the IPMI request command in the IPMI command queue, the IPMI request command is put into a shared memory; and
When the standby message processing module judges that the active message processing module is in the abnormal state, the standby message processing module reads the IPMI request command finally put into the shared memory and executes corresponding processing and response.
11. A server, comprising:
One or more processors; and
A memory for storing one or more computer programs that, when executed by the one or more processors, cause the one or more processors to implement the IPMI command processing method of any one of claims 1-10.
12. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the IPMI command processing method according to any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110826898.8A CN113515397B (en) | 2021-07-21 | IPMI command processing method, server, and non-transitory computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110826898.8A CN113515397B (en) | 2021-07-21 | IPMI command processing method, server, and non-transitory computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113515397A CN113515397A (en) | 2021-10-19 |
CN113515397B true CN113515397B (en) | 2024-05-31 |
Family
ID=
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8875154B2 (en) * | 2013-01-25 | 2014-10-28 | American Megatrends, Inc. | Interface specific and parallel IPMI message handling at baseboard management controller |
CN104468831A (en) * | 2014-12-26 | 2015-03-25 | 山东中创软件商用中间件股份有限公司 | Message service network cluster based on network topology |
CN109542691A (en) * | 2018-11-12 | 2019-03-29 | 西安微电子技术研究所 | A method of improving IPMI management software reliability |
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8875154B2 (en) * | 2013-01-25 | 2014-10-28 | American Megatrends, Inc. | Interface specific and parallel IPMI message handling at baseboard management controller |
CN104468831A (en) * | 2014-12-26 | 2015-03-25 | 山东中创软件商用中间件股份有限公司 | Message service network cluster based on network topology |
CN109542691A (en) * | 2018-11-12 | 2019-03-29 | 西安微电子技术研究所 | A method of improving IPMI management software reliability |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114443394A (en) | Method and device for releasing I2C bus, computer equipment and storage medium | |
US6925513B1 (en) | USB device notification | |
US20220055637A1 (en) | Electronic control unit and computer readable medium | |
CN117130832B (en) | Monitoring reset method and system of multi-core heterogeneous system, chip and electronic equipment | |
CN113515397B (en) | IPMI command processing method, server, and non-transitory computer readable storage medium | |
JP2001022709A (en) | Cluster system and computer-readable storage medium storing program | |
CN115904793B (en) | Memory transfer method, system and chip based on multi-core heterogeneous system | |
US20140068354A1 (en) | Apparatus and method for determining a state of a mobile terminal | |
CN113515397A (en) | IPMI command processing method, server and non-transitory computer readable storage medium | |
CN107179911B (en) | Method and equipment for restarting management engine | |
JPH0944376A (en) | Process state management system | |
US20230409391A1 (en) | Thread priority adjusting method, terminal, and computer-readable storage medium | |
JP2008003735A (en) | Automatic stop system of information processing system connected to uninterruptible power supply | |
CN114116203A (en) | Resource calling control method, resource calling control device and storage medium | |
JP6654662B2 (en) | Server device and server system | |
CN111934909A (en) | Method and device for switching IP (Internet protocol) resources of host and standby machine, computer equipment and storage medium | |
CN117234787B (en) | Method and system for monitoring running state of system-level chip | |
JP2785992B2 (en) | Server program management processing method | |
KR102262942B1 (en) | Gateway self recovery method by the wireless bridge of wireless network system system | |
JP3494788B2 (en) | Program execution management system and program execution management method | |
CN116991637B (en) | Operation control method and device of embedded system, electronic equipment and storage medium | |
CN117544584B (en) | Control method, device, switch and medium based on double CPU architecture | |
JP2000148525A (en) | Method for reducing load of active system in service processor duplex system | |
JP3298837B2 (en) | Information processing system | |
US11422877B2 (en) | Information processing apparatus, method, and non-transitory computer-readable storage medium for storing control program of information processing apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |