Interaction command abnormity diagnosis method, device, equipment and medium
By updating and comparing counter values in the monitoring engine of the management controller and the basic input and output system, the problem of inaccurate recording of MMBI command status log information is solved, and accurate recording of interactive commands and automatic exception handling is realized.
Patent Information
- Application Number
- CN202411998954.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-28
AI Technical Summary
How to ensure that the status log information of MMBI commands is accurately recorded, and avoid the problem of more or less recording.
By updating the counter values in the respective monitoring engines of the management controller and the basic input and output system, and comparing the consistency between the two, if inconsistent, an interactive command exception is determined and an exception command processing flow is performed.
Ensure the accuracy of status logging of MMBI commands, avoid more or less error logging caused by command interaction exceptions, and realize automatic exception handling to reduce manual intervention.
Smart Images

Figure CN119718755A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication monitoring technology, and in particular to an interactive command abnormality diagnosis method, device, equipment and medium. Background Art
[0002] The ESPI interface (Enhanced Serial Peripheral Interface) is usually used to connect management controllers on the motherboard, such as BMC (Baseboard Management Controller) and external devices (such as power management chips, temperature sensors, etc.). The ESPI interface supports data transmission rates up to 66.7MHz, which is faster than the traditional SPI interface and supports long-distance transmission of multiple devices. The ESPI interface is widely used in modern motherboards, especially in high-end systems such as servers and workstations. It can provide higher performance and reliability while supporting more functions and scalability. The ESPI specification defines four channels for data transmission, among which the peripheral channel defines memory read / write over ESPI operations, so MMBI (Memory-mapped BMCInterface) uses this channel to perform memory read and write operations. MMBI Over Espi can make the interaction between BIOS (Basic Input Output System) and BMC faster. Compared with traditional IPMI commands, the speed can be increased by more than 10 times. Therefore, the interaction data between BMC and BIOS can be transmitted faster and more data, such as error information for fault diagnosis, etc. The server requires stable performance and requires that error information can be quickly queried from the log to make a quick response after a problem occurs, so as to ensure the normal operation of the server.
[0003] It can be seen that how to ensure that the information in the status log of the MMBI command is accurately recorded and that there is no over-recording or under-recording is a problem that those skilled in the art need to solve. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide an interactive command abnormality diagnosis method, device, equipment and medium, which can ensure that the information in the status log of the MMBI command is accurately recorded and there is no problem of over-recording or under-recording.
[0005] In a first aspect, the present invention discloses a method for diagnosing abnormality of interactive commands, comprising:
[0006] Initialize the preset communication system, and start the first monitoring engine and the second monitoring engine in the preset communication system; wherein the first monitoring engine is located at the side where the management controller is located, and the second monitoring engine is located at the side where the basic input and output system is located;
[0007] When the first monitoring engine detects that the management controller sends a request command, the first counter value of the first counter is updated in the first monitoring engine;
[0008] When the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command, the second counter value of the second counter is updated in the second monitoring engine;
[0009] Comparing whether the first counter value and the second counter value are consistent;
[0010] If they are inconsistent, the interactive command is determined to be abnormal, and the abnormal command processing flow is executed.
[0011] Optionally, initializing a preset communication system includes:
[0012] Initialize the communication environment and basic communication parameters of the preset communication system to set the read and write permissions of each write memory in the shared memory.
[0013] Optionally, when the first monitoring engine detects that the management controller sends a request command, updating a first counter value of a first counter in the first monitoring engine includes:
[0014] When the first monitoring engine detects that a request command write operation exists in the first write memory in the shared memory, the first counter value of the first counter is updated in the first monitoring engine, and an interrupt is triggered to notify the basic input and output system to read the request command.
[0015] Optionally, after notifying the basic input / output system of the read request command, the method further includes:
[0016] Reading and executing the request command from the first write memory to generate corresponding response information;
[0017] The response information is encapsulated and processed through the basic input and output system to obtain the corresponding response command;
[0018] The response command is written to the second write memory in the shared memory.
[0019] Optionally, when the second monitoring engine detects that the basic input / output system returns a corresponding response command to the management controller in response to the request command, updating a second counter value of the second counter in the second monitoring engine includes:
[0020] When the second monitoring engine detects that there is a response command writing operation in the second writing memory, the second counter value of the second counter is updated in the second monitoring engine, and an interrupt is triggered to notify the management controller to read the response command.
[0021] Optionally, comparing whether the first counter value and the second counter value are consistent includes:
[0022] When the management controller receives the verification command, it sends the current first counter value in the first monitoring engine to the basic input and output system, and compares the current first counter value with the current second counter value in the second monitoring engine through the basic input and output system;
[0023] Correspondingly, if there is inconsistency, the interactive command is determined to be abnormal, and the abnormal command processing flow is executed, including:
[0024] If the current value of the first counter is greater than the current value of the second counter, and the verification command type is to verify the command sent by the basic input and output system, a first notification message is sent to the management controller, and corresponding log information is generated; the first notification message is used to prompt the management controller that the number of commands currently recorded exceeds the number of interactive commands sent by the basic input and output system;
[0025] If the current second counter value is greater than the current first counter value, and the verification command category is to verify the command sent to the basic input and output system, the inconsistent current second counter value and the corresponding interaction command are sent to the management controller, and a second notification message is sent to the management controller, and corresponding log information is generated; the second notification message is used to notify the management controller to record the inconsistent current second counter value and the corresponding interaction command.
[0026] Optionally, the shared memory is also used to store the first counter value and the second counter value;
[0027] Furthermore, after comparing whether the first counter value and the second counter value are consistent, the method further includes:
[0028] If the value of the first counter is consistent with the value of the second counter, it is determined that the interactive command is normal, and a counter clearing operation is triggered to clear the counter values in the first counter and the second counter.
[0029] In a second aspect, the present invention discloses an interactive command abnormality diagnosis device, comprising:
[0030] An initialization module, used to initialize the preset communication system and start the first monitoring engine and the second monitoring engine in the preset communication system; wherein the first monitoring engine is located on the side where the management controller is located, and the second monitoring engine is located on the side where the basic input and output system is located;
[0031] A first counting module, configured to update a first counter value of a first counter in the first monitoring engine when the first monitoring engine detects that the management controller sends a request command;
[0032] A second counting module, configured to update a second counter value of a second counter in the second monitoring engine when the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command;
[0033] A value comparison module, used for comparing whether the value of the first counter is consistent with the value of the second counter;
[0034] The abnormality diagnosis module is used to determine that the interactive command is abnormal if there is any inconsistency, and execute the abnormal command processing flow.
[0035] In a third aspect, the present invention discloses an electronic device, comprising:
[0036] Memory, used to store computer programs;
[0037] The processor is used to execute a computer program to implement the steps of the above-disclosed interactive command abnormality diagnosis method.
[0038] In a fourth aspect, the present invention discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the interactive command anomaly diagnosis method disclosed above are implemented.
[0039] It can be seen that the present invention provides an interactive command abnormality diagnosis method, including: initializing a preset communication system, and starting a first monitoring engine and a second monitoring engine in the preset communication system; wherein the first monitoring engine is located on the side where the management controller is located, and the second monitoring engine is located on the side where the basic input and output system is located; when the first monitoring engine detects that the management controller sends a request command, the first counter value of the first counter is updated in the first monitoring engine; when the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command, the second counter value of the second counter is updated in the second monitoring engine; compare whether the first counter value and the second counter value are consistent; if they are inconsistent, it is determined that the interactive command is abnormal, and the abnormal command processing flow is executed.
[0040] It can be seen from the above technical solution that by recording and comparing the counter values of the respective monitoring engines of the management controller and the basic input and output system, it is accurately determined whether the sending and receiving of the interactive commands match, and then when recording the fault-related logs, there will be no problem of recording too many or too few error logs, ensuring the accuracy of the fault log records, and automatically executing the abnormal command processing flow, directly pointing out the abnormal situation, without excessive human intervention to find the problem. In addition, by real-time monitoring and timely discovery of abnormal situations of interactive commands, and corresponding processing of the abnormalities, it is avoided that the abnormalities of command interactions are not detected and accumulate to cause more serious system problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A flow chart of an interactive command abnormality diagnosis method provided by an embodiment of the present invention;
[0043] Figure 2 A monitoring framework diagram of a communication system provided by an embodiment of the present invention;
[0044] FIG3 (a) is a flow chart of communication between a baseboard management controller writing and a basic input / output system reading data provided by an embodiment of the present invention;
[0045] FIG3 (b) is a flow chart of communication between a basic input / output system writing and a baseboard management controller reading data provided by an embodiment of the present invention;
[0046] Figure 4 A structural diagram of a monitoring engine provided by an embodiment of the present invention;
[0047] Figure 5 A data structure diagram of a shared memory provided by an embodiment of the present invention;
[0048] Figure 6 A flow chart of a specific interactive command abnormality diagnosis method provided by an embodiment of the present invention;
[0049] Figure 7 A schematic diagram of the structure of an interactive command abnormality diagnosis device provided by an embodiment of the present invention;
[0050] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The ESPI interface is usually used to connect the management controller (such as BMC) on the motherboard and external devices (such as power management chips, temperature sensors, etc.). The ESPI interface supports a data transmission rate of up to 66.7MHz, which is faster than the traditional SPI interface and supports long-distance transmission of multiple devices. The ESPI interface is widely used in modern motherboards, especially in high-end systems such as servers and workstations. It can provide higher performance and reliability while supporting more functions and scalability. The ESPI specification defines four channels for data transmission, and the peripheral channel defines memory read / write over ESPI operations, so MMBI uses this channel to perform memory read and write operations. MMBI Over espi can make the interaction between BIOS and BMC faster. Compared with traditional IPMI commands, the speed can be increased by more than 10 times. Therefore, the interactive data between BMC and BIOS can be faster and more data can be transmitted using MMBI Over Espi, such as error information for fault diagnosis. The server requires stable performance and requires that error information can be quickly queried from the log after a problem occurs to make a quick response to ensure the normal operation of the server.
[0055] To this end, the present invention provides an interactive command anomaly diagnosis solution, which can ensure that the information in the status log of the MMBI command is accurately recorded without excessive or insufficient records.
[0056] Reference Figure 1 As shown, the present invention discloses a method for diagnosing abnormal interaction commands, comprising:
[0057] Step S11: Initialize the preset communication system and start the first monitoring engine and the second monitoring engine in the preset communication system; wherein the first monitoring engine is located at the side where the management controller is located, and the second monitoring engine is located at the side where the basic input and output system is located.
[0058] In this embodiment, the communication environment and basic communication parameters of the preset communication system are initialized to set the read and write permissions of each write memory in the shared memory. It can be understood that the preset communication system includes BIOS, management controller, monitoring engine and shared memory, wherein the management controller of the present invention is a baseboard management controller BMC, so that after the BIOS is started, MMBI will be initialized, and MMBI initialization involves initialization of the entire MMBI communication mechanism. This includes establishing the basic environment and parameter settings for communication between BIOS and BMC based on MMBI. Such as setting the access rights of the MMBI area (read / write permissions of different memory areas of the shared memory), configuring related registers, and starting the monitoring engine. From the perspective of the communication process, initializing MMBI is to ensure that BIOS and BMC can send and receive MMBI commands according to the predetermined communication process. This process includes how the BIOS waits for feedback from the BMC after sending the MMBI command, how the BMC processes and returns status information after receiving the command, and how the monitoring engines on both sides start counting and recording.
[0059] like Figure 2 As shown, the preset communication system includes a BMC and a host for communication, the host includes a BIOS, and the two communicate MMBI instructions through the SEPI port, and each of the two parties has a monitoring engine for monitoring MMBI instructions. Specifically, the monitoring engine records the sent MMBI commands on the one hand, and monitors whether the MMBI communication is normal (querying the status register, querying the ESPI link status, etc.).
[0060] Step S12: When the first monitoring engine detects that the management controller sends a request command, a first counter value of a first counter is updated in the first monitoring engine.
[0061] In this embodiment, when the first monitoring engine detects that there is a request command write operation in the first write memory in the shared memory, the first counter value of the first counter is updated in the first monitoring engine, and an interrupt is triggered to notify the basic input and output system to read the request command. It can be understood that the shared memory is an area related to the memory mapping BMC interface, which is a memory area jointly determined and divided by the management controller BMC and the basic input and output system BIOS, and is a specific memory area division for communication between BIOS and BMC.
[0062] The shared memory is divided into two areas, one is the H2B (Host to BMC) area, and the other is the B2H (BMC to Host) area. The B2H area (also known as the first write memory) is where the BMC can write data, and the HOST has only read permissions; the H2B area (also known as the second write memory) is where the HOST (host side where the BIOS is located) can write data, and the BMC has only read permissions. Through such area division, the BIOS actually accesses these two different areas when sending and reading data, thereby achieving communication between the two parties. This design allows the BIOS and BMC to use this specific memory area for MMBIover Espi communication, thereby achieving information interaction such as fault diagnosis data.
[0063] Further, as shown in FIG3 (a), when the BMC writes data to the MMBI B2H area (sends an interactive instruction), the first monitoring engine located on the BMC side monitors that there is a request command write operation in the B2H area, then the current counter value of the first counter is updated in the first monitoring engine, that is, the first counter value, and an interrupt is triggered, and the BIOS is notified to read the request command. After notifying the basic input and output system to read the request command, it also includes: reading and executing the request command from the first write memory to generate corresponding response information; encapsulating the response information through the basic input and output system to obtain the corresponding response command; writing the response command to the second write memory in the shared memory. That is, the BIOS interrupts other workflows currently being executed, reads and executes the current request command from B2H, and as shown in FIG3 (b), the BIOS generates corresponding response information based on the request command, and encapsulates the response information to obtain the response command, and then writes the response command to the H2B area in the shared memory, triggers an interrupt, and notifies the BMC to read the response command. Correspondingly, the BMC reads the response command from the H2B area, completing the communication transmission of the interactive command between the BMC and the BIOS.
[0064] In this embodiment, after the shared memory is divided into the first write memory and the second write memory, the first counter includes the first sending counter and the first receiving counter, and similarly, the second counter includes the second sending counter and the second receiving counter, such as Figure 4 As shown, each side includes a sending counter and a receiving counter, which are used to count the number of sent commands and the number of received commands (response commands) respectively.
[0065] Step S13: When the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command, a second counter value of the second counter is updated in the second monitoring engine.
[0066] In this embodiment, when the second monitoring engine detects that there is a response command write operation in the second write memory, the second counter value of the second counter is updated in the second monitoring engine, and an interrupt is triggered to notify the management controller to read the response command. It can be understood that when the second monitoring engine (the monitoring engine on the side where the BIOS is located) detects that there is a command write operation in the H2B area, the current counter value of the second counter, that is, the second counter value, is updated in the second monitoring engine, and an interrupt is triggered at the same time, and the BMC is notified to read the response command. Accordingly, the BMC reads the response command from the H2B area.
[0067] Step S14: Compare the first counter value and the second counter value to see if they are consistent.
[0068] In this embodiment, when the management controller receives a verification command, the current first counter value in the first monitoring engine is sent to the basic input and output system, and the current first counter value is compared with the current second counter value in the second monitoring engine through the basic input and output system; it can be understood that when the BMC receives a verification command sent by the BIOS, the current first counter value in the first monitoring engine is sent to the BIOS, and the BIOS performs an operation of comparing the current first counter value with the current second counter value in its own second monitoring engine.
[0069] It should be noted that the shared memory is also used to save the first counter value and the second counter value; and after comparing whether the first counter value and the second counter value are consistent, it also includes: if the first counter value and the second counter value are consistent, it is determined that the interactive command is normal, and the counter clearing operation is triggered to clear the counter values in the first counter and the second counter. It can be understood that each time the counter value is updated, the counter on the corresponding side will be increased by 1. Specifically, during the operation of the BIOS, each time an MMBI command is successfully sent, the MMBI sending counter in the HOST-side monitoring engine will be increased by 1, and the content of the sent data will be saved. When the read status sent by the BMC is normal, the receiving counter of the BMC monitoring engine is increased by 1, indicating that the BIOS successfully sent the MMBI command. There will also be a monitoring engine on the BMC side. After the BMC sends data, the sending counter is increased by 1, triggering an interrupt to inform the BIOS to read the data. The BIOS returns the reading data status. If it returns to normal, the receiving counter on the BIOS side is increased by 1, and it is considered that the BMC has successfully sent the MMBI data. Among them, the shared memory is set in the shared memory to accumulate 10 records. If there are more than 10 records, they will be overwritten from the beginning. The data structure refers to Figure 5 As shown, the number of accumulated records may be other values, which are not specifically limited.
[0070] Step S15: If not, the interactive command is determined to be abnormal, and the abnormal command processing flow is executed.
[0071] Reference Figure 6 As shown, after the system is turned on and the BIOS is running, after the initialization process, the first monitoring engine and the second monitoring engine are started, and interactive commands are started to be sent, and then it is determined whether the information of the two is consistent. If the current first counter value is greater than the current second counter value, and the verification command category is to verify the command sent by the basic input and output system, a first notification message is sent to the management controller and corresponding log information is generated; the first notification message is used to prompt the management controller that the number of commands currently recorded exceeds the number of interactive commands sent by the basic input and output system; it can be understood that if the first counter value of the BMC receiving counter is greater than the second counter value of the HOST sending counter, and the verification command category is to verify the command sent by the BIOS, the BMC is notified to record the number of MMBI commands that are recorded more and generate a log.
[0072] If the current second counter value is greater than the current first counter value, and the verification command type is to verify the basic input and output system sent command, then the inconsistent current second counter value and the corresponding interactive command are sent to the management controller, and a second notification message is sent to the management controller, and corresponding log information is generated; the second notification message is used to notify the management controller to record the inconsistent current second counter value and the corresponding interactive command. It can be understood that when the second counter value of the HOST sending counter is greater than the first counter value of the BMC receiving counter, and the verification command type is to verify the BIOS sending command, the BMC is notified to record the number of MMBI commands that are missed, the specific command data, and generate a log.
[0073] When BIOS tells BMC to start verification, it verifies the HOST received command. BMC passes the count value of the monitoring engine send counter to BIOS, and BIOS compares this value with its own receive counter. If the two are inconsistent, two situations will occur:
[0074] If the current first counter value is greater than the current second counter value, and the verification command category is to verify the received command of the basic input and output system, a third notification message is sent to the management controller, and corresponding log information is generated; the third notification message is used to notify the management controller to prompt the recording of the inconsistent current second counter value and the corresponding interactive command. It can be understood that if the first counter value of the BMC receiving counter is greater than the second counter value of the HOST receiving counter, the BMC needs to record the number and specific data of the MMBI commands that the HOST has missed, and record the log.
[0075] If the current second counter value is greater than the current first counter value, and the verification command category is to verify the received command of the basic input and output system, a fourth notification message is sent to the management controller and corresponding log information is generated; the fourth notification message is used to prompt the management controller that the number of commands currently recorded exceeds the number of interactive commands sent by the basic input and output system; it can be understood that when the second counter value of the HOST sending counter is greater than the first counter value of the BMC receiving counter, the BMC is notified to record the number of MMBI commands recorded by the HOST and generate a log.
[0076] If the first two comparisons are consistent, the BIOS will send the result to the BMC. After receiving it, the BMC will mark that the verification has been completed and feedback to the BIOS. After receiving the feedback from the BMC, the BIOS will also mark its own verification. If there is no problem with the verification, the counters of both parties will be cleared.
[0077] In this way, BIOS and BMC need to perform three steps. The first is just to send MMBI command information verification, which can determine whether MMBI sending is abnormal. The second is to further check the MMBI receiving abnormal state, filter out the abnormalities that were not identified in the first time, and the third interaction means that the verification is completed. The three interactions are to quickly and accurately identify MMBI interaction abnormalities. The reason for the speed is that there is no need to perform global traversal every time to determine whether it is abnormal, but to compare the counter to determine whether it is abnormal. BIOS will perform information verification at each startup. If the system BIOS sends MMBI command to BMC through SMI, the information in the table is also recorded, but it will not be verified immediately, but will be checked at the next startup. If there is a problem after verification, the BMC will know the verification result. If there is an inconsistency, an alarm message will be written in the log. The alarm message contains which MMBI command is abnormal, whether it is recorded too much or missed. For relevant personnel to check. Users can first check which state they are in to get a preliminary understanding of the situation.
[0078] Further, after determining that the interactive command is abnormal, the first monitoring engine at the management controller end will also analyze the abnormal interactive command information in detail, including the type of command, parameters, and preliminary speculation information that may cause the abnormality. Then, the BMC will store these analysis results and abnormal alarm information in a log area specifically used to record abnormal situations according to a specific format and communication protocol. This log area can be set in a local storage or a specific shared storage area so that subsequent technicians can easily obtain and view it. At the same time, the BMC will send a notification message to the system administrator or the monitoring platform. In addition to the basic abnormal alarm content, the message also includes index information pointing to the detailed log record, so as to quickly locate and view the abnormal details. In addition, according to the severity of the command abnormality, different notification methods are set, such as minor abnormalities are only recorded in the system log and ordinary notification emails are sent, while serious abnormalities trigger SMS alarms or system alarm sounds to ensure that relevant personnel can be informed and handled in time. In this way, the above-mentioned post-processing steps are combined with the automatic process of the abnormal diagnosis of the interactive command of the present invention, so as to realize the automatic diagnosis of the interactive command and the automatic alarm notification after diagnosis.
[0079] It can be seen that the present invention provides an interactive command abnormality diagnosis method, including: initializing a preset communication system, and starting a first monitoring engine and a second monitoring engine in the preset communication system; wherein the first monitoring engine is located on the side where the management controller is located, and the second monitoring engine is located on the side where the basic input and output system is located; when the first monitoring engine detects that the management controller sends a request command, the first counter value of the first counter is updated in the first monitoring engine; when the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command, the second counter value of the second counter is updated in the second monitoring engine; compare whether the first counter value and the second counter value are consistent; if they are inconsistent, it is determined that the interactive command is abnormal, and the abnormal command processing flow is executed.
[0080] It can be seen from the above technical solution that by recording and comparing the counter values of the respective monitoring engines of the management controller and the basic input and output system, it is accurately determined whether the sending and receiving of the interactive commands match, and then when recording the fault-related logs, there will be no problem of recording too many or too few error logs, ensuring the accuracy of the fault log records, and automatically executing the abnormal command processing flow, directly pointing out the abnormal situation, without excessive human intervention to find the problem. In addition, by real-time monitoring and timely discovery of abnormal situations of interactive commands, and corresponding processing of the abnormalities, it is avoided that the abnormalities of command interactions are not detected and accumulate to cause more serious system problems.
[0081] Reference Figure 7As shown, the present invention also discloses an interactive command abnormality diagnosis device, which is applied to a preset communication system, including:
[0082] The initialization module 11 is used to initialize the preset communication system and start the first monitoring engine and the second monitoring engine in the preset communication system; wherein the first monitoring engine is located on the side where the management controller is located, and the second monitoring engine is located on the side where the basic input and output system is located;
[0083] A first counting module 12, configured to update a first counter value of a first counter in the first monitoring engine when the first monitoring engine detects that the management controller sends a request command;
[0084] A second counting module 13, configured to update a second counter value of a second counter in the second monitoring engine when the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command;
[0085] A value comparison module 14 is used to compare whether the value of the first counter is consistent with the value of the second counter;
[0086] The abnormality diagnosis module 15 is used to determine that the interactive command is abnormal if there is any inconsistency, and execute the abnormal command processing flow.
[0087] It can be seen that the present invention provides a method for initializing a preset communication system and starting a first monitoring engine and a second monitoring engine in the preset communication system; wherein the first monitoring engine is located on the side where the management controller is located, and the second monitoring engine is located on the side where the basic input-output system is located; when the first monitoring engine detects that the management controller sends a request command, the first counter value of the first counter is updated in the first monitoring engine; when the second monitoring engine detects that the basic input-output system returns a corresponding response command to the management controller in response to the request command, the second counter value of the second counter is updated in the second monitoring engine; the first counter value and the second counter value are compared for consistency; if they are inconsistent, the interactive command is determined to be abnormal, and the abnormal command processing flow is executed.
[0088] It can be seen from the above technical solution that by recording and comparing the counter values of the respective monitoring engines of the management controller and the basic input and output system, it is accurately determined whether the sending and receiving of the interactive commands match, and then when recording the fault-related logs, there will be no problem of recording too many or too few error logs, ensuring the accuracy of the fault log records, and automatically executing the abnormal command processing flow, directly pointing out the abnormal situation, without excessive human intervention to find the problem. In addition, by real-time monitoring and timely discovery of abnormal situations of interactive commands, and corresponding processing of the abnormalities, it is avoided that the abnormalities of command interactions are not detected and accumulate to cause more serious system problems.
[0089] Furthermore, an embodiment of the present invention also discloses an electronic device, Figure 8 It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of the present invention. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the interactive command abnormality diagnosis method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0090] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present invention, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0091] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0092] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the interactive command abnormality diagnosis method executed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0093] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the above disclosed interactive command abnormality diagnosis method is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the above embodiments, and no further description will be given here.
[0094] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0095] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0096] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0097] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0098] The technical solution provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for diagnosing abnormality of interactive commands, characterized in that: include: Initialize a preset communication system, and start a first monitoring engine and a second monitoring engine in the preset communication system; wherein the first monitoring engine is located at a side where a management controller is located, and the second monitoring engine is located at a side where a basic input and output system is located; When the first monitoring engine detects that the management controller sends a request command, a first counter value of a first counter is updated in the first monitoring engine; When the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command, a second counter value of a second counter is updated in the second monitoring engine; Comparing whether the first counter value and the second counter value are consistent; If they are inconsistent, the interactive command is determined to be abnormal, and the abnormal command processing flow is executed.
2. The interactive command abnormality diagnosis method according to claim 1, characterized in that: The initialization preset communication system comprises: Initialize the communication environment and basic communication parameters of the preset communication system to set the read and write permissions of each write memory in the shared memory.
3. The interactive command abnormality diagnosis method according to claim 2, characterized in that: When the first monitoring engine detects that the management controller sends a request command, updating a first counter value of a first counter in the first monitoring engine includes: When the first monitoring engine detects that a request command write operation exists in the first write memory in the shared memory, a first counter value of a first counter is updated in the first monitoring engine, and an interrupt is triggered to notify the basic input and output system to read the request command.
4. The interactive command abnormality diagnosis method according to claim 3, characterized in that: After notifying the basic input and output system to read the request command, the method further includes: Reading and executing the request command from the first write memory to generate corresponding response information; Encapsulating the response information through the basic input and output system to obtain a corresponding response command; The response command is written into a second write memory in the shared memory.
5. The interactive command abnormality diagnosis method according to claim 4, characterized in that: When the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command, updating a second counter value of a second counter in the second monitoring engine includes: When the second monitoring engine detects that there is a response command writing operation in the second writing memory, the second counter value of the second counter is updated in the second monitoring engine, and an interrupt is triggered to notify the management controller to read the response command.
6. The interactive command abnormality diagnosis method according to claim 1, characterized in that: The comparing whether the first counter value is consistent with the second counter value includes: When the management controller receives the verification command, it sends the current first counter value in the first monitoring engine to the basic input and output system, and compares the current first counter value with the current second counter value in the second monitoring engine through the basic input and output system; Correspondingly, if there is inconsistency, the interactive command is determined to be abnormal, and the abnormal command processing flow is executed, including: If the current first counter value is greater than the current second counter value, and the verification command type is to verify the command sent by the basic input and output system, a first notification message is sent to the management controller, and corresponding log information is generated; the first notification message is used to prompt the management controller that the number of commands currently recorded by the management controller exceeds the number of interactive commands sent by the basic input and output system; If the current second counter value is greater than the current first counter value, and the verification command category is to verify the command sent to the basic input and output system, the inconsistent current second counter value and the corresponding interactive command are sent to the management controller, and a second notification message is sent to the management controller, and corresponding log information is generated; the second notification message is used to notify the management controller to record the inconsistent current second counter value and the corresponding interactive command.
7. The interactive command abnormality diagnosis method according to any one of claims 1 to 6, characterized in that: The shared memory is also used to store the first counter value and the second counter value; Furthermore, after comparing whether the first counter value is consistent with the second counter value, the method further includes: If the value of the first counter is consistent with the value of the second counter, it is determined that the interactive command is normal, and a counter clearing operation is triggered to clear the counter values in the first counter and the second counter.
8. An interactive command abnormality diagnosis device, characterized in that: include: An initialization module, used to initialize a preset communication system and start a first monitoring engine and a second monitoring engine in the preset communication system; wherein the first monitoring engine is located on the side where the management controller is located, and the second monitoring engine is located on the side where the basic input and output system is located; A first counting module, configured to update a first counter value of a first counter in the first monitoring engine when the first monitoring engine detects that the management controller sends a request command; a second counting module, configured to update a second counter value of a second counter in the second monitoring engine when the second monitoring engine detects that the basic input and output system returns a corresponding response command to the management controller in response to the request command; A value comparison module, used for comparing whether the value of the first counter is consistent with the value of the second counter; The abnormality diagnosis module is used to determine that the interactive command is abnormal if there is any inconsistency, and execute the abnormal command processing flow.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the interactive command anomaly diagnosis method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the interactive command abnormality diagnosis method according to any one of claims 1 to 7 are implemented.