CN113515397A - 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 PDF

Info

Publication number
CN113515397A
CN113515397A CN202110826898.8A CN202110826898A CN113515397A CN 113515397 A CN113515397 A CN 113515397A CN 202110826898 A CN202110826898 A CN 202110826898A CN 113515397 A CN113515397 A CN 113515397A
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.)
Granted
Application number
CN202110826898.8A
Other languages
Chinese (zh)
Other versions
CN113515397B (en
Inventor
余璘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xunmu Information Technology Shanghai Co Ltd
Original Assignee
Xunmu Information Technology Shanghai Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xunmu Information Technology Shanghai Co Ltd filed Critical Xunmu Information Technology Shanghai Co Ltd
Priority to CN202110826898.8A priority Critical patent/CN113515397B/en
Publication of CN113515397A publication Critical patent/CN113515397A/en
Application granted granted Critical
Publication of CN113515397B publication Critical patent/CN113515397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)

Abstract

An IPMI command processing method, server, and non-transitory computer-readable storage medium are disclosed. The IPMI command processing method comprises the following steps: the main process of the main board 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 repairs the active message processing module; 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. Therefore, the problem that the subsequent IPMI request command cannot be processed due to the exception of the active message processing module can be avoided.

Description

IPMI command processing method, server and non-transitory computer readable storage medium
Technical Field
The present application relates to the field of server technologies, and in particular, to an Intelligent Platform Management Interface (IPMI) command processing method, a server, and a non-transitory computer-readable storage medium.
Background
The server's motherboard Management Controller (BMC) needs to handle the external interfaces of the server (e.g., System Interface (System Interface) for IPMI communication with the BMC, and the Intelligent platform Management bus Interface (I-based) for IPMI communication with the BMC2IPMI communication interface of C), IPMI communication interface for IPMI communication with BMCA trusted network Interface (LAN Interface)) to send an IPMI request command. The IPMI request commands sent by all external interfaces are processed sequentially through a Message Handler (Message Handler) activated by the BMC. If the message processing module calls the exception according to the IPMI request command, the subsequent IPMI request command cannot be processed and responded, and finally the external IPMI command interface (i.e. the external interface) of the BMC is completely disabled.
In summary, a technical problem to be solved by the present invention is to provide a method for processing an IPMI command, so that when an IPMI request command is processed by a message processing module activated by a BMC abnormally, the IPMI request command sent by a subsequent external interface can still be processed and responded.
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 process subsequent IPMI request commands due to exception in IPMI request command processing, and finally all external IPMI command interfaces of the BMC are invalid.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an IPMI command processing method, which includes the following steps: the main 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 an IPMI request Command in an IPMI Command Queue (IPMI Command Queue) after being started; 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, resets the repairing active message processing module, and continuously detects whether the repairing of the active message processing module is finished; 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, which includes: one or more processors, and a memory. The memory is used for storing one or more computer programs, which when executed by the one or more processors, cause the one or more processors to implement the IPMI command processing method as provided by the embodiments of the present application.
In a third aspect, embodiments of the present application provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements an IPMI command processing method as provided by embodiments of the present application.
In the embodiment of the application, the design of 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 in processing 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 intervals. In addition, the standby message processing module can also 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 application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flowchart of one embodiment of a IPMI command processing method according to the present disclosure;
FIG. 2 is a block diagram of a server according to an embodiment of the present disclosure; and
FIG. 3 is a block diagram of an embodiment of a non-transitory computer-readable storage medium according to the present application.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings. In the drawings, the same reference numerals indicate the same or similar components or process flows.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, values, method steps, operations, components, and/or components, but do not preclude the presence or addition of further features, values, method steps, operations, components, and/or groups thereof.
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. In contrast, 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 IPMI command processing method according to an embodiment of the present application. In this embodiment, the IPMI command processing method may be applied to the BMC of the server, as shown in fig. 1, and includes the following steps: the main process of the BMC starts an active message processing module and a standby message processing module (step 11); the active message processing module receives the IPMI request command in the IPMI command queue after being started and executes corresponding processing and response according to the IPMI request command in the IPMI command queue (step 12); the standby message processing module continuously detects the state of the active message processing module after being started (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, resets and repairs the active message processing module, and continuously detects whether the active message processing module is repaired (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 resumes operation (step 15).
More specifically, under normal conditions, the active message processing module sequentially processes and responds to the IPMI request commands in the IPMI command queue after being started, and the standby message processing module does not receive the IPMI request commands 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 fact that the IPMI request command is processed abnormally, the standby message processing module enters an operation mode, 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), can process subsequent IPMI request commands without intervals, and repairs the active message processing module; 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 and 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 responding 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 exception 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 modules is that the roles are different (i.e. under normal conditions, the active message processing module is a message processing module in an operation mode, and 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 to the message processing module in the operation mode; and the active message processing module is repaired to be the message processing module in the 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 main 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 main 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 handling module needs to be started by the main process of the BMC during the normal operation of the active message handling module.
In an 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 through Inter-Process Communication (IPC) (step 10). The external interface may be, but 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 commands sent by the external interface are sequentially stored in the IPMI command queue, and the IPMI request command stored in the IPMI command queue at the earliest time is processed by the active message processing module at the earliest time. In another embodiment, the step 10 may also be performed before the step 11.
In one embodiment, the step 12 of receiving and executing the corresponding process and response 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 for processing, and returning a processing result to an external interface sending the IPMI request command. In this embodiment, the transmitting the processing result back to the external interface sending the IPMI request command may include: and returning the processing result to an external interface sending the IPMI request command through a corresponding Response Queue (Response Queue). In one example, when the IPMI request command being processed is sent by a network interface, the processing result is returned to the network interface via a network echo queue. In another example, when the IPMI request command to be processed is sent by a system interface, the processing result is returned to the system interface through a system response queue. In yet another example, when the IPMI request command to be processed is sent by the IPMI interface, the processing result is returned to the IPMI interface via the IPMI response queue.
In an embodiment, the IPMI command processing method may further include: after receiving an IPMI request command in an IPMI command queue, the active message processing module sets a Timeout counter value (namely the value of u8 RemainTimeoutMs) and sets a Timeout flag bit (namely Timeout) to be 1 so as 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 reduced to 0; and when the standby message processing module detects that the overtime flag bit is 1 and the value of the overtime counter 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 actual requirements. In this embodiment, the IPMI command processing method may further include: after the active message processing module processes and responds to an IPMI request command each time, the overtime flag bit is set to be 0. 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 one 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, the timeout flag is cleared after the active message processing module is restarted. In this embodiment, the IPMI command processing method may further include: when the standby message processing module detects that the overtime flag bit is 0, the active message processing module is detected to be repaired. In other words, the standby message processing module determines whether the active message processing module completes repairing by detecting the timeout flag bit of the active message processing module.
In an 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 completes the repair (step 16). In another embodiment, the standby message processing module may continuously detect whether the active message processing module completes repairing. In yet another embodiment, the standby message processing module may periodically and continuously detect whether the active message processing module is repaired.
In an embodiment, the IPMI command processing method may further include: the active message processing module puts the IPMI request command into the shared memory after receiving the IPMI request command in the IPMI command queue each time; 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 not only continuously process and respond to the IPMI request command in the IPMI command queue, but also process and respond to the IPMI request command causing the exception of the active message processing module.
Please refer to fig. 2, which is a schematic structural diagram of a server according to an embodiment of the present application. As shown in fig. 2, the server 2 includes: one or more processors 21 and memory 22, the memory 22 being used to store 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 not limited to, software programs, computer-executable programs, and modules, such as modules corresponding to the IPMI command processing method in the above-described embodiment (for example, 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, the computer-executable programs, and the modules stored in the memory 22, so as to implement the above-described IPMI command processing method.
In the present embodiment, fig. 2 only shows one processor 21 and one program 221 as an example; the processor 21 and the memory 22 in the server 2 may be connected by a bus or other means, and fig. 2 illustrates the connection by a bus as an 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 non-volatile memory, such as: at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
Please refer to fig. 3, which is a schematic structural diagram of a non-transitory computer-readable storage medium according to an embodiment of the present application. 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 design of the two message processing modules (i.e., the active message processing module and the standby message processing module) is started by the main process of the BMC, so that when the active message processing module processes an IPMI request command abnormally, the standby message processing module immediately replaces the active message processing module to execute work, and can process subsequent IPMI request commands without an interval. In addition, the standby message processing module can also 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, through the design of the timeout counter value and the timeout flag bit, the standby message processing module can detect the state of the active message processing module and confirm whether the active message processing module completes repairing. Furthermore, the active message processing module puts the received IPMI request command into the shared memory each time, so that the standby message processing module can process and respond to the IPMI request command in the IPMI command queue in a continuous manner and can process and respond to the IPMI request command causing the abnormality of the active message processing module.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for causing a server to execute the methods according to the embodiments of the present application.
While the invention has been described using the above embodiments, it should be noted that these descriptions are not intended to limit the invention. Rather, this invention encompasses modifications and similar arrangements as would be apparent to one skilled in the art. The scope of the claims is, therefore, to be construed in the broadest manner to include all such obvious modifications and similar arrangements.

Claims (12)

1. An IPMI command processing method is characterized by comprising the following steps:
the main process of the main board 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 being started;
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, resets and repairs the active message processing module, and continuously detects whether the active message processing module is repaired; 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.
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 interprocess communication.
3. The IPMI command processing method of claim 1, wherein the receiving and performing corresponding processing and responding according to IPMI request commands 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 for processing, and returning a processing result to an external interface sending the IPMI request command.
4. The IPMI command processing method of claim 3, wherein the returning the processing result to the external interface that sent the IPMI request command comprises:
and transmitting the processing result back to the external interface which sends the IPMI request command through a corresponding response queue.
5. The IPMI command processing method of claim 1, further comprising:
after receiving the IPMI request command in the IPMI command queue, the active message processing module sets an overtime counter value and sets an overtime flag bit to be 1 each time so as to start a timer thread, wherein the overtime 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 reduced 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 the resetting repairing the active message processing module comprises:
killing the active message processing module; and
and restarting the active message processing module, and setting the overtime flag bit to be 0.
7. The IPMI command processing method of claim 6, further comprising:
when the standby message processing module detects that the overtime flag 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 after the active message processing module processes and responds to an IPMI request command each time, the overtime zone bit is set to be 0.
9. The IPMI command processing method of claim 1, further comprising:
and after the standby message processing module processes and responds to an IPMI request command each time, detecting whether the active message processing module completes repairing.
10. The IPMI command processing method of claim 1, further comprising:
the active message processing module puts the IPMI request command into a shared memory after receiving the IPMI request command in the IPMI command queue each time; 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 which is finally put into the shared memory and executes corresponding processing and response.
11. A server, comprising:
one or more processors; and
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.
CN202110826898.8A 2021-07-21 2021-07-21 IPMI command processing method, server, and non-transitory computer readable storage medium Active CN113515397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110826898.8A CN113515397B (en) 2021-07-21 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 2021-07-21 IPMI command processing method, server, and non-transitory computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113515397A true CN113515397A (en) 2021-10-19
CN113515397B CN113515397B (en) 2024-05-31

Family

ID=78068502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110826898.8A Active CN113515397B (en) 2021-07-21 2021-07-21 IPMI command processing method, server, and non-transitory computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113515397B (en)

Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN113515397B (en) 2024-05-31

Similar Documents

Publication Publication Date Title
US7899952B2 (en) Change notification in USB devices
WO2013152584A1 (en) Method, device and single board for feeding dog in embedded system
CN106897128B (en) Distributed application quitting method, system and server
CN113515397B (en) IPMI command processing method, server, and non-transitory computer readable storage medium
CN115904793B (en) Memory transfer method, system and chip based on multi-core heterogeneous system
JP2001022709A (en) Cluster system and computer-readable storage medium storing program
JP2735514B2 (en) Process status management method
US12008396B2 (en) Application state control method apparatus, and terminal and computer-readable storage medium
CN114116203A (en) Resource calling control method, resource calling control device and storage medium
CN114124644A (en) Ethernet OAM (operation administration and maintenance) alarming method and device based on Linux kernel mode
CN112052024A (en) Upgrading method, device, equipment and medium for BIOS of mega-core server
CN108600044B (en) Interface state acquisition method, device and equipment
JP2776442B2 (en) Compound computer system
CN110365538A (en) Port status control method, device, equipment and computer readable storage medium
CN112181609B (en) Service daemon method, device and readable storage medium
US20200374366A1 (en) Method and system for communication between two devices
JP3298837B2 (en) Information processing system
JP2545763B2 (en) Restart method of batch processing in hot standby system
CN118519369A (en) System abnormality monitoring method and device for vehicle-mounted cabin domain and readable medium
JPH02310755A (en) Health check system
JP2001290670A (en) Cluster system
JPH06161782A (en) Control system for multiprocessing
JPH0877024A (en) Message transfer system
JPH08202586A (en) Connection monitoring system
JPS62245456A (en) Time monitor and control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant