Method, device, equipment, and medium for automatically tracing the controlled status of a port in the event of an abnormality
By recording the initial values of the control registers and ports when BMC is started, and comparing and recording changes when an exception occurs, and generating a new log in combination with the serial port log, the problem of low positioning efficiency of BMC ports in the existing technology is solved, and efficient error traceability is achieved.
Patent Information
- Application Number
- CN202210908260.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The existing technology is inefficient when locating BMC port abnormalities, and cannot effectively combine historical changes in the control registers and serial port log information. It requires coordination between multiple components, resulting in inefficient error positioning.
Record the initial values of the control register and port when the BMC is started. When the exception occurs, record and compare again, locate the relevant control register range, and continuously record changes. Combined with the serial port log to generate a new log to locate the source of the error.
It improves the efficiency of abnormal positioning of BMC ports, reduces repeated restarts and upgrades, simplifies coordination of multiple components, and improves the investigation efficiency of R&D personnel.
Smart Images

Figure CN115168097B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of BMC port fault locating technology, and in particular to a method, device, equipment and medium for automatically tracing the controlled status of a port in the event of an abnormality. Background Art
[0002] BMC is the server remote management controller, also known as Baseboard Management Controller. BMC can monitor the health of the system and the normal operation of peripherals such as network cards even when the server is not turned on and the operating system is not started. BMC can control the operation of other components by sending control signals to lower-level devices. The signals are either based on the processing of the information collected by the BMC itself, or the transmission of control commands to upper-level components such as the CPU / BIOS / CPLD. IPMI commands are commonly used to call the software and hardware interfaces layer by layer, issue commands to the control registers, and modify the port configuration. Ultimately, the lower-level components are controlled by the output values of the ports. In this process, the information conveyed flows between multiple components and multiple levels. Once the processing is incorrect at a certain level, or a component sends an erroneous instruction, it will cause the BMC chip port output to be abnormal.
[0003] The exception handling process generally begins with BMC developers analyzing the possible causes of the problem, debugging the relevant processing processes, and troubleshooting from the level at which IPMI commands are issued. They check serial port printouts and use tools such as gpiotool, devmem, and i2c-test to assist. If the source of the error cannot be found during BMC troubleshooting, it is necessary to contact BIOS, EE, and CPLD engineers for joint investigation.
[0004] Each manual execution of these tools only queries one or a group of control registers, which is inefficient. Furthermore, only the values of the control registers at the time of execution can be read; their change history over a specific time period cannot be read. This makes locating errors inefficient and requires repeated restarts to capture them. Serial port logs only output events occurring at the upper software layer in real time; the collected hardware lower-level information does not include time information, and the two cannot be combined. Therefore, it is impossible to directly determine whether port configuration errors stem from errors in the control registers written by the application layer during BMC startup, errors in the drivers loaded by the BMC, or errors in which components sent incorrect control information to the BMC during startup. This requires coordination across multiple component teams. Summary of the Invention
[0005] Each time the above tool is manually executed, only one or a group of control registers can be queried, which is inefficient. Furthermore, during execution, only the value of the control register at the time of execution can be read; its change history within a certain time period cannot be read. This makes locating errors inefficient and requires repeated restarts to capture errors. The serial port log can only output events occurring at the upper software layer in real time; the collected hardware underlying information does not carry time information, and the two cannot be combined. The present invention provides a method, apparatus, device, and medium for automatically tracing the controlled state of a port in the event of an anomaly.
[0006] In a first aspect, the technical solution of the present invention provides a method for automatically tracing the controlled status of a port in an abnormal situation, comprising the following steps:
[0007] When the BMC starts, it reads the value of the control register. When the value of the control register read is consistent with the expected setting value, it records the output value of the BMC port and the value of the control register.
[0008] When an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again, and compared with the values recorded when the BMC was started to locate the range of the relevant control register; the range of the relevant control register is defined as a specified range;
[0009] The BMC continues to run and sets the control registers within the specified range according to the values of the control registers recorded when the BMC started. It also continuously records changes in the control registers within the specified range. When an exception occurs again, the values of the control registers within the specified range at the time of the exception are recorded as the final control records.
[0010] Compare the final control record with the serial port log, generate a new log and output it.
[0011] Furthermore, when the BMC is started, the value of the control register is read. When the value of the control register read is consistent with the expected set value, the step of recording the output value of the BMC port and the value of the control register includes:
[0012] When BMC starts, read the value of the control register;
[0013] Determine whether the value of the control register read is consistent with the expected setting value;
[0014] If yes, record the output value of the BMC port and the value of the control register;
[0015] If not, report an error immediately and correct the value of the control register.
[0016] Furthermore, when the BMC is started, the value of the control register is read. When the value of the control register read is consistent with the expected set value, the step of recording the output value of the BMC port and the value of the control register includes:
[0017] Record the output values of all BMC ports as output record 1;
[0018] Read the values of all control registers and save them as control record one.
[0019] Furthermore, when an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again, and the steps of locating the range of the relevant control register by comparing them with the values recorded when the BMC is started include:
[0020] When an exception occurs during BMC operation, the output values of all BMC ports are recorded again as output record 2;
[0021] Compare output record 1 with output record 2, and generate port location range records for different output records;
[0022] According to the port location range record and control record one, a control location range record is obtained.
[0023] Furthermore, the BMC continues to run, sets the control registers within the specified range according to the values of the control registers recorded when the BMC is started, continuously records changes in the control registers within the specified range, and when the exception occurs again, records the values of the control registers within the specified range when the exception occurs as the final control record. The steps include:
[0024] The BMC continues to run, writes the port output value in the port location range record to the value in output record one, and then writes the control register specified in the control location range record to the value in control record one;
[0025] The changes and timestamps of the designated control register are continuously recorded. When the exception occurs again, the value of the designated control register is recorded as the final control record.
[0026] Furthermore, the steps of comparing the final control record with the serial port log, generating a new log, and outputting the log include:
[0027] Compare the final control record with the serial port log based on the timestamp;
[0028] Output the comparison results and serial port logs to the serial port console;
[0029] Based on the output log, determine the process of modifying the control register and locate the source of the port configuration error.
[0030] In a second aspect, the technical solution of the present invention further provides a device for automatically tracing the controlled condition of a port in the event of an abnormality, comprising a detection module, a comparison module and a control module;
[0031] After the BMC is started, the main process of the BMC system sends a notification signal to the control module;
[0032] After receiving the notification that the BMC startup is complete, the control module notifies the detection module to start running;
[0033] The detection module reads and records the output value of the BMC port and the value of the control register when the BMC is started. When an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again. The control registers within the specified range are set according to the control register values recorded when the BMC is started, and the changes in the control registers within the specified range are continuously recorded. When the exception occurs again, the control register values within the specified range at the time of the exception are recorded as the final control record.
[0034] The comparison module is used to compare the read control register value with the expected set value and, when an exception occurs during BMC operation, to compare the recorded control register value with the value recorded when the BMC was started, to locate the range of the relevant control register; the range of the relevant control register is defined as a specified range; and is also used to compare the final control record with the serial port log, generate a new log, and output it.
[0035] Furthermore, the detection module includes a reading unit, a writing unit, and a recording unit;
[0036] A reading unit, configured to read the port output value as an output record or read the control register value as a control record after receiving a read notification;
[0037] The write unit is used to write values to the control register or port output value register according to the record file and the specified range when receiving the write notification;
[0038] The record unit is used to save the value read by the read unit as an output record or a control record.
[0039] Furthermore, the comparison module is specifically configured to compare the output record 1 with the output record 2, and generate a port location range record from the different output records.
[0040] Furthermore, the recording unit is also used for the BMC to continue running, write the port output value in the port positioning range record as the value in output record one, and then write the control register specified in the control positioning range record as the value in control record one; continuously record the changes and timestamps of the specified control register, and when the exception occurs again, record the value of the specified control register as the final control record.
[0041] The comparison module is specifically used to compare the final control record with the serial port log based on the timestamp; the comparison result is combined with the serial port log and output on the serial port console.
[0042] Based on the output logs, the staff determined the process of modifying the control register and located the source of the port configuration error.
[0043] When the BMC is started, if the value of the control register does not match the expected setting value, an error will be reported immediately and corrected. When an exception occurs, the output value of the BMC port and the value of the control register are recorded and compared with the initial record when the BMC is started. By comparing the two control register values, the range of the relevant control register is located;
[0044] The BMC system process continues to run and sets the output value register and control register according to the initial record. It continues to record the changes of the control registers in the specified range until the exception occurs again. This way, the change history of the control registers in the specified range where the exception occurred is obtained.
[0045] Compare the serial port log with the records obtained in the previous step, generate a new log, and output it. Determine which process modified the control registers, and locate the source of the port configuration error. This establishes a direct link between the port configuration anomaly and the process issuing the abnormal control command for the port. Tracing the changes in the relevant control register values before the anomaly occurred, the upper-level debug messages originally directed to the log are processed according to the recorded timestamps, locating the process error location, and finally outputting it.
[0046] In a third aspect, the technical solution of the present invention further provides an electronic device, comprising:
[0047] at least one processor; and,
[0048] a memory communicatively connected to the at least one processor; wherein,
[0049] The memory stores computer program instructions that can be executed by at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to execute the method for automatically tracing the controlled port situation in the event of an abnormality as described in the first aspect.
[0050] In a fourth aspect, the technical solution of the present invention also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the method of automatically tracing the controlled port situation in the event of an abnormality as described in the first aspect.
[0051] The above technical solution demonstrates the following advantages: During BMC startup, the initial control register values are checked and automatically corrected. After the BMC is started, the change history of control registers associated with anomalies is located and recorded, allowing traceability of erroneous port configuration modifications without requiring a BMC upgrade or restart. This fully collects and utilizes the information generated by the BMC when an issue occurs, minimizing the need for repeated startups and upgrades to catch anomalies. This improves the efficiency of error troubleshooting for R&D personnel, particularly facilitating the tracing of probabilistic anomalies.
[0052] In addition, the present invention has a reliable design principle, a simple structure and a very broad application prospect.
[0053] It can be seen that compared with the prior art, the present invention has outstanding substantial features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0055] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0056] Figure 2 is a schematic flow chart of a method according to another embodiment of the present invention.
[0057] Figure 3 This is a brief description of the process of an apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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 making creative efforts should fall within the scope of protection of the present invention.
[0059] like Figure 1 As shown, an embodiment of the present invention provides a method for automatically tracing the controlled port status in the event of an abnormality, including the following steps:
[0060] Step 1: When the BMC starts, read the value of the control register. When the read control register value is consistent with the expected set value, record the output value of the BMC port and the value of the control register.
[0061] Step 2: When an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again, and the range of the relevant control register is located by comparing them with the values recorded when the BMC was started. The range of the relevant control register is defined as the specified range.
[0062] Step 3: The BMC continues to run and sets the control registers in the specified range according to the values of the control registers recorded when the BMC started. It continuously records the changes of the control registers in the specified range. When the exception occurs again, the value of the control registers in the specified range at the time of the exception is recorded as the final control record.
[0063] Step 4: Compare the final control record with the serial port log, generate a new log and output it.
[0064] This method is applicable to exceptions related to BMC port configuration, which may be caused by certain BMC processes improperly modifying the BMC chip's control registers. Examples include inability to obtain in-bit status, abnormal reboots, RAID configuration anomalies, and abnormal screen display during server system startup. This method effectively narrows the scope of code investigation and speeds up troubleshooting for these issues.
[0065] like Figure 2 As shown, in some embodiments, when the BMC is started, the value of the control register is read. When the read value of the control register is consistent with the expected set value, the step of recording the output value of the BMC port and the value of the control register includes:
[0066] Step 11: When BMC starts, read the value of the control register;
[0067] Step 12: Determine whether the value of the control register read is consistent with the expected setting value;
[0068] If yes, go to step 13; if no, go to step 14;
[0069] Step 13: Record the output value of the BMC port and the value of the control register;
[0070] Step 14: Report an error immediately and correct the value of the control register.
[0071] In some embodiments, when the BMC is started, the value of the control register is read, and when the read value of the control register is consistent with the expected set value, the step of recording the output value of the BMC port and the value of the control register includes:
[0072] Record the output values of all BMC ports as output record 1;
[0073] Read the values of all control registers and save them as control record one.
[0074] Accordingly, when an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again, and the steps of locating the range of the relevant control register by comparing them with the values recorded when the BMC was started include:
[0075] Step 21: When an exception occurs during BMC operation, the output values of all BMC ports are recorded again as output record 2;
[0076] Step 22: Compare the output record 1 with the output record 2, and generate a port location range record based on the different output records;
[0077] Step 23: Obtain a control location range record based on the port location range record and control record one.
[0078] In some embodiments, the BMC continues to operate, sets the control registers within the located specified range according to the values of the control registers recorded when the BMC is started, continuously records changes in the control registers within the specified range, and when the exception occurs again, records the values of the control registers within the specified range at the time of the exception as the final control record, including:
[0079] Step 31: The BMC continues to run, writes the port output value in the port location range record to the value in output record 1, and then writes the control register specified in the control location range record to the value in control record 1;
[0080] Step 32: continuously record the changes and timestamps of the designated control register. When the exception occurs again, record the value of the designated control register as the final control record.
[0081] In some embodiments, the steps of comparing the final control record with the serial port log, generating a new log, and outputting the new log include:
[0082] Step 41: Compare the final control record with the serial port log based on the timestamp;
[0083] Step 42: Output the comparison results and the serial port log to the serial port console;
[0084] Furthermore, the process of modifying the control register is determined based on the output log, thereby locating the source of the port configuration error.
[0085] like Figure 3 As shown, an embodiment of the present invention further provides a device for automatically tracing the controlled status of a port in an abnormal situation, comprising a detection module, a comparison module and a control module;
[0086] After the BMC is started, the main process of the BMC system sends a notification signal to the control module;
[0087] After receiving the notification that the BMC startup is complete, the control module notifies the detection module to start running;
[0088] The detection module reads and records the output value of the BMC port and the value of the control register when the BMC is started. When an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again. The control registers within the specified range are set according to the control register values recorded when the BMC is started, and the changes in the control registers within the specified range are continuously recorded. When the exception occurs again, the control register values within the specified range at the time of the exception are recorded as the final control record.
[0089] The comparison module compares the read control register value with the expected set value. When an exception occurs during BMC operation, the recorded control register value is compared with the value recorded at BMC startup to locate the relevant control register range. The relevant control register range is defined as a specified range. The module also compares the final control record with the serial port log, generates a new log, and outputs it. It should be noted that each action of the detection module must be executed after receiving notification from the control module.
[0090] In some embodiments, the detection module includes a reading unit, a writing unit, and a recording unit;
[0091] The reading unit is used to read the port output value as an output record or read the value of the control register as a control record after receiving the read notification;
[0092] The comparison module is specifically used to immediately report an error and correct the value of the control register when the value of the control register read by the output is inconsistent with the expected set value. It is also used to compare output record 1 with output record 2 and generate a port positioning range record for the different output records;
[0093] The write unit is used for the BMC to continue running, write the port output value in the port positioning range record to the value in output record 1, and then write the control register specified in the control positioning range record to the value in control record 1;
[0094] The recording unit continuously records the changes and timestamps of the designated control register, and when the exception occurs again, records the value of the designated control register as a final control record.
[0095] In some embodiments, the comparison module is specifically configured to compare the first output record with the second output record, and generate a port location range record from the different output records.
[0096] The recording unit is also used for the BMC to continue running, write the port output value in the port positioning range record as the value in output record one, and then write the control register specified in the control positioning range record as the value in control record one; continuously record the changes and timestamps of the specified control register. When the exception occurs again, the value of the specified control register is recorded as the final control record.
[0097] The comparison module is specifically used to compare the final control record with the serial port log based on the timestamp; the comparison result is combined with the serial port log and output on the serial port console.
[0098] Based on the output logs, the staff determined the process of modifying the control register and located the source of the port configuration error.
[0099] The detection module receives the signal sent by the control module, reads or writes the output value of the port and the control register through mmap, and generates a record file for the read content.
[0100] The control module receives the notification signal sent by the BMC and sends a "start writing" or "start reading" signal to the detection module.
[0101] The operation process is as follows.
[0102] Detection startup: After the BMC is started, the BMC system main process sends a notification signal to the control module. After receiving the notification, the control module notifies the detection module to start running.
[0103] The detection module reads the values of all control registers in the BMC chip at this time to check whether the port configuration is consistent with the expected one. The value of the SCU (System Control Register Group) determines the port enable, reset of the control registers, clock settings, etc. Therefore, the comparison module compares the SCU with its expected settings. If there is any inconsistency, an error is reported and correction is made.
[0104] The value of the control register corresponding to the port determines the function of the port, that is, the port mode, function configuration, pin function / input and output direction, etc. Therefore, the value of the control register corresponding to the port is recorded.
[0105] The detection module records the output values of all ports and saves them as output record 1. The detection module reads the values of all control registers and saves them as control record 1.
[0106] The BMC system process continues to run. When an error occurs, the output values of all ports are read again and saved as output record 2. Output record 1 is compared with output record 2 to generate a port positioning range record. Based on the port positioning range record and control record 1, a control positioning range record is obtained.
[0107] Write the port output values within the port location range to the values in output record 1. Then, write the control registers specified in the control location range record to the values in control record 1. The BMC continues to run and continuously records the changes and timestamps of the control registers until the problem recurs, at which point it stops reading.
[0108] The record of the specified control register from the time the level is set to the time the error is repeated is the final control record.
[0109] Based on the timestamp, the final control record is compared with the serial port log, and then output to the serial port console after being combined. This allows us to determine which BMC process issued which instruction and what modifications were made to the control register, resulting in the port configuration error.
[0110] When the BMC starts, the initial value of the control register is checked and automatically corrected. After the BMC starts, the change history of the control register related to the abnormality is located and recorded. The incorrect modification of the port configuration can be traced without upgrading or restarting the BMC.
[0111] An embodiment of the present invention further provides an electronic device comprising: a processor, a communication interface, a memory, and a bus, wherein the processor, the communication interface, and the memory communicate with each other via the bus. The bus can be used to transmit information between the electronic device and a sensor. The processor can call logic instructions in the memory to execute the following method: Step 1: When the BMC starts up, the value of the control register is read. When the read control register value is consistent with the expected set value, the output value of the BMC port and the value of the control register are recorded. Step 2: When an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are again recorded, and the range of the relevant control register is located by comparing them with the values recorded at the time of BMC startup. The range of the relevant control register is defined as a specified range. Step 3: The BMC continues to operate and sets the control registers within the specified range according to the values of the control registers recorded at the time of BMC startup. Changes in the control registers within the specified range are continuously recorded. When the exception occurs again, the values of the control registers within the specified range at the time of the exception are recorded as a final control record. Step 4: The final control record is compared with the serial port log, and a new log is generated and output.
[0112] In some embodiments, the processor can call logic instructions in the memory to execute the following method: Step 11: When the BMC starts, read the value of the control register; Step 12: Determine whether the value of the read control register is consistent with the expected set value; if so, execute Step 13; if not, execute Step 14; Step 13: Record the output value of the BMC port and the value of the control register; Step 14: Immediately report an error and correct the value of the control register.
[0113] In some embodiments, the processor can call logic instructions in the memory to execute the following method: Step 21: When an exception occurs during the operation of the BMC, the output values of all ports of the BMC are recorded again as output record 2; Step 22: Compare output record 1 with output record 2, and generate a port location range record for the different output records; Step 23: Obtain a control location range record based on the port location range record and control record 1.
[0114] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0115] An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the method provided by the above method embodiment, for example, including: step 1: when the BMC is started, the value of the control register is read. When the value of the read control register is consistent with the expected set value, the output value of the BMC port and the value of the control register are recorded; step 2: when an exception occurs during the operation of the BMC, the output value of the BMC port and the value of the control register are recorded again, and the range of the relevant control register is located by comparing them with the values recorded when the BMC is started; wherein the range of the relevant control register is defined as a specified range; step 3: the BMC continues to run, and sets the control registers within the located specified range according to the values of the control registers recorded when the BMC is started, and continuously records changes in the control registers within the specified range. When the exception occurs again, the values of the control registers within the specified range when the exception occurs are recorded as the final control record; step 4: comparing the final control record with the serial port log, generating a new log and outputting it.
[0116] Although the present invention has been described in detail with reference to the accompanying drawings and in conjunction with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who can easily conceive of changes or substitutions within the technical scope disclosed in the present invention shall be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope of protection of the claims.
Claims
1. A method for automatically tracing the controlled port status in the event of an abnormality, characterized in that: The steps include: When the BMC starts, it reads the value of the control register SCU of the BMC chip. When the value of the control register read is consistent with the expected set value, it records the output value of the BMC port and the value of the control register. Specifically, the output value of all BMC ports is recorded as output record 1; the values of all control registers are read and saved as control record 1. When an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again, and the range of the relevant control register is located by comparing them with the values recorded when the BMC was started; wherein the range of the relevant control register is defined as a specified range; specifically, the following steps are performed: when an exception occurs during BMC operation, the output value of all BMC ports is recorded again as output record 2; output record 1 is compared with output record 2, and different output records are used to generate a port location range record; and a control location range record is obtained based on the port location range record and control record 1. The BMC continues to run and sets the control registers within the specified range according to the values of the control registers recorded when the BMC started. It also continuously records changes in the control registers within the specified range. When an exception occurs again, the values of the control registers within the specified range at the time of the exception are recorded as the final control records. Compare the final control record with the serial port log, generate a new log and output it.
2. The method for automatically tracing the controlled port status in the event of an abnormality according to claim 1, characterized in that: When the BMC starts, the value of the control register SCU of the BMC chip is read. When the read control register value is consistent with the expected set value, the steps of recording the output value of the BMC port and the value of the control register include: When BMC starts, read the value of the control register SCU of the BMC chip; Determine whether the value of the control register read is consistent with the expected setting value; If yes, record the output value of the BMC port and the value of the control register; If not, report an error immediately and correct the value of the control register.
3. The method for automatically tracing the controlled port status in the event of an abnormality according to claim 2, characterized in that: The BMC continues to run and sets the control registers within the specified range according to the values of the control registers recorded when the BMC was started. It continuously records changes in the control registers within the specified range. When an exception occurs again, the values of the control registers within the specified range at the time of the exception are recorded as the final control record. The steps include: The BMC continues to run, writes the port output value in the port location range record to the value in output record one, and then writes the control register specified in the control location range record to the value in control record one; The changes and timestamps of the designated control register are continuously recorded. When the exception occurs again, the value of the designated control register is recorded as the final control record.
4. The method for automatically tracing the controlled port status in the event of an abnormality according to claim 3, characterized in that: The steps for comparing the final control record with the serial port log, generating a new log, and outputting it include: Compare the final control record with the serial port log based on the timestamp; Output the comparison results and serial port logs to the serial port console; Based on the output log, determine the process of modifying the control register and locate the source of the port configuration error.
5. A device for automatically tracing the controlled status of a port in the event of an abnormality, characterized in that: It includes a detection module, a comparison module and a control module; After the BMC is started, the main process of the BMC system sends a notification signal to the control module; After receiving the notification that the BMC startup is complete, the control module notifies the detection module to start running; The detection module reads and records the output value of the BMC port and the value of the control register SCU of the BMC chip when the BMC is started; specifically records the output value of all BMC ports as output record one; reads the values of all control registers and saves them as control record one; when an exception occurs during BMC operation, the output value of the BMC port and the value of the control register are recorded again; the control registers within the specified range are set according to the value of the control register recorded when the BMC is started, and the changes of the control registers within the specified range are continuously recorded. When the exception occurs again, the value of the control register within the specified range at the time of the exception is recorded as the final control record; the range of the relevant control register is defined as the specified range; the output value of all BMC ports is recorded as output record two; The comparison module is used to compare the read control register value with the expected set value. When the two are inconsistent, a log is generated and output, and a write notification is sent to the detection module. When an abnormality occurs during BMC operation, the control register value recorded again is compared with the value recorded when the BMC is started to locate the range of the relevant control register. Specifically, the output record 1 is compared with the output record 2, and the different output records are generated into a port location range record; based on the port location range record and the control record 1, a control location range record is obtained; it is also used to compare the final control record with the serial port log, generate a new log and output it.
6. The device for automatically tracing the controlled status of a port in the event of an abnormality according to claim 5, characterized in that: The detection module includes a reading unit, a writing unit, and a recording unit; The reading unit reads the value of the control register or the port output value register when receiving the read notification; The write unit, when receiving a write notification, writes a value to the control register or port output value register according to the record file and the specified range; The recording unit is used to store the data obtained by the reading unit into a recording file.
7. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to execute the method for automatically tracing the controlled port situation in an abnormal situation as described in any one of claims 1 to 4.
8. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method for automatically tracing the controlled port situation in the event of an abnormality according to any one of claims 1 to 4.
Citation Information
Patent Citations
Fault data processing method and device, server and computer readable storage medium
CN109783262A
Method and device for upgrading BMC, electronic equipment and storage medium
CN112612500A