IPMI command processing method and device

By introducing a multi-subprocess parallel processing mechanism and a heartbeat signal monitoring mechanism in the IPMI command processing system, the performance bottleneck problem of the single-process processing model under high concurrent requests is solved, and the processing efficiency of IPMI commands and the response speed of the system are significantly improved.

CN119690618APending Publication Date: 2025-03-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411755739.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, a single process of processing IPMI commands is prone to bottlenecks when high concurrent requests are processed, resulting in a significant increase in command processing delay, which in turn leads to a low processing efficiency of IPMI commands.

Method used

By introducing a multi-child process parallel processing mechanism, IPMI command processing tasks are assigned to multiple subprocesses. Each subprocess independently processes IPMI commands, and monitors the subprocess status through timers and heartbeat signal mechanisms to ensure efficient execution of tasks.

Benefits of technology

It effectively solves the performance bottleneck problem of the single-process processing model under high concurrent requests, greatly improves the system's response speed and concurrent processing capabilities, and improves the processing efficiency of IPMI commands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690618A_ABST
    Figure CN119690618A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an IPMI command processing method and device, and the method comprises the steps: obtaining at least two IPMI commands from different sources; each IPMI command in the at least two IPMI commands is allocated to at least two IPMI processing sub-processes, and each IPMI processing sub-process in the at least two IPMI processing sub-processes is set to independently process the allocated IPMI command; and obtaining result data returned from the at least two IPMI processing sub-processes, the result data being data obtained after the IPMI processing sub-processes process the distributed IPMI command. By means of the method and device, the problem that the processing efficiency of the IPMI command is low is solved, and then the effect of improving the processing efficiency of the IPMI command is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method and device for processing an iPMI command. Background Art

[0002] In the prior art, a single-process IPMI command processing model is often used to process IPMI commands, but bottlenecks are prone to occur when processing high-concurrency requests, resulting in a significant increase in command processing delay, which in turn leads to the problem of low IPMI command processing efficiency. Therefore, there is a problem of low IPMI command processing efficiency.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method and device for processing an IPMI command, so as to at least solve the problem of low efficiency in processing IPMI commands in the related art.

[0005] According to an embodiment of the present application, a method for processing an IPMI command is provided, comprising:

[0006] Get at least two IPMI commands from different sources;

[0007] Assigning each of the at least two IPMI commands to at least two IPMI processing subprocesses, wherein each of the at least two IPMI processing subprocesses is configured to independently process the assigned IPMI commands;

[0008] Obtain result data returned from the at least two IPMI processing sub-processes, wherein the result data is data obtained after the IPMI processing sub-process processes the assigned IPMI command.

[0009] According to another embodiment of the present application, there is provided an IPMI command processing device, including:

[0010] A first acquisition unit, configured to acquire at least two IPMI commands from different sources;

[0011] An allocating unit, configured to allocate each of the at least two IPMI commands to at least two IPMI processing subprocesses, wherein each of the at least two IPMI processing subprocesses is configured to independently process the allocated IPMI commands;

[0012] The second acquisition unit is used to acquire result data returned from the at least two IPMI processing sub-processes, wherein the result data is data obtained after the IPMI processing sub-process processes the assigned IPMI command.

[0013] In an exemplary embodiment, the allocation unit includes: an allocation module for allocating the above-mentioned IPMI commands to the at least two IPMI processing sub-processes in the idle state when at least two IPMI processing sub-processes in the idle state are acquired.

[0014] In an exemplary embodiment, the allocation module includes: a checking submodule, which is used to periodically check the time when each of the at least two IPMI commands is sent to the at least two IPMI processing subprocesses through a timer set in the IPMI server process after each of the at least two IPMI commands is allocated to the at least two IPMI processing subprocesses, wherein the IPMI processing subprocess will periodically send the heartbeat signal to the IPMI server process when executing the processing task; a first marking submodule, which is used to mark the first subprocess among the at least two IPMI processing subprocesses as a suspected abnormality if the first subprocess does not send the heartbeat signal for more than a predetermined time threshold; a restart submodule, which is used to restart the subprocess marked as the suspected abnormality; and a second marking submodule, which is used to mark the restarted subprocess as the idle state when receiving the heartbeat signal sent by the restarted subprocess.

[0015] In an exemplary embodiment, the restart submodule includes: an allocating subunit, which is used to reallocate the IPMi command allocated to the sub-process suspected of being abnormal to the sub-process in the idle state.

[0016] In an exemplary embodiment, the allocation module includes: an allocation submodule, which is used to reallocate the first IPMI command to the subprocess in the idle state after allocating each of the at least two IPMI commands to at least two IPMI processing subprocesses, if the time length for the second subprocess in the at least two IPMI processing subprocesses to process the first IPMI command is greater than or equal to a first preset threshold.

[0017] In an exemplary embodiment, the allocation unit further includes: a marking module for marking the second IPMI command as an abnormal state after the second IPMI command among the at least two IPMI commands is allocated to the IPMI processing sub-process and is in an abnormal state of command processing, and the number of retries of command processing is greater than or equal to a second preset threshold.

[0018] In an exemplary embodiment, the first acquisition unit includes: a first acquisition module, used to acquire the system load of the IPMI server process, wherein the IPMI server process is used to receive IPMI commands from different sources; a first setting module, used to set the number of the IPMI processing sub-processes to a first number corresponding to the first load interval when the first cumulative time of the system load being in the first load interval is greater than or equal to a third preset threshold, wherein the first load interval is an interval between a first load value and a second load value, the load value is used to measure the load condition of the system load, and the first load value is less than the second load value; a second setting module, used to set the number of the IPMI processing sub-processes to a first number corresponding to the first load interval when the second cumulative time of the system load being in the second load interval is greater than or equal to a third preset threshold. When the first cumulative duration is less than the third preset threshold, the second cumulative duration is less than the third preset threshold, and the sum of the first cumulative duration and the second cumulative duration is greater than or equal to the third preset threshold, the number of the IPMI processing sub-processes is set to the third number corresponding to the second load interval, wherein the second load interval is an interval between the third load value and the fourth load value, the second load value is less than the third load value, the third load value is less than the fourth load value, and the second number is greater than the first number; a third setting module is used to set the number of the IPMI processing sub-processes to the third number when the first cumulative duration is less than the third preset threshold, the second cumulative duration is less than the third preset threshold, and the sum of the first cumulative duration and the second cumulative duration is greater than or equal to the third preset threshold, wherein the third number is less than the second number but greater than the first number.

[0019] In an exemplary embodiment, the above-mentioned first acquisition unit also includes: a second acquisition module, used to obtain IPMI commands from at least two channels, wherein the above-mentioned at least two channels include at least two of the following: a LAN channel, an IPMB channel, a KCS channel, and a USB channel; the above-mentioned second acquisition unit includes: a return module, used to return the above-mentioned result data to the service processes of the above-mentioned at least two channels respectively.

[0020] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.

[0021] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0022] Through this application, by introducing a multi-sub-process parallel processing mechanism, the IPMI command processing task is distributed to multiple sub-processes, and each sub-process independently processes the IPMI command, which effectively solves the performance bottleneck problem of the single-process processing model under high concurrent requests, greatly improves the system's response speed and concurrent processing capabilities, and can solve the problem of low IPMI command processing efficiency, thereby achieving the technical effect of improving the IPMI command processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a schematic diagram of an application environment of the method for processing an IPMI command according to an embodiment of the present application;

[0024] Figure 2 is a flowchart of a method for processing an IPMI command according to an embodiment of the present application;

[0025] Figure 3 is a schematic diagram of a method for processing an IPMI command according to an embodiment of the present application;

[0026] Figure 4 is a schematic diagram of a method for processing an IPMI command according to an embodiment of the present application;

[0027] Figure 5 It is a structural block diagram of an IPMI command processing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of an IPMI command processing method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the processing method of the IPMI command in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF)

[0033] Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0034] In this embodiment, a method for processing an IPMI command is provided. Figure 2 is a flowchart of a method for processing an IPMI command according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0035] Step S202, obtaining at least two IPMI commands from different sources;

[0036] In an exemplary embodiment, different sources may be used, but are not limited to, to indicate that the acquired IMPI commands are from different channels.

[0037] IPMI commands may refer to, but are not limited to, a series of commands used under the IPM protocol, and may be used to manage and monitor servers, network devices, equipment, or computer hardware from a remote management system, but are not limited to.

[0038] To further illustrate, common remote management through IPMI commands can be, but is not limited to: using IPMI commands to start, shut down, and restart the power of remote devices; monitoring sensors through IPMI commands to obtain sensor data of the device, such as temperature, voltage, fan speed, etc.; retrieving the device's event log through IPMI commands to view the device's historical event records; reading and managing the device's FRU information including the model and serial number of hardware components through IPMI commands; and performing remote control operations such as remote screen output through IPMI commands.

[0039] Step S204, assigning each of the at least two IPMI commands to at least two IPMI processing subprocesses, wherein each of the at least two IPMI processing subprocesses is configured to independently process the assigned IPMI command;

[0040] In an exemplary embodiment, the IPMI processing subprocess may be, but is not limited to, a subprocess that can independently process IPMI commands, and may be, but is not limited to, responsible for communicating with an IPMI hardware module and executing IPMI commands.

[0041] IPMI is configured to independently process the assigned IPMI commands, and may, but is not limited to, independently process the IPMI commands without the help of other processes, and may, but is not limited to, not be affected by other processes when processing the IPMI commands.

[0042] Each IPMI processing subprocess may, but is not limited to, utilize the DBus process communication mechanism to perform data interaction to ensure efficient execution of IPMI commands.

[0043] It should be noted that separating the IPMI processing subprocess means ensuring that it runs in an environment independent of other processes. This can reduce interference and conflicts with other processes and improve the stability and reliability of IPMI functions. It also means that the IPMI processing subprocess can have its own resource allocation and priority settings, enabling it to achieve better performance and response time, and optimizing the execution efficiency of the IPMI processing subprocess.

[0044] Step S206, obtaining result data returned from at least two IPMI processing sub-processes, wherein the result data is data obtained after the IPMI processing sub-process processes the assigned IPMI command.

[0045] In an exemplary embodiment, the result data returned by the IPMI processing sub-process may be, but is not limited to, corresponding result data generated by the IPMI processing sub-process after the IPMI processing sub-process executes the IPMI command.

[0046] It should be noted that the result data returned by the IPMI processing sub-process may, but is not limited to, depend on the type of IPMI operation and command executed. Under normal circumstances, it includes at least one of the following information: operation execution status (execution status of the operation, such as success, failure, etc.), operation result information (detailed information about the operation result, such as sensor data, system configuration parameters, etc.), error information (descriptive information about the error or failure), and other additional information (such as log information, alarm information, etc.).

[0047] Through the above steps, a multi-sub-process parallel processing mechanism is introduced, and the IPMI command processing task is distributed to multiple sub-processes. Each sub-process independently processes the IPMI command, which greatly improves the response speed and concurrent processing capability of the system, and effectively solves the performance bottleneck problem of the single-process processing model under high concurrent requests, thereby solving the problem of low processing efficiency of IPMI commands, thereby achieving the technical purpose of fully utilizing the multi-core processor and parallel computing capabilities of the server, and realizing the technical effect of improving the processing efficiency of IPMI commands.

[0048] As an optional solution, each of the at least two IPMI commands is assigned to at least two IPMI processing sub-processes, including:

[0049] When at least two IPMI processing sub-processes in an idle state are obtained, each IPMI command is assigned to the at least two IPMI processing sub-processes in an idle state.

[0050] In an exemplary embodiment, the idle state may, but is not limited to, refer to a system, device or process being idle or idle, with no tasks or work being executed. For a process, in the idle state, the process will wait for external events to occur, such as the assignment of tasks, etc. Once a new task is assigned, the process will enter the execution state and start the corresponding task.

[0051] An IPMI sub-process in an idle state may refer to, but is not limited to, an IPMI sub-process that is not currently executing any IPMI-related operation, has no IPMI command being processed, and has not received an IPMI command assigned by a server process.

[0052] It should be noted that if there are no idle IPMI idle sub-processes when allocating IPMI commands to idle IPMI processing sub-processes, the IPMI command will be allocated to the sub-process that executes the IPMI command the fastest or the sub-process with the least number of IPMI commands to be executed to ensure that the IPMI command can be executed.

[0053] Through the embodiments of the present application, when at least two IPMI processing sub-processes in an idle state are obtained, each IPMI command is assigned to the at least two IPMI processing sub-processes in an idle state. By preferentially assigning IPMI commands to the idle IPMI processing sub-processes, the utilization rate of the IPMI processing sub-processes is improved.

[0054] As an optional solution, after allocating each of the at least two IPMI commands to at least two IPMI processing sub-processes, the method further includes:

[0055] S1-1, through the timer set in the IPMI server process, regularly check the time when each IPMI processing sub-process sends a heartbeat signal, wherein the IPMI processing sub-process will regularly send a heartbeat signal to the IPMI server process when executing a processing task;

[0056] S1-2, if a first subprocess among the at least two IPMI processing subprocesses fails to send a heartbeat signal for more than a predetermined time threshold, the first subprocess is marked as suspected abnormal;

[0057] S1-3, restart the subprocess marked as suspected abnormal;

[0058] S1-4, when a heartbeat signal sent by the restarted sub-process is received, the restarted sub-process is marked as idle.

[0059] In an exemplary embodiment, the timer set in the IPMI server process may be, but is not limited to, a timer set in the IPMI server process, and is used to check the time when each IPMI processing sub-process sends a heartbeat signal at a set time interval or time point.

[0060] A heartbeat signal may refer to, but is not limited to, a signal sent periodically in a computer system, network communication, or process for detecting a connection status and ensuring normal communication.

[0061] It should be noted that in a multi-process environment, different processes may need to communicate with each other or work together. In order to ensure that the communication channel between processes is normal, the survival status of the process can be detected by sending heartbeat signals regularly. Under normal circumstances, a process will periodically send heartbeat signals to other processes or the main process to indicate that it is still alive. After receiving the heartbeat signal, other processes can confirm the survival status of the sending process and maintain the communication connection.

[0062] In an exemplary embodiment, the first sub-process of at least two IPMI processing sub-processes does not send a heartbeat signal for more than a predetermined time threshold, which may be, but is not limited to, the IPMI processing sub-process does not send a heartbeat signal to the main process (server process) within a predetermined time interval or at a specific time point.

[0063] Suspected abnormality may include, but is not limited to, a situation in which an IPMI processing subprocess may be abnormal but has not yet been confirmed or verified.

[0064] It should be noted that the IPMI server process monitors the activity status of each sub-process by regularly receiving heartbeat signals from each IPMI processing sub-process. If a sub-process does not send a heartbeat signal within the predetermined time, the system may consider that the sub-process may be abnormal.

[0065] In an exemplary embodiment, restarting the sub-process marked as suspected abnormality may be performed by, but is not limited to, closing the current sub-process suspected abnormality and restarting the sub-process suspected abnormality.

[0066] In an exemplary embodiment, receiving a heartbeat signal sent by a restarted sub-process may, but is not limited to, indicate that after restarting a suspected abnormal sub-process, the server process receives the heartbeat signal of the restarted sub-process, which may, but is not limited to, indicate that the restarted sub-process has returned to normal and can be used to process IPMI commands.

[0067] It should be noted that when a child process successfully restarts after a restart operation and sends a heartbeat signal, it means that the system believes that the child process has resumed normal operation, and because the child process does not have any running tasks or tasks to be executed after the restart, the system will mark the child process as idle, indicating that the restarted child process has resumed normal and can accept and execute IPMI commands.

[0068] Through the embodiments of the present application, by periodically detecting the heartbeat signals of each sub-process, if the heartbeat signal sent by a sub-process is not received within a certain period of time or at a specific time point, it is considered that the sub-process may be abnormal and needs to be restarted. If the heartbeat signal of the sub-process is received again after the restart, it is considered that the sub-process has returned to normal and is marked as idle, indicating that the sub-process can accept and process IPMI commands, so as to improve the execution efficiency of IPMI processing of IPMI commands of sub-processes.

[0069] As an optional solution, restart the subprocess marked as suspected abnormal, including:

[0070] The IPMI commands assigned to the suspected abnormal sub-process are reallocated to the idle sub-process.

[0071] It should be noted that after a sub-process is marked as suspected abnormal, it means that the sub-process may have lost the ability to process IPMI commands and cannot normally execute the IPMI commands being processed when the abnormality occurs and the IPMI commands to be processed. The server system can then reallocate these unsuccessfully executed IPMI commands to the idle sub-process to avoid IPMI command execution failure or delay due to problems with the suspected abnormal sub-process.

[0072] Through the embodiments of the present application, after a sub-process is suspected of being abnormal, its unexecuted IPMI commands are allocated to other sub-processes in an idle state to ensure that the unexecuted IPMI commands of these sub-processes suspected of being abnormal can be executed normally.

[0073] As an optional embodiment, after allocating each of the at least two IPMI commands to the at least two IPMI processing sub-processes, the method further includes:

[0074] When the duration of processing the first IPMI command by the second sub-process of the at least two IPMI processing sub-processes is greater than or equal to a first preset threshold, the first IPMI command is reallocated to a sub-process in an idle state.

[0075] It should be noted that when there are multiple IPMI processing sub-processes in the system, and the sub-process takes too long to execute the first IPMI command, exceeding the preset threshold, it means that the sub-process is suspected to be abnormal, resulting in the failure of normal execution of this command. In order to ensure that the IPMI command can be executed in time and to ensure the stability of the server process, the first IPMI command needs to be reallocated to other idle sub-processes, so as to avoid wasting a long time on the sub-process that originally executed the first IPMI command and ensure that the IPMI command can be executed in time.

[0076] Through the embodiments of the present application, when the time taken by the second sub-process in at least two IPMI processing sub-processes to process the first IPMI command is greater than or equal to a first preset threshold, the first IPMI command is reallocated to a sub-process in an idle state, and the IPMI command that takes too long to execute is promptly allocated to other idle sub-processes, thereby ensuring that the IPMI command can be executed in a timely manner.

[0077] As an optional embodiment, after allocating each of the at least two IPMI commands to the at least two IPMI processing sub-processes, the method further includes:

[0078] After the second IPMI command among the at least two IPMI commands is assigned to the IPMI processing subprocess, if the second IPMI command is in a command processing abnormal state and the number of command processing retries is greater than or equal to a second preset threshold, the second IPMI command is marked as an abnormal state.

[0079] In an exemplary embodiment, the command processing exception may refer to, but is not limited to, an exception or error condition occurring during the execution of the command by the child process, resulting in the command being unable to be executed normally, and may also refer to, but is not limited to, the execution result of the command not meeting expectations.

[0080] In an exemplary embodiment, if the second IPMI command is in a command abnormal state, but the number of retries of command processing is less than a second preset threshold, the second IPMI can be assigned to other IPMI processing subprocesses in an idle state, and the second IPMI command can be re-executed.

[0081] To further illustrate, when the IPMI processing subprocess crashes or exits abnormally while processing an IPMI command, the command cannot be continued or the execution result is unreliable; when the IPMI subprocess is blocked due to deadlock, resource competition, etc. when processing an IPMI command, the command execution fails or the execution results are erroneous; the IPMI processing subprocess consumes too many system resources while processing a certain IPMI command, resulting in insufficient system resources or excessive load, thereby affecting the execution of other IPMI commands.

[0082] It should be noted that if the second IPMI command is in a command processing abnormal state after being assigned to the IPMI processing subprocess, and the command processing retry is greater than or equal to the second preset threshold at this time, it means that the IPMI command has been executed multiple times and all failed. Therefore, the execution failure is likely not due to the abnormality of the IPMI processing subprocess, but because the IPMI command itself is abnormal, and it needs to be marked as an abnormal command. The IPMI command marked as an abnormal state will trigger the corresponding error handling mechanism, such as recording an error log, sending an alarm notification, stopping the execution of the IPMI command, etc., so as to ensure that the server process and other subprocesses will not be affected.

[0083] Through the embodiments of the present application, after the second IPMI command among at least two IPMI commands is assigned to the IPMI processing sub-process, it is in a command processing abnormal state, and the number of retries of the command processing is greater than or equal to a second preset threshold value. The second IPMI command is marked as an abnormal state and the execution of the IPMI command is stopped, thereby ensuring that the server process and other sub-processes are not affected.

[0084] As an optional solution, before obtaining at least two IPMI commands from different sources, the method further includes:

[0085] S2-1, obtaining a system load of an IPMI server process, wherein the IPMI server process is used to receive IPMI commands from different sources;

[0086] S2-2, when the first accumulated time length of the system load in the first load interval is greater than or equal to the third preset threshold, setting the number of IPMI processing sub-processes to a first number corresponding to the first load interval, wherein the first load interval is an interval between a first load value and a second load value, the load value is used to measure the load condition of the system load, and the first load value is less than the second load value;

[0087] S2-3, when the second accumulated time length of the system load in the second load interval is greater than or equal to the third preset threshold, setting the number of IPMI processing subprocesses to a second number corresponding to the second load interval, wherein the second load interval is an interval between the third load value and the fourth load value, the second load value is less than the third load value, the third load value is less than the fourth load value, and the second number is greater than the first number;

[0088] S2-4, when the first cumulative duration is less than the third preset threshold, the second cumulative duration is less than the third preset threshold, and the sum of the first cumulative duration and the second cumulative duration is greater than or equal to the third preset threshold, the number of IPMI processing sub-processes is set to a third number, wherein the third number is less than the second number but greater than the first number.

[0089] In an exemplary embodiment, the load of the IPMI server process may refer to, but is not limited to, the occupation of system resources by the IPMI server process currently running in the system, and may refer to, but is not limited to, the average number of processes that can be run in the system per unit time.

[0090] It should be noted that if a large number of IPMI commands need to be processed in the system at the same time, and the concurrent processing capability of the IPMI server process is limited, the system load will increase, which may affect the execution speed and quality of the IPMI commands; or, if the hardware resources are not sufficient to meet the needs of the IPMI server process, the system load will increase, which may cause performance degradation or resource competition.

[0091] In an exemplary embodiment, the first load interval may be, but is not limited to, an interval range divided according to the system load value, and the interval endpoints are respectively the first load value and the second load value, and the first load value is smaller than the second load value.

[0092] When the cumulative time that the system load is in the first load interval is greater than or equal to the third preset threshold, it means that the system load occupied by the server process is in the range of the first load interval for a long time. At this time, the IPMI processing sub-process needs to be set to the first number that matches the occupied system load.

[0093] In an exemplary embodiment, the second load interval can be but is not limited to an interval range divided according to the system load value, and the interval endpoints are the third load value and the fourth load value, respectively, the third load value is less than the fourth load value, and the second load value is less than the third load value, and the second number is greater than the first number.

[0094] When the cumulative time that the system load is in the second load interval is greater than or equal to the third preset threshold, it means that the system load occupied by the server process is in the range of the second load interval for a long time, and it can be seen from the fact that the second load value is less than the third load value that the average load in the second load interval is greater than the average load in the first load interval. At this time, it is necessary to set the IPMI processing sub-process to a second number that matches the occupied system load. Correspondingly, when the average load in the second load interval is greater than the average load in the first load interval, the set second number should also be greater than the first number.

[0095] In an exemplary embodiment, when the first cumulative duration is less than a third preset threshold, the second cumulative duration is less than the third preset threshold, and the sum of the first cumulative duration and the second cumulative duration is greater than or equal to the third preset threshold, the number of IPMI processing sub-processes is set to a third number, wherein the third number is less than the second number but greater than the first number.

[0096] When the system load is in the first load interval and the second load interval for a period of time, and neither of them meets the third preset threshold, it means that the average load of the system is close to between the average load of the first load interval and the average load of the second load interval. In this case, the IPMI processing sub-process is set to a third number that matches the occupied system load. The third number should also be greater than the first number and less than the second number.

[0097] According to the embodiments of the present application, the number of IPMI processing sub-processes is set accordingly according to the system load occupied by the server process to adapt to the system load occupied by the server.

[0098] As an optional solution, the method for processing the above IPMI command further includes:

[0099] S3-1, obtaining at least two IPMi commands from different sources, including: obtaining IPMI commands from at least two channels, wherein the at least two channels include at least two of the following: a LAN channel, an IPMB channel, a KCS channel, and a USB channel;

[0100] S3-2, after obtaining result data returned from at least two IPMI processing sub-processes, the method further includes: returning the result data to the service processes of at least two channels respectively.

[0101] In an exemplary embodiment, the LAN channel may, but is not limited to, refer to a channel for communicating with an IPMI device via a network connection; the IPMB channel may, but is not limited to, refer to a channel for communicating with an IPMI device via an IPMB bus, and the IPMB bus may, but is not limited to, be a serial bus protocol for managing platform devices; the KCS channel may, but is not limited to, refer to a channel for communicating with an IPMI device via a keyboard controller style interface; the USB channel may, but is not limited to, refer to a channel for communicating with an IPMI device via a USB interface.

[0102] Through the embodiments of the present application, after obtaining IPMI commands of at least two channels and executing the commands through the IPMI processing sub-process, the execution result data is returned to the service processes corresponding to the original channels respectively, so that the administrator can better manage the execution of IPMI commands and the execution results.

[0103] As an optional solution, for ease of understanding, the IPMI command processing method is applied to the scenario of the intelligent platform management interface.

[0104] As the scale of data centers continues to expand and the complexity of server hardware increases, the demand for the Intelligent Platform Management Interface (IPMI) is also growing. As an important standard for server management, IPMI not only requires the ability to efficiently and stably process commands from a variety of different sources (such as LAN, KCS, IPMB, USB, SOL, etc.), but also requires strong fault recovery capabilities and high concurrent processing capabilities to meet the challenges faced by modern data centers.

[0105] To solve the problems of processing delay and single process failure in the existing system. By introducing an independent IPMI server process, the architecture can effectively receive and distribute commands from different sources, including LAN, KCS, IPMB, USB, and SOL. The server process acts as a central scheduler, flexibly assigning commands to multiple IPMI processing sub-processes. The number of these sub-processes can be configured according to demand to adapt to different application scenarios and system loads. Each sub-process independently processes the assigned commands and uses the DBus process communication mechanism for data exchange to ensure efficient command execution.

[0106] In addition, the design decouples the IPMI command processing logic from sensor data collection, so that even if a sub-process crashes abnormally, it will only affect the response of the current command without causing loss of the entire system function.

[0107] In order to enhance the stability and fault tolerance of the system, the IPMI server process also has an automatic fault detection and restart mechanism, which can monitor the status of sub-processes in real time and quickly restart when an abnormality occurs to prevent service interruption.

[0108] At the same time, the system introduces a retry counter for each command, allowing the command to be retried between different subprocesses, thereby further ensuring that the command can be successfully executed in the end.

[0109] This design not only reduces internal coupling, but also significantly improves the reliability and performance of the system, adapting to the needs of modern high-concurrency environments.

[0110] In an exemplary embodiment, the optional Figure 3 As shown in the figure, the IPMI command request is triggered externally through channels such as LAN, IPMB, KCS, and USB. The service process of each channel parses the command and forwards it to the IPMI service processing main process. In the IPMI main process, the currently idle IPMI sub-process will be found, and the command data will be sent to the IPMI sub-process. The IPMI sub-process accesses the specific BMC business data to obtain or set related data. After processing, the data is returned to the IPMI processing main process. The IPMI main process returns the data to the LAN, IPMB, KCS, USB and other channel service processes based on the return result status when the processing is successful. Each service process returns data to the external request module. This means that an IPMI command processing is completed.

[0111] In an exemplary embodiment, the optional Figure 4 As shown, the ipmi processing main process creates ipmi command processing subprocesses through the configured number of subprocesses, and numbers each ipmi command processing subprocess. Each ipmi processing subprocess will register a DBus method ipmiCmdSubprocess that processes a specific ipmi command.

[0112] The ipmi processing main process registers the ipmiCmdProcess method. When the external module sends the ipmi command through channels such as kcs, lan, ipmb, and usb, it actually calls the ipmiCmdProcess method through DBus to execute the ipmi command;

[0113] In the ipmiCmdProcess method, the current state of the ipmi processing subprocess will be saved in two queues with the ipmi subprocess number: the idle queue (currently not processing ipmi commands) and the busy queue (currently processing ipmi commands). When there is an ipmi command that needs to be processed, the number of the ipmi processing subprocess will be found in the idle queue. Call the DBus method ipmiCmdSubprocess of the corresponding ipmi subprocess to execute the ipmi command processing flow. And set the state of the subprocess to busy;

[0114] In the ipmiCmdSubprocess of the ipmi subprocess, the ipmi processing subprocess is decoupled from business logic such as sensor data acquisition and processing. All supported IPMI commands will be registered during the initialization phase, and the number of each IPMI command will be bound to a specific execution process function. In the execution process function of each IPMI command, the relevant sensor module data is obtained or set through the DBus communication method. When there are multiple ipmi commands of channels LAN, KCS, IPMB, USB, SOL, etc. accessed at the same time, if the sensor data to be obtained or set is not in the same module, the current multiple commands can be processed in parallel to increase the access rate of the ipmi command. If the sensor data to be obtained or set is in a module, the data will be mutually exclusive processed inside the module, and only one ipmi command will access and process the data at the same time. Other commands need to wait for the command to be processed before continuing to access the data. Ensure data consistency. When the command is processed, the processing result data is returned to the ipmi main process;

[0115] Monitoring and management mechanism in ipmi subprocess:

[0116] Use the heartbeat mechanism: When each child process executes ipmiCmdSubprocess, it uses DBus communication to periodically send heartbeat signals to the main process. The main process sets a timer to periodically check the heartbeat time of each child process. If a child process does not receive a heartbeat after a predetermined period of time, it is considered that the child process may have crashed or is abnormal. The child process will be controlled to restart, and after the main process receives the heartbeat signal sent by the child process, the child process will be set to idle state;

[0117] Capture subprocess exceptions: In the subprocess, use the exception handling mechanism to capture possible exceptions and feed back the exception information to the main process. After receiving the exception feedback, the main process records the crash, chooses to restart the subprocess and resends the relevant commands to other subprocesses for further processing;

[0118] Timeout retry mechanism: In the monitoring logic of the main process, if a subprocess is found to have timed out while processing a command, the command is put back into the queue to be processed, and other idle subprocesses are selected for retry;

[0119] Determine command processing exception: add a retry counter for each command. If the command reaches the maximum number of retries and still fails, it is considered a command processing exception.

[0120] The ipmi main process parses the processing result returned by the ipmi subprocess, parses the command successfully, and returns the data to the corresponding channel source. This ipmi command data ends. Set the state of the subprocess to idle.

[0121] By adopting a multi-process parallel processing architecture, the system's processing capability and response speed in high-concurrency scenarios are significantly improved. At the same time, the business logic is modularized, especially the IPMI command processing logic is decoupled from other business logic (such as sensor data collection), which reduces the coupling within the system and improves the independence and maintainability of each module. This design not only enhances the scalability of the system, but also enables the system to maintain overall stability when facing partial module failures.

[0122] It also integrates an automatic fault detection and restart mechanism, monitors the running status of subprocesses in real time, and quickly performs fault recovery operations when an abnormality is found, thereby avoiding service interruptions and enhancing the stability and fault tolerance of the system. In addition, in order to ensure the accuracy and reliability of data, the system also introduces a command retry mechanism and timeout processing, as well as a mutual exclusion processing mechanism within the module to ensure that data consistency can be maintained when multiple commands access the same data at the same time. This design not only improves the reliability of command execution, but also ensures the integrity and accuracy of system data.

[0123] Through the embodiments of the present application, by introducing a multi-process parallel processing mechanism, the IPMI command processing task is dispersed into multiple sub-processes, which effectively solves the performance bottleneck problem of the traditional single-thread or single-process processing model under high concurrent requests. Each sub-process processes commands independently, which greatly improves the response speed and concurrent processing capability of the system; the IPMI command processing logic is decoupled from other business logics such as sensor data acquisition, which reduces the coupling within the system and improves the independence and maintainability between various modules. Even if a sub-process crashes abnormally, it will not affect other functions of the entire system, thereby enhancing the stability of the system. The introduction of an automatic fault detection and restart mechanism can monitor the status of the sub-process in real time, and quickly restart when an abnormality occurs to prevent service interruption, further improving the fault tolerance of the system; the number of sub-processes can be flexibly configured according to actual needs to adapt to different application scenarios and system loads. This design enables the system to easily expand processing resources when facing server management requirements of different scales, thereby improving the scalability of the system.

[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0125] In this embodiment, a device for processing IPMI commands is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made are omitted. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0126] Figure 5 is a structural block diagram of an IPMI command processing device according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0127] A first acquisition unit 502 is used to acquire at least two IPMI commands from different sources;

[0128] The allocating unit 504 is used to allocate each iPMi command of the at least two iPMi commands to at least two IPMI processing sub-processes, wherein each IPMI processing sub-process of the at least two IPMI processing sub-processes is configured to independently process the allocated IPMi commands;

[0129] The second acquisition unit 506 is used to acquire result data returned from at least two IPMI processing sub-processes, wherein the result data is data obtained after the IPMI processing sub-process processes the assigned IPMI command.

[0130] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0131] In an exemplary embodiment, the allocating unit 504 includes: an allocating module, which is used to allocate each IPMI command to the at least two IPMI processing sub-processes in the idle state when at least two IPMI processing sub-processes in the idle state are acquired.

[0132] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0133] In an exemplary embodiment, the allocation module includes: a checking submodule, which is used to periodically check the time when each IPMI processing subprocess sends a heartbeat signal through a timer set in the IPMI server process after each IPMI command in at least two IPMI commands is allocated to at least two IPMI processing subprocesses, wherein the IPMI processing subprocess will periodically send a heartbeat signal to the IPMI server process when executing a processing task; a first marking submodule, which is used to mark the first subprocess in at least two IPMI processing subprocesses as suspected abnormal if the first subprocess does not send a heartbeat signal for more than a predetermined time threshold; a restart submodule, which is used to restart the subprocess marked as suspected abnormal; and a second marking submodule, which is used to mark the restarted subprocess as idle when a heartbeat signal sent by the restarted subprocess is received.

[0134] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0135] In an exemplary embodiment, the restart submodule includes: an allocating subunit, which is used to reallocate the IPMI command allocated to the sub-process suspected of being abnormal to the sub-process in an idle state.

[0136] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0137] In an exemplary embodiment, the allocation module includes: an allocation submodule, which is used to reallocate the first IPMI command to a subprocess in an idle state after allocating each of the at least two IPMI commands to the at least two IPMI processing subprocesses, if the time length for the second subprocess of the at least two IPMI processing subprocesses to process the first IPMI command is greater than or equal to a first preset threshold.

[0138] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0139] In an exemplary embodiment, the allocation unit 504 also includes: a marking module, which is used to mark the second IPMI command as an abnormal state after the second IPMI command among the at least two IPMI commands is allocated to the IPMi processing sub-process and is in an abnormal state of command processing, and the number of retries of the command processing is greater than or equal to a second preset threshold.

[0140] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0141] In an exemplary embodiment, the first acquisition unit 502 includes: a first acquisition module, which is used to acquire the system load of the IPMI server process, wherein the IPMI server process is used to receive IPMI commands from different sources; a first setting module, which is used to set the number of IPMI processing subprocesses to a first number corresponding to the first load interval when the first accumulated time of the system load in the first load interval is greater than or equal to a third preset threshold, wherein the first load interval is an interval between a first load value and a second load value, the load value is used to measure the load condition of the system load, and the first load value is less than the second load value; a second setting module, which is used to set the number of IPMI processing subprocesses to a first number corresponding to the first load interval when the system load is in the second load interval When the second cumulative duration of the interval is greater than or equal to the third preset threshold, the number of IPMI processing sub-processes is set to the second number corresponding to the second load interval, wherein the second load interval is the interval between the third load value and the fourth load value, the second load value is less than the third load value, the third load value is less than the fourth load value, and the second number is greater than the first number; a third setting module is used to set the number of IPMI processing sub-processes to the third number when the first cumulative duration is less than the third preset threshold, the second cumulative duration is less than the third preset threshold, and the sum of the first cumulative duration and the second cumulative duration is greater than or equal to the third preset threshold, wherein the third number is less than the second number but greater than the first number.

[0142] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0143] In an exemplary embodiment, the first acquisition unit 502 also includes: a second acquisition module, used to obtain IPMI commands from at least two channels, wherein the at least two channels include at least two of the following: a LAN channel, an IPMB channel, a KCS channel, and a USB channel; the second acquisition unit 506 includes: a return module, used to return the result data to the service processes of the at least two channels respectively.

[0144] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing IPMI commands, which will not be described in detail in this example.

[0145] It should be noted that the above-mentioned virtual devices (modules, units, sub-modules, sub-units, components, etc.) can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above-mentioned virtual devices are all located in the same processor; or, the above-mentioned virtual devices are located in different processors in any combination.

[0146] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0147] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0148] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0149] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0150] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0151] Obviously, those skilled in the art should understand that the above-mentioned virtual devices or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0152] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for processing an IPMI command, characterized in that: include: Get at least two IPMI commands from different sources; Allocating each of the at least two IPMI commands to at least two IPMI processing subprocesses, wherein each of the at least two IPMI processing subprocesses is configured to independently process the allocated IPMI commands; Obtain result data returned from the at least two IPMI processing sub-processes, wherein the result data is data obtained after the IPMI processing sub-process processes the assigned IPMI command.

2. The method according to claim 1, characterized in that The at least two IPMI commands are each IPMI commands are assigned to at least two IPMI processing subprocesses, including: When at least two IPMI processing sub-processes in an idle state are obtained, the respective IPMI commands are allocated to the at least two IPMI processing sub-processes in an idle state.

3. The method according to claim 2, characterized in that In each of the at least two IPMI commands After the IPMI command is assigned to at least two IPMI processing sub-processes, the method further includes: By means of a timer set in the IPMI server process, the time at which each IPMI processing subprocess sends a heartbeat signal is regularly checked, wherein the IPMI processing subprocess periodically sends the heartbeat signal to the IPMI server process when executing a processing task; If a first subprocess in the at least two IPMI processing subprocesses fails to send the heartbeat signal for more than a predetermined time threshold, marking the first subprocess as suspected abnormality; Restarting the subprocess marked as the suspected abnormality; When the heartbeat signal sent by the restarted sub-process is received, the restarted sub-process is marked as the idle state.

4. The method according to claim 3, characterized in that The restarting of the subprocess marked as the suspected abnormality includes: The IPMI command allocated to the sub-process suspected of being abnormal is reallocated to the sub-process in the idle state.

5. The method according to claim 2, characterized in that: After allocating each of the at least two IPMI commands to at least two IPMI processing sub-processes, the method further includes: When the duration of processing the first IPMI command by the second sub-process of the at least two IPMI processing sub-processes is greater than or equal to a first preset threshold, the first IPMI command is reallocated to the sub-process in the idle state.

6. The method according to any one of claims 1 to 5, characterized in that After allocating each of the at least two IPMI commands to at least two IPMI processing sub-processes, the method further includes: After the second IPMI command among the at least two IPMI commands is assigned to the IPMI processing subprocess, if the second IPMI command is in a command processing abnormal state and the number of command processing retries is greater than or equal to a second preset threshold, the second IPMI command is marked as an abnormal state.

7. The method according to any one of claims 1 to 5, characterized in that Before acquiring at least two IPMI commands from different sources, the method further includes: Obtaining a system load of an IPMI server process, wherein the IPMI server process is used to receive IPMI commands from different sources; When the first accumulated time length of the system load in the first load interval is greater than or equal to the third preset threshold, the number of the IPMI processing sub-processes is set to a first number corresponding to the first load interval, wherein the first load interval is an interval between a first load value and a second load value, the load value is used to measure the load condition of the system load, and the first load value is less than the second load value; When the second accumulated time length of the system load being in the second load interval is greater than or equal to the third preset threshold, setting the number of the IPMI processing subprocesses to a second number corresponding to the second load interval, wherein the second load interval is an interval between a third load value and a fourth load value, the second load value is less than the third load value, the third load value is less than the fourth load value, and the second number is greater than the first number; When the first cumulative duration is less than the third preset threshold, the second cumulative duration is less than the third preset threshold, and the sum of the first cumulative duration and the second cumulative duration is greater than or equal to the third preset threshold, the number of the IPMI processing sub-processes is set to a third number, wherein the third number is less than the second number and greater than the first number.

8. The method according to any one of claims 1 to 5, characterized in that The obtaining of at least two IPMI commands from different sources comprises: obtaining IPMI commands from at least two channels, wherein the at least two channels comprise at least two of the following: a LAN channel, an IPMB channel, a KCS channel, and a USB channel; After obtaining the result data returned from the at least two IPMI processing sub-processes, the method further includes: returning the result data to the service processes of the at least two channels respectively.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 8 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Multi-thread operation IPMI command method and device and readable medium

    CN110633146A

  • Data collection method and device of baseboard management controller, and medium

    CN115454673A

  • Processor-memory module performance acceleration in fabric-backplane enterprise servers

    US20130107872A1