Baseboard management controller communication method and device and server
By setting up an intelligent platform management interface service in the operating system and utilizing persistent session connections and inter-process communication, the problem of poor timeliness in acquiring substrate information was solved, achieving more efficient substrate information acquisition and secure system operation.
Patent Information
- Application Number
- CN202411377331.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing technology, the timeliness of obtaining board information is poor, mainly because the IPMI platform management tool needs to perform a three-way handshake, user authentication and a four-way handshake process every time it accesses the board management controller, which leads to increased system latency and performance overhead.
Set up an intelligent platform management interface service in the operating system to establish a continuous session connection with the baseboard management controller. Receive and send baseboard information query requests and responses through inter-process communication to reduce the overhead of repeated connection establishment and disconnection.
It improves the efficiency and timeliness of substrate information acquisition, reduces system latency, isolates interface risks associated with interaction with the substrate management controller, and ensures the operational security of the operating system.
Smart Images

Figure CN118897743A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a baseboard management controller communication method, device and server. Background Art
[0002] Servers generally use baseboard management controllers (BMC) and intelligent platform management interfaces (IPMI) for baseboard management. The main method is to use IPMI platform management tools (such as IPMITOOL) to access the baseboard management controller through network protocols to obtain baseboard information.
[0003] Because the IPMI platform management tool involves the process of creating and disconnecting connections when initiating access requests to the baseboard management controller, each process of creating and disconnecting connections includes three-way handshakes, user authentication, data transmission, and four waves, which increases system latency and performance overhead, making the timeliness of baseboard information poor.
[0004] Therefore, how to improve the timeliness of substrate information acquisition has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0005] The present application provides a baseboard management controller communication method, device and server for solving the technical problem of how to improve the timeliness of obtaining baseboard information.
[0006] The present application provides a baseboard management controller communication method, which is applied to an intelligent platform management interface service in an operating system, and the method includes: receiving a first substrate information query request sent by the operating system; Based on the session connection, sending the first substrate information query request to the substrate management controller and receiving the first substrate information query response sent by the substrate management controller; sending the first substrate information query response to the operating system; The session connection is a persistent connection established between the intelligent platform management interface service and the baseboard management controller.
[0007] In some embodiments, the sending the first substrate information query request to the substrate management controller based on the session connection and receiving the first substrate information query response sent by the substrate management controller includes: Converting the first substrate information query request into a second substrate information query request based on an intelligent platform management interface protocol; Sending the second substrate information query request to the substrate management controller based on the session connection and receiving a second substrate information query response sent by the substrate management controller; The second substrate information query response is converted into the first substrate information query response based on the intelligent platform management interface protocol.
[0008] In some embodiments, the receiving a first substrate information query request sent by the operating system includes: A first substrate information query request sent by the operating system is received based on an inter-process communication method.
[0009] In some embodiments, before receiving the first substrate information query request sent by the operating system based on the inter-process communication method, the method further includes: Based on the inter-process communication mode, a first message queue and a second message queue are created; The first message queue is used by the operating system to send a first substrate information query request to the intelligent platform management interface service; the second message queue is used by the intelligent platform management interface service to send a first substrate information query response to the operating system.
[0010] In some embodiments, the method further comprises: Based on the session connection, sending a link status query request to the baseboard management controller according to a preset link query period; The connection state of the session connection is determined based on the link state query response sent by the baseboard management controller in each preset link query period.
[0011] In some embodiments, determining the connection status of the session connection based on the link status query response sent by the baseboard management controller in each preset link query period includes: If the link status query response is not received within a preset time period, the connection status of the session connection is determined to be an error.
[0012] In some embodiments, determining the connection status of the session connection based on the link status query response sent by the baseboard management controller in each preset link query period includes: When the received multiple consecutive link status query responses are errors and the number of the multiple link status query responses is greater than a preset number, it is determined that the connection state of the session connection is an error.
[0013] In some embodiments, after determining the connection status of the session connection based on the link status query response sent by the baseboard management controller in each preset link query period, the method further includes: When the connection state of the session connection is an error, destroying the session connection and recreating a new session connection; If the creation result of the new session connection is failure or the creation duration of the new session connection exceeds a preset creation duration, generating network failure information; The network fault information is sent to the operating system so that the operating system resets a network device that communicates with the baseboard management controller.
[0014] In some embodiments, after sending the first substrate information query request to the substrate management controller based on the session connection and receiving the first substrate information query response sent by the substrate management controller, the method further includes: generating baseboard management controller fault information when the baseboard management controller fails to send the first baseboard information query response or the first baseboard information query response is abnormal and erroneous; The baseboard management controller fault information is sent to the operating system so that the operating system resets the baseboard management controller.
[0015] In some embodiments, the session connection is established based on the following steps: When the server is powered on, a persistent connection is established with the baseboard management controller based on the network address and the preset port of the baseboard management controller.
[0016] In some embodiments, the method further comprises: Receiving a hardware parameter configuration request sent by the operating system; Based on the session connection, sending the hardware parameter configuration request to the baseboard management controller and receiving the hardware parameter configuration response sent by the baseboard management controller; The hardware parameter configuration response is sent to the operating system.
[0017] The present application provides a baseboard management controller communication device, which runs an intelligent platform management interface service in an operating system, and the device includes: A receiving module, configured to receive a first substrate information query request sent by the operating system; A communication module, configured to send the first substrate information query request to a substrate management controller and receive a first substrate information query response sent by the substrate management controller based on a session connection; A sending module, used for sending the first substrate information query response to the operating system; The session connection is a persistent connection established between the intelligent platform management interface service and the baseboard management controller.
[0018] The present application provides a server, including a central processing unit and a baseboard management controller; The central processing unit is used to run the intelligent platform management interface service in the operating system and execute the baseboard management controller communication method.
[0019] The present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the baseboard management controller communication method is implemented when the processor executes the computer program.
[0020] The present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program implements the baseboard management controller communication method when executed by a processor.
[0021] The baseboard management controller communication method, device and server provided in the present application receive a first substrate information query request sent by the operating system by setting an intelligent platform management interface service in the operating system; based on the session connection, send the first substrate information query request to the baseboard management controller and receive the first substrate information query response sent by the baseboard management controller; send the first substrate information query response to the operating system; since the intelligent platform management interface service is a separately set service process, the service process can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, thereby improving the efficiency of obtaining substrate information; since the session connection is a continuous connection established between the intelligent platform management interface service and the baseboard management controller, the overhead and system delay of repeatedly establishing and disconnecting the connection are reduced, thereby improving the timeliness of substrate information acquisition; in addition, by separately setting the intelligent platform management interface service in the operating system, replacing third-party tools such as the intelligent platform management interface platform management tool, the risks related to the interface that interacts with the baseboard management controller can be isolated in the service process, thereby ensuring the safe operation of the operating system. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0023] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] Figure 1 It is a flow chart of the baseboard management controller communication method provided in this application.
[0025] Figure 2 It is a schematic diagram of the baseboard management controller communication architecture provided in this application.
[0026] Figure 3 It is a structural diagram of a baseboard management controller communication device provided in this application.
[0027] Figure 4 It is a schematic diagram of the structure of the server provided by this application.
[0028] Figure 5 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first", "second" etc. in the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0031] With the development of server technology, the number and types of field replaceable units (FRUs) and sensors inside servers are increasing day by day. The operating system needs to maintain the timeliness of obtaining the original substrate information.
[0032] The management and control of the server baseboard is mainly implemented by the baseboard management controller (BMC) and the IPMITOOL tool. The current process of the IPMITOOL tool accessing the baseboard management controller can be roughly divided into: Step 1: Establish a connection. After the three-way handshake, the Client (operating system) sends authentication information to the Service (baseboard management controller) through the network link. If the network is unobstructed and the authentication information is correct, a connection will be established. Step 2: Send a request. The Client fills in the request data packet according to the IPMI protocol and sends it to the Service through the connection in step 1. Step 3: Return information. The Service parses the data packet according to the IPMI protocol, completes the specified action according to the request content, and returns the request information. Step 4: Disconnect. After receiving the reply information, the Client parses the data packet according to the IPMI protocol, then disconnects and outputs the return information.
[0033] Since the IPMITOOL tool has two steps of "creating a connection" and "disconnecting a connection" each time it initiates a request, and these two steps require multiple processes such as three-way handshakes, user authentication, and four waves, it increases system latency and performance overhead. In addition, the IPMITOOL tool is an executable file, which is a black box interface for the operating system. Once the file is missing or the IPMITOOL version is not compatible, it will lead to the problem of being unable to access the baseboard management controller.
[0034] In order to solve the above technical problems, Figure 1 is a flow chart of the baseboard management controller communication method provided by the present application, such as Figure 1 As shown, the method is applied to the intelligent platform management interface service in the operating system, including: Step 110: Receive a first substrate information query request sent by an operating system.
[0035] Specifically, the baseboard management controller communication method provided in the embodiment of the present application is executed by a baseboard management controller communication device, which can be implemented by software, such as an intelligent platform management interface service running in an operating system.
[0036] The intelligent platform management interface service is a background process (service program) set up separately in the operating system. It is responsible for communicating with the baseboard management controller (BMC) and maintaining the communication link with the baseboard management controller.
[0037] The application scenario of the baseboard management controller communication method provided in the embodiment of the present application is that the user queries the baseboard information of the server through the operating system. Baseboard is also called motherboard. Baseboard information refers to the specification information and configuration information of various devices set in the server baseboard, including model, manufacturer, chipset, memory slot, expansion slot, interface type, supported processor type, configuration parameters, etc.
[0038] The operating system receives user input and generates a first substrate information query request. The substrate information query request is used to query substrate information, and the purpose is to request to obtain substrate information. The operating system sends the generated first substrate information query request to the intelligent platform management interface service.
[0039] Step 120: Based on the session connection, send a first substrate information query request to the baseboard management controller and receive a first substrate information query response sent by the baseboard management controller; the session connection is a persistent connection established between the intelligent platform management interface service and the baseboard management controller.
[0040] Specifically, a network session connection refers to a data exchange channel established between two devices or systems in a computer network, such as a Transmission Control Protocol (TCP) type session connection.
[0041] Session connections include persistent connections and non-persistent connections. A persistent connection means that after a session is created, the connection remains open until it is explicitly closed. A non-persistent connection means that it is established each time access is required and is closed immediately after use.
[0042] In the embodiment of the present application, the session connection is a persistent connection established between the intelligent platform management interface service and the baseboard management controller. In this way, the communication between the intelligent platform management interface service and the baseboard management controller will remain valid, which is suitable for situations where long-term monitoring and management are required. The state and context information are maintained during the network communication process, so that data exchange can be carried out continuously without re-establishing the connection each time.
[0043] The intelligent platform management interface service sends the first substrate information query request to the substrate management controller according to the established session connection, so that the substrate management controller can obtain the corresponding substrate information according to the first substrate information query request and generate a first substrate information query response. The substrate information query response is a reply to the substrate information query request, including the requested substrate information or processing results. The substrate management controller sends the generated first substrate information query response to the intelligent platform management interface service.
[0044] Step 130: Send the first substrate information query response to the operating system.
[0045] Specifically, after receiving the first substrate information query response, the intelligent platform management interface service sends the response to the operating system, and the operating system can obtain the substrate information or processing results therein and display them to the user.
[0046] The baseboard management controller communication method provided in the embodiment of the present application receives a first substrate information query request sent by the operating system by setting an intelligent platform management interface service in the operating system; based on the session connection, sends the first substrate information query request to the baseboard management controller and receives a first substrate information query response sent by the baseboard management controller; sends the first substrate information query response to the operating system; since the intelligent platform management interface service is a separately set service process, the service process can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, thereby improving the efficiency of obtaining substrate information; since the session connection is a continuous connection established between the intelligent platform management interface service and the baseboard management controller, the overhead and system delay of repeatedly establishing and disconnecting the connection are reduced, thereby improving the timeliness of substrate information acquisition; in addition, by separately setting the intelligent platform management interface service in the operating system, replacing third-party tools such as the intelligent platform management interface platform management tool, the risks related to the interface that interacts with the baseboard management controller can be isolated in the service process, thereby ensuring the safe operation of the operating system.
[0047] It should be noted that each implementation method of the present application can be freely combined, the order can be changed, or it can be executed separately, and does not need to rely on or depend on a fixed execution order.
[0048] In some embodiments, based on the session connection, sending a substrate information query request to a substrate management controller and receiving a substrate information query response sent by the substrate management controller include: Converting the first substrate information query request into a second substrate information query request based on the intelligent platform management interface protocol; Sending a second substrate information query request to the baseboard management controller based on the session connection and receiving a second substrate information query response sent by the baseboard management controller; The second substrate information query response is converted into a first substrate information query response based on the intelligent platform management interface protocol.
[0049] Specifically, the Intelligent Platform Management Interface Protocol (IPMI Protocol) is mainly used for communication between the Baseboard Management Controller (BMC) and system hardware (replaceable units and sensors, etc.). The BMC interacts with system hardware (such as sensors, fans, power supplies, etc.) through the IPMI protocol to monitor system status and record events. At the same time, the IPMI protocol can also allow the operating system or administrator to remotely access and manage the BMC through the network interface, thereby achieving remote monitoring and control.
[0050] The intelligent platform management interface service (IPMI service) splices and converts the data in the first substrate information query request according to the IPMI protocol to generate a second substrate information query request. The second substrate information query request is a request converted by the IPMI protocol.
[0051] The intelligent platform management interface service sends the second substrate information query request to the baseboard management controller through the session connection. The baseboard management controller communicates with the system hardware (replaceable units and sensors, etc.) according to the second substrate information query request and can return the substrate information related to the second substrate information query request. The baseboard management controller generates a second substrate information query response based on the substrate information and sends it to the intelligent platform management interface service through the session connection.
[0052] The intelligent platform management interface service (IPMI service) splices and converts the data in the second substrate information query response according to the IPMI protocol, generates a first substrate information query response, and sends it to the operating system.
[0053] The baseboard management controller communication method provided in the embodiment of the present application realizes the conversion of baseboard information query request and baseboard information query response through the intelligent platform management interface protocol, and realizes the communication between the intelligent platform management interface service and the baseboard management controller through the session connection, thereby reducing the overhead and system delay of repeatedly establishing and disconnecting connections, and improving the timeliness of substrate information acquisition.
[0054] In some embodiments, receiving a first substrate information query request sent by an operating system includes: A first substrate information query request sent by the operating system is received based on an inter-process communication method.
[0055] Specifically, inter-process communication (IPC) refers to the mechanism for exchanging data and information between different processes in an operating system. Since each process runs independently in memory, inter-process communication allows them to collaborate to complete tasks. Inter-process communication methods can include pipes, message queues, shared memory, semaphores, and sockets.
[0056] Since the intelligent platform management interface service runs in the operating system, it can communicate with other processes in the operating system through inter-process communication to receive the first substrate information query request.
[0057] The baseboard management controller communication method provided in the embodiment of the present application, in which the intelligent platform management interface service receives the first baseboard information query request sent by the operating system through inter-process communication, can improve the efficiency of data exchange between the intelligent platform management interface service and the operating system, and improve the timeliness of substrate information acquisition.
[0058] In some embodiments, before receiving the first substrate information query request sent by the operating system based on the inter-process communication method, the method further includes: Based on the inter-process communication mode, a first message queue and a second message queue are created; The first message queue is used by the operating system to send a first substrate information query request to the intelligent platform management interface service; the second message queue is used by the intelligent platform management interface service to send a first substrate information query response to the operating system.
[0059] Specifically, a bidirectional message queue may be used between the operating system and the intelligent platform management interface service to implement inter-process communication.
[0060] A first message queue and a second message queue may be created. The first message queue is used by the operating system to send a first substrate information query request to the intelligent platform management interface service. The operating system may put the first substrate information query request into the first message queue for processing. The second message queue is used by the intelligent platform management interface service to send a first substrate information query response to the operating system. The intelligent platform management interface service may put the first substrate information query response into the second message queue for processing.
[0061] The baseboard management controller communication method provided in the embodiment of the present application realizes inter-process communication between the operating system and the intelligent platform management interface service through a bidirectional message queue, thereby improving the reliability of asynchronous communication and data exchange.
[0062] In some embodiments, when the operating system sends multiple first substrate information query requests to the intelligent platform management interface service, the intelligent platform management interface service may determine the priority of each first substrate information query request according to the importance of the hardware device to be queried in each first substrate information query request. For example, the higher the importance of the hardware device, the higher the priority of the first substrate information query request.
[0063] According to the priority of each first substrate information query request, the first message queue is prioritized so that the queue number of the first substrate information query request with a higher priority is at the front and is processed first. Accordingly, the priority corresponding to the first substrate information query request is matched with the priority of the first substrate information query response, and the second message queue is prioritized so that the queue number of the first substrate information query response with a higher priority is at the front and is processed first.
[0064] Through the above method, the efficiency of obtaining substrate information can be improved.
[0065] In some embodiments, the method further comprises: Based on the session connection, a link status query request is sent to the baseboard management controller according to a preset link query period; The connection status of the session connection is determined based on the link status query response sent by the baseboard management controller in each preset link query period.
[0066] Specifically, the intelligent platform management interface service may also monitor the status of the communication link of the session connection.
[0067] After the session connection is established, the intelligent platform management interface service can send a link status query request to the baseboard management controller through the session connection according to the preset link query period. The preset link query period can be set as needed, such as 30 seconds. The link status query request is used to query the status of the communication link of the session connection, with the purpose of requesting to obtain the connection status with the baseboard management controller.
[0068] After receiving a link status query request within each preset link query period, the baseboard management controller generates a link status query response according to the status of the communication link, and sends the link status query response to the intelligent platform management interface service so that the intelligent platform management interface service determines the connection status of the session connection.
[0069] The baseboard management controller communication method provided in the embodiment of the present application, the intelligent platform management interface service sends a link status query request to the baseboard management controller according to a preset link query cycle, and determines the connection status of the session connection based on the link status query response. It can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, thereby improving the efficiency of obtaining baseboard information.
[0070] In some embodiments, determining the connection state of the session connection based on the link state query response sent by the baseboard management controller in each preset link query period includes: If no link status query response is received within the preset time period, the connection status of the session connection is determined to be an error.
[0071] Specifically, the preset time length can be set as needed, such as 5 seconds, etc. If the intelligent platform management interface service does not receive a link status query response within the preset time length, it can be determined that the session connection is abnormal and the connection status is an error.
[0072] The baseboard management controller communication method provided in the embodiment of the present application determines the connection status of the session connection by setting a preset time length to judge the reception time of the link status query response, and can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, thereby improving the efficiency of obtaining baseboard information.
[0073] In some embodiments, determining the connection state of the session connection based on the link state query response sent by the baseboard management controller in each preset link query period includes: When the received multiple consecutive link status query responses are errors and the number of the multiple link status query responses is greater than a preset number, it is determined that the connection state of the session connection is an error.
[0074] Specifically, if the intelligent platform management interface service can receive a link status query response, but multiple consecutive link status query responses received are errors, and the number of multiple link status query responses is greater than a preset number, it can be determined that the session connection is abnormal and the connection status is an error. The preset number can be set as needed, for example, 3.
[0075] The baseboard management controller communication method provided in the embodiment of the present application determines the connection status of the session connection by receiving multiple consecutive link status query responses, can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, and improves the efficiency of obtaining baseboard information.
[0076] In some embodiments, after determining the connection status of the session connection based on the link status query response sent by the baseboard management controller in each preset link query period, the method further includes: When the connection status of the session connection is an error, the session connection is destroyed and a new session connection is created; If the creation result of the new session connection fails or the creation time of the new session connection exceeds the preset creation time, network failure information is generated; The network fault information is sent to the operating system so that the operating system resets the network device communicating with the baseboard management controller.
[0077] Specifically, if it is determined that the connection state of the session connection is an error, the intelligent platform management interface service determines that the current session connection cannot be used, destroys the current session connection where an error has occurred, and attempts to recreate a new session connection.
[0078] If the creation result of the new session connection fails or the creation time of the new session connection exceeds the preset creation time, it can be determined that there is a network failure. For example, if three consecutive retries fail or time out, it is considered that the network is faulty.
[0079] The intelligent platform management interface service can generate network fault information and send the information to the operating system so that the operating system can reset the network device that communicates with the baseboard management controller. For example, the operating system can parse the network fault information, parse the specific corresponding baseboard management controller, and try to repair it by resetting the network card that communicates with the baseboard management controller.
[0080] The baseboard management controller communication method provided in the embodiment of the present application, when the connection status of the session connection is an error, destroys the session connection and recreates a new session connection, determines the network fault information according to the creation status of the new session connection, triggers the operating system to reset the network device that communicates with the baseboard management controller, can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, and improves the efficiency of obtaining baseboard information.
[0081] In some embodiments, after sending the first substrate information query request to the baseboard management controller based on the session connection and receiving the first substrate information query response sent by the baseboard management controller, the method further includes: When the baseboard management controller fails to send the first baseboard information query response or the first baseboard information query response is abnormal and erroneous, generating baseboard management controller fault information; Sending baseboard management controller fault information to the operating system so that the operating system resets the baseboard management controller.
[0082] Specifically, after the intelligent platform management interface service sends the first substrate information query request to the baseboard management controller according to the session connection, if the first substrate information query response sent by the baseboard management controller is not received or the first substrate information query response is an abnormal error, it can be determined that the baseboard management controller has failed and the baseboard management controller failure information is generated. For example, the intelligent platform management interface service can send the first substrate information query request multiple times in a row and retry to obtain a response. If all fail, it can be determined that the baseboard management controller has failed.
[0083] The intelligent platform management interface service sends the baseboard management controller fault information to the operating system, triggering the operating system to reset the baseboard management controller. For example, the operating system parses the baseboard management controller fault information, parses the specific baseboard management controller that has failed, and attempts to repair it by resetting the baseboard management controller.
[0084] The baseboard management controller communication method provided in the embodiment of the present application determines the baseboard management controller fault information based on the reception status of the first baseboard information query response, triggers the operating system to reset the baseboard management controller, and can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, thereby improving the efficiency of obtaining substrate information.
[0085] In some embodiments, the session connection is established based on the following steps: When the server is powered on, a persistent connection is established with the baseboard management controller based on the network address and the preset port of the baseboard management controller.
[0086] Specifically, after the server is powered on, the intelligent platform management interface service may be initialized through a system and service manager (eg, systemd in a Linux system).
[0087] For example, start the network service to configure the network card. After the network service is started, the baseboard management controller (BMC) end network address (such as ipv4 address) and the preset port (pre-negotiated port) are used to handshake with the BMC end and establish a TCP type session (Session). The type of the session connection is a persistent connection. If the BMC cannot be accessed through the BMC end network address and the preset port, it can be considered that the service startup has failed. After the session is created, the intelligent platform management interface service creates a message queue with pre-determined keywords and pulls up a thread to wait for the baseboard information query request sent by the operating system.
[0088] The baseboard management controller communication method provided in the embodiment of the present application establishes a continuous connection with the baseboard management controller according to the network address and preset port of the baseboard management controller, thereby reducing the overhead and system delay of repeatedly establishing and disconnecting the connection and improving the timeliness of obtaining baseboard information.
[0089] In some embodiments, the method further comprises: Receive hardware parameter configuration request sent by the operating system; Based on the session connection, a hardware parameter configuration request is sent to the baseboard management controller and a hardware parameter configuration response is received from the baseboard management controller; Sends a hardware parameter configuration response to the operating system.
[0090] Specifically, the hardware parameter configuration request is used to request to set or modify the hardware parameters. The hardware parameter configuration response is the processing result corresponding to the hardware parameter configuration request.
[0091] The user can input in the operating system, and the operating system generates a hardware parameter configuration request. After the intelligent platform management interface service receives the hardware parameter configuration request sent by the operating system, it sends the hardware parameter configuration request to the baseboard management controller through the established session connection. The baseboard management controller configures the parameters of the relevant hardware devices according to the hardware parameter configuration request and generates a hardware parameter configuration response according to the processing result. The intelligent platform management interface service sends the hardware parameter configuration response received from the baseboard management controller to the operating system for display to the user.
[0092] The baseboard management controller communication method provided in the embodiment of the present application can realize the setting and modification of the parameters of the hardware devices on the baseboard, thereby improving the convenience of parameter configuration of the baseboard hardware devices.
[0093] Figure 2is a schematic diagram of the baseboard management controller communication architecture provided by this application, such as Figure 2 As shown, the architecture includes an operating system, an intelligent platform management interface service (IPMI service), and a baseboard management controller (BMC).
[0094] Among them, the IPMI service mainly executes the following methods: 1. Create and maintain a connection with the BMC; 2. Accept the operating system's request for the BMC through inter-process communication (IPC); 3. Parse the request sent by the operating system, assemble the data packet according to the IPMI protocol, and send the request to the BMC; 4. Parse the return information of the BMC according to the IPMI protocol, reassemble the information, and send it back to the operating system through IPC; 5. Handle communication exceptions with the BMC, and return different error codes through IPC according to different fault scenarios.
[0095] The operating system mainly performs the following methods: 1. Receive user information through the command line module, parse and fill it, and then send it to the IPMI service through IPC; 2. Internally maintain the routine test process, divide the routine test cycle according to the number and type of field replaceable units (FRUs) and sensors, refresh FRU information regularly, and provide FRU information display function externally; 3. Monitor IPMI service return information and process the return information; 4. IPMI service fault handling, take different repair measures according to different fault scenarios, for example, the network is unobstructed, but the BMC has no return or the timeout range can be repaired by resetting the BMC.
[0096] BMC mainly performs the following methods: 1. Receive requests and maintain connections with other modules (including connections between IPMI services and BMC); 2. Measure FRU information; 3. Process return requests.
[0097] The following takes the substrate information query scenario as an example to illustrate: The server startup service starts the operating system. In the initialization phase, a thread is created to obtain the message queue of the IPMI service keyword, fill in the message content according to the requirements of the initialization phase, and request to query the FRU information managed by the BMC.
[0098] Step 1: After receiving the message, the IPMI service parses the message content to confirm the FRU information to be queried, assembles the request command according to the IPMI protocol, and sends the request to the target BMC through the session connection (session) created in the initialization process; Step 2: After receiving the request message, BMC parses the request content according to the IPMI protocol, fills in the return information and sends it back to the IPMI service through the session; Step 3: The IPMI service receives the BMC return information, parses the return information according to the IPMI protocol, fills in the information required by the operating system, and sends it back to the operating system through the message queue; Step 4: The operating system receives the message sent back by the IPMI service and uses the information in the data packet to complete initialization.
[0099] The following takes the hardware parameter configuration scenario as an example to explain: The user sends a command to the operating system through the command line module to modify the status of a FRU (for example, to modify the fan speed).
[0100] Step 1: The operating system sends the request to the IPMI service through the message queue; Step 2: The IPMI service splices the request command according to the IPMI protocol and sends the request packet to the BMC through the session; Step 3: After receiving the request sent by the session, the BMC parses the request packet according to the IPMI protocol and sends the data to the CPLD or a register through the physical link managed by the BMC (such as the I2C link) to achieve the purpose of modifying the FRU status. The BMC verifies the execution result, and encapsulates the execution result and abnormal information according to the IPMI protocol and sends it to the IPMI service through the session; Step 4: The IPMI service receives the processing result sent by the BMC through the session, and returns the processing result to the operating system through the message queue; Step 5: After receiving the result from the message queue, the operating system displays the processing result through the command line module.
[0101] The baseboard management controller communication method provided in the embodiment of the present application continuously maintains the connection with the BMC through the IPMI service, instead of temporarily creating a connection each time it is used as the IPMITOOL tool does, which saves time for establishing and destroying connections; the health status of the BMC and the link that interacts with the BMC is maintained and detected by the IPMI service, so the process of interacting with the BMC can be monitored more clearly; the IPMI service is responsible for the interaction with the BMC, and the risks related to the interface that interacts with the BMC can be isolated in the service process, thereby ensuring the security of the operating system.
[0102] The device provided in the embodiment of the present application is described below. The device described below and the method described above can refer to each other.
[0103] Figure 3 is a schematic diagram of the structure of the baseboard management controller communication device provided by the present application, such as Figure 3 As shown, the baseboard management controller communication device 300 is used to run the intelligent platform management interface service in the operating system, including: A receiving module 310 is used to receive a first substrate information query request sent by an operating system; The communication module 320 is used to send a first substrate information query request to the substrate management controller based on the session connection and receive a first substrate information query response sent by the substrate management controller; A sending module 330, configured to send a first substrate information query response to an operating system; The session connection is a persistent connection established between the intelligent platform management interface service and the baseboard management controller.
[0104] The baseboard management controller communication device provided in the embodiment of the present application receives a first substrate information query request sent by the operating system by setting an intelligent platform management interface service in the operating system; based on the session connection, sends the first substrate information query request to the baseboard management controller and receives a first substrate information query response sent by the baseboard management controller; sends the first substrate information query response to the operating system; since the intelligent platform management interface service is a separately set service process, the service process can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, thereby improving the efficiency of obtaining substrate information; since the session connection is a continuous connection established between the intelligent platform management interface service and the baseboard management controller, the overhead and system delay of repeatedly establishing and disconnecting the connection are reduced, thereby improving the timeliness of substrate information acquisition; in addition, by separately setting the intelligent platform management interface service in the operating system, replacing third-party tools such as the intelligent platform management interface platform management tool, the risks related to the interface that interacts with the baseboard management controller can be isolated in the service process, thereby ensuring the safe operation of the operating system.
[0105] In some embodiments, the communication module is used to: Converting the first substrate information query request into a second substrate information query request based on the intelligent platform management interface protocol; Sending a second substrate information query request to the baseboard management controller based on the session connection and receiving a second substrate information query response sent by the baseboard management controller; The second substrate information query response is converted into a first substrate information query response based on the intelligent platform management interface protocol.
[0106] In some embodiments, the receiving module is used to: A first substrate information query request sent by the operating system is received based on an inter-process communication method.
[0107] In some embodiments, the receiving module is used to: Based on the inter-process communication mode, a first message queue and a second message queue are created; The first message queue is used by the operating system to send a first substrate information query request to the intelligent platform management interface service; the second message queue is used by the intelligent platform management interface service to send a first substrate information query response to the operating system.
[0108] In some embodiments, the communication module is further configured to: Based on the session connection, a link status query request is sent to the baseboard management controller according to a preset link query period; The connection status of the session connection is determined based on the link status query response sent by the baseboard management controller in each preset link query period.
[0109] In some embodiments, the communication module is further configured to: If no link status query response is received within the preset time period, the connection status of the session connection is determined to be an error.
[0110] In some embodiments, the communication module is further configured to: When the received multiple consecutive link status query responses are errors and the number of the multiple link status query responses is greater than a preset number, it is determined that the connection state of the session connection is an error.
[0111] In some embodiments, the communication module is further configured to: When the connection status of the session connection is an error, the session connection is destroyed and a new session connection is created; If the creation result of the new session connection fails or the creation time of the new session connection exceeds the preset creation time, network failure information is generated; The network fault information is sent to the operating system so that the operating system resets the network device communicating with the baseboard management controller.
[0112] In some embodiments, the communication module is further configured to: When the baseboard management controller fails to send the first baseboard information query response or the first baseboard information query response is abnormal and erroneous, generating baseboard management controller fault information; Sending baseboard management controller fault information to the operating system so that the operating system resets the baseboard management controller.
[0113] In some embodiments, the communication module is further configured to: When the server is powered on, a persistent connection is established with the baseboard management controller based on the network address and the preset port of the baseboard management controller.
[0114] In some embodiments, the device is further configured to: Receive hardware parameter configuration request sent by the operating system; Based on the session connection, a hardware parameter configuration request is sent to the baseboard management controller and a hardware parameter configuration response is received from the baseboard management controller; Sends a hardware parameter configuration response to the operating system.
[0115] Figure 4 It is a schematic diagram of the structure of the server provided by this application, such as Figure 4 As shown, the server 400 includes a central processing unit 410 and a baseboard management controller 420; the central processing unit 410 is used to run an intelligent platform management interface service in an operating system and execute the baseboard management controller communication method in the above embodiment.
[0116] The server provided in the embodiment of the present application has an intelligent platform management interface service which is a service process separately set up in the operating system. The service process can be responsible for managing and maintaining the communication between the operating system and the baseboard management controller, thereby improving the efficiency of obtaining baseboard information. Since the session connection is a continuous connection established between the intelligent platform management interface service and the baseboard management controller, the overhead and system delay of repeatedly establishing and disconnecting the connection are reduced, thereby improving the timeliness of obtaining baseboard information. In addition, by separately setting up the intelligent platform management interface service in the operating system, third-party tools such as the intelligent platform management interface platform management tool are replaced, and the risks related to the interface that interacts with the baseboard management controller can be isolated in the service process, thereby ensuring the safe operation of the operating system.
[0117] Figure 5 is a schematic diagram of the structure of the electronic device provided by this application, such as Figure 5 As shown, the electronic device may include: a processor (Processor) 510, a communication interface (Communications Interface) 520, a memory (Memory) 530 and a communication bus (Communications Bus) 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic command in the memory 530 to execute the method described in the above embodiment, for example: Receive a first substrate information query request sent by the operating system; based on the session connection, send the first substrate information query request to the substrate management controller and receive a first substrate information query response sent by the substrate management controller; send the first substrate information query response to the operating system; wherein the session connection is a persistent connection established between the intelligent platform management interface service and the substrate management controller.
[0118] In addition, the logical commands in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several commands to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0119] The processor in the electronic device provided in the embodiment of the present application can call the logic instructions in the memory to implement the above method. Its specific implementation method is consistent with the implementation method of the aforementioned method and can achieve the same beneficial effects, which will not be repeated here.
[0120] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the methods provided in the above embodiments are implemented.
[0121] Its specific implementation is consistent with the aforementioned method implementation and can achieve the same beneficial effects, so it will not be repeated here.
[0122] An embodiment of the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0123] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A baseboard management controller communication method, It is characterized in that An intelligent platform management interface service applied to an operating system, the method comprising: receiving a first substrate information query request sent by the operating system; Based on the session connection, sending the first substrate information query request to the substrate management controller and receiving the first substrate information query response sent by the substrate management controller; sending the first substrate information query response to the operating system; The session connection is a persistent connection established between the intelligent platform management interface service and the baseboard management controller.
2. The baseboard management controller communication method according to claim 1, It is characterized in that The sending the first substrate information query request to the substrate management controller based on the session connection and receiving the first substrate information query response sent by the substrate management controller includes: Converting the first substrate information query request into a second substrate information query request based on an intelligent platform management interface protocol; Sending the second substrate information query request to the substrate management controller based on the session connection and receiving a second substrate information query response sent by the substrate management controller; The second substrate information query response is converted into the first substrate information query response based on the intelligent platform management interface protocol.
3. The baseboard management controller communication method according to claim 1, It is characterized in that The receiving a first substrate information query request sent by the operating system includes: A first substrate information query request sent by the operating system is received based on an inter-process communication method.
4. The baseboard management controller communication method according to claim 3, It is characterized in that Before receiving the first substrate information query request sent by the operating system based on the inter-process communication method, the method further includes: Based on the inter-process communication mode, a first message queue and a second message queue are created; The first message queue is used by the operating system to send a first substrate information query request to the intelligent platform management interface service; the second message queue is used by the intelligent platform management interface service to send a first substrate information query response to the operating system.
5. The baseboard management controller communication method according to claim 1, It is characterized in that The method further comprises: Based on the session connection, sending a link status query request to the baseboard management controller according to a preset link query period; The connection state of the session connection is determined based on the link state query response sent by the baseboard management controller in each preset link query period.
6. The baseboard management controller communication method according to claim 5, It is characterized in that The determining the connection state of the session connection based on the link state query response sent by the baseboard management controller in each preset link query period includes: If the link status query response is not received within a preset time period, the connection status of the session connection is determined to be an error.
7. The baseboard management controller communication method according to claim 5, It is characterized in that The determining the connection state of the session connection based on the link state query response sent by the baseboard management controller in each preset link query period includes: When the received multiple consecutive link status query responses are errors and the number of the multiple link status query responses is greater than a preset number, it is determined that the connection state of the session connection is an error.
8. The baseboard management controller communication method according to claim 5, It is characterized in that After determining the connection status of the session connection based on the link status query response sent by the baseboard management controller in each preset link query period, the method further includes: When the connection state of the session connection is an error, destroying the session connection and recreating a new session connection; If the creation result of the new session connection is failure or the creation duration of the new session connection exceeds a preset creation duration, generating network failure information; The network fault information is sent to the operating system so that the operating system resets a network device that communicates with the baseboard management controller.
9. The baseboard management controller communication method according to claim 1, It is characterized in that After sending the first substrate information query request to the substrate management controller based on the session connection and receiving the first substrate information query response sent by the substrate management controller, the method further includes: generating baseboard management controller fault information when the baseboard management controller fails to send the first baseboard information query response or the first baseboard information query response is abnormal and erroneous; The baseboard management controller fault information is sent to the operating system so that the operating system resets the baseboard management controller.
10. The baseboard management controller communication method according to claim 1, It is characterized in that The session connection is established based on the following steps: When the server is powered on, a persistent connection is established with the baseboard management controller based on the network address and the preset port of the baseboard management controller.
11. The baseboard management controller communication method according to any one of claims 1 to 10, It is characterized in that The method further comprises: Receiving a hardware parameter configuration request sent by the operating system; Based on the session connection, sending the hardware parameter configuration request to the baseboard management controller and receiving the hardware parameter configuration response sent by the baseboard management controller; The hardware parameter configuration response is sent to the operating system.
12. A baseboard management controller communication device, It is characterized in that Running an intelligent platform management interface service in an operating system, the device comprises: A receiving module, configured to receive a first substrate information query request sent by the operating system; A communication module, configured to send the first substrate information query request to a substrate management controller and receive a first substrate information query response sent by the substrate management controller based on a session connection; A sending module, used for sending the first substrate information query response to the operating system; The session connection is a persistent connection established between the intelligent platform management interface service and the baseboard management controller.
13. A server, It is characterized in that Includes a central processing unit and a baseboard management controller; The central processing unit is used to run the intelligent platform management interface service in the operating system and execute the baseboard management controller communication method according to any one of claims 1 to 11.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the baseboard management controller communication method according to any one of claims 1 to 11 is implemented.
15. A non-transitory computer readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the baseboard management controller communication method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Communication fault recovery method and system, and related components
CN110413435A
Error reporting method and device of server, computer equipment and storage medium
CN115437819A
Session-based IPMI (Intelligent Platform Management Interface) communication method and system, storage medium and equipment
CN115988050A
Information acquisition method and device, equipment and storage medium
CN116382949A
Communication method and system of baseboard management controller, and related equipment
CN116521593A
