Black box log acquisition method and device, medium and computer program product

By checking and waiting or notifying the status of the substrate management controller in a multi-node server, the substrate management controller can successfully collect the black box logs of the power supply unit in a multi-node server, solving the acquisition failure and error caused by fragmented access Alarm problem.

CN119201797AActive Publication Date: 2024-12-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411721339.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2024-12-27
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

In a multi-node server, fragmented access by the substrate management controller through the integrated circuit bus arbitration controller results in the inability to successfully collect the black box log of the power supply unit and may cause false alarms.

Method used

After detecting a failure of the power supply unit, check the status of the second substrate management controller. If it is in the state where the black box log is collected, wait for it to be collected and accessed through the integrated circuit bus; if it is not in the state, it is to be sent to it. Send local status information to ensure equal access to black box logs.

Benefits of technology

It effectively resolves the conflict between different substrate management controllers preemption to obtain black box log permissions, avoids the false alarm problem caused by fragmented access, and ensures that the substrate management controller in multi-node servers can successfully collect black box logs of the power supply unit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201797A_ABST
    Figure CN119201797A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of servers, and particularly discloses a black box log acquisition method and device, a medium and a computer program product.On a multi-node server, after a first baseboard management controller detects that a power supply unit fails, if a second baseboard management controller is in a first state of collecting black box logs, the black box logs are acquired; if yes, accessing the power supply unit through the integrated circuit bus to collect the black box log after the collection of the second substrate management controller is finished, otherwise, collecting the black box log through the integrated circuit bus after sending first information that the local is in the first state to the second substrate management controller, and sending the black box log to the second substrate management controller; the problem that other substrate management controllers generate false alarms after one substrate management controller starts to read black box logs due to fragmented access caused by arbitration of single access of a plurality of master devices of an integrated circuit bus to slave devices by an integrated circuit bus arbitration controller is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of server technology, and in particular to a method, device, medium and computer program product for obtaining a black box log. Background Art

[0002] In the traditional single-node server form, a single baseboard management controller (BMC) implements out-of-band management of server components. To achieve more advanced monitoring and management functions, dual-node server forms or server forms with more than two nodes have begun to appear. In terms of structure, in order to save hardware resources, there will be a scenario where multiple baseboard management controllers monitor the same hardware at the same time, and at this time there will be a conflict in shared hardware resources.

[0003] In order to resolve this resource conflict, the related art uses an integrated circuit bus arbitration controller to perform arbitration on a single access of multiple master devices on the integrated circuit bus to a slave device, thereby enabling multiple baseboard management controllers to access the same hardware in a fragmented manner, thereby improving access efficiency.

[0004] However, when a power supply unit (PSU) fails and the black box log of the power supply unit needs to be collected, this fragmented access cannot solve the conflict of reading the black box log by multiple nodes, and may also cause false alarms on some nodes.

[0005] How to ensure that the baseboard management controller in a multi-node server successfully collects the black box log of the power supply unit is a technical problem that technical personnel in this field need to solve. Summary of the invention

[0006] The purpose of the present invention is to provide a method, device, medium and computer program product for obtaining a black box log, which are used to solve the problem of failure in obtaining a black box log of a power supply unit caused by the fragmented acquisition of hardware information by a multi-baseboard management controller through an integrated circuit bus arbitration controller.

[0007] In order to solve the above technical problems, the present invention provides a method for obtaining a black box log, which is applied to a first baseboard management controller, comprising: After detecting a power supply unit failure, checking a state of the second baseboard management controller; If the second baseboard management controller is in the first state of collecting black box logs, wait until the second baseboard management controller completes the collection, and then access the power supply unit through the integrated circuit bus to collect the black box logs; If the second baseboard management controller is not in the first state, after sending first information indicating that the local baseboard management controller is in the first state to the second baseboard management controller, the black box log is collected through the integrated circuit bus; The first baseboard management controller and the second baseboard management controller are located in the same device and are connected to the power supply unit through an integrated circuit bus arbitration controller, and the integrated circuit bus arbitration controller is used to perform arbitration of a single access of multiple master devices of the integrated circuit bus to a slave device.

[0008] On the one hand, sending first information that the local is in the first state to the second baseboard management controller includes: The first information is sent to a shared address between the first baseboard management controller and the second baseboard management controller, so that the second baseboard management controller obtains the first information by accessing the shared address.

[0009] On the other hand, the shared address is a shared mailbox in the integrated circuit bus arbitration controller.

[0010] On the other hand, the shared address is located in a shared memory between the first baseboard management controller and the second baseboard management controller.

[0011] On the other hand, checking the state of the second baseboard management controller includes: accessing the shared address to obtain a first variable corresponding to the second baseboard management controller; The second baseboard management controller is in the first state, comprising: the first variable corresponding to the second baseboard management controller is in a first state value corresponding to the first state; The second baseboard management controller is not in the first state, including: the first variable corresponding to the second baseboard management controller is not in the first state value; Sending first information indicating that the local BMC is in the first state to the second BMC includes: setting the first variable corresponding to the first BMC in the shared address to the first state value.

[0012] On the other hand, the first status value includes: a second status value corresponding to a status of sending a black box log collection start request, and a third status value corresponding to a black box log collection process status.

[0013] On the other hand, it also includes: The state value of the second variable stored locally is set according to the collection state of the black box log.

[0014] On the other hand, setting the state value of the second variable stored locally according to the collection state of the black box log includes: If the black box log is not in a collected state, setting the second variable to a sixth state value; If the black box log is in a state of being collected locally, setting the second variable to a seventh state value; If the black box log is in a state of being collected by the second baseboard management controller, the second variable is set to an eighth state value.

[0015] On the other hand, it also includes: After restarting, checking the second variable; If the second variable is the seventh state value, second information indicating a failure in locally acquiring the black box log is sent to the second baseboard management controller to release control over the integrated circuit bus.

[0016] On the other hand, it also includes: After sending the second information to the second baseboard management controller, setting the second variable to the sixth state value; A fault log is recorded in which the black box log fails to be obtained.

[0017] On the other hand, it also includes: After restarting, checking the second variable; If the second variable is the eighth state value, checking the state of the second baseboard management controller; If the second baseboard management controller is in the first state, stopping monitoring access to the power supply unit; If the second baseboard management controller is in the second state where the black box log collection process is normal and completed or in the third state where the black box log collection process is abnormal and not completed, the second variable is set to the sixth state value.

[0018] On the other hand, detecting that the power supply unit fails includes: After querying that the power supply unit is in the on-state, accessing the power status register of the power supply unit; If the power status register is abnormal, determining that the power supply unit is faulty; The power status register includes at least one of a factory information register and a status value register.

[0019] In order to solve the above technical problems, the present invention further provides a black box log acquisition device, comprising: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for obtaining a black box log as described in any one of the above items are implemented.

[0020] In order to solve the above technical problems, the present invention also provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for obtaining a black box log as described in any one of the above items are implemented.

[0021] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method for obtaining a black box log as described in any one of the above items are implemented.

[0022] The method for obtaining black box logs provided by the present invention has the beneficial effect that on a multi-node server, after detecting a fault in a power supply unit, the first baseboard management controller checks the state of the second baseboard management controller; if the second baseboard management controller is in the first state of collecting black box logs, the power supply unit is accessed through the integrated circuit bus to collect the black box logs after waiting for the second baseboard management controller to complete the collection; if the second baseboard management controller is not in the first state, the black box logs are collected through the integrated circuit bus after sending the first information that the local is in the first state to the second baseboard management controller, thereby effectively solving the conflict of different baseboard management controllers preempting the right to obtain the black box log, and solving the problem that after one baseboard management controller starts to read the black box log, the other baseboard management controllers generate false alarms due to the fragmented access caused by the arbitration of a single access of multiple master devices of the integrated circuit bus to the slave device by the integrated circuit bus arbitration controller.

[0023] The black box log acquisition device, non-volatile storage medium and computer program product provided by the present invention have the above-mentioned beneficial effects, which will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are 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.

[0025] Figure 1 A schematic diagram of the architecture of an out-of-band monitoring system for a multi-baseboard management controller; Figure 2 A flowchart of a method for obtaining a black box log provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a black box log acquisition device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The core of the present invention is to provide a method, device, medium and computer program product for obtaining a black box log, which are used to solve the problem of failure in obtaining the black box log of a power supply unit caused by the fragmented acquisition of hardware information by a multi-baseboard management controller through an integrated circuit bus arbitration controller.

[0027] 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.

[0028] As servers are upgraded, dual-node servers or multi-node servers begin to appear. The node here refers to the server motherboard, which can be equipped with processors, memory, etc.

[0029] In order to achieve rich out-of-band monitoring and management functions, a corresponding baseboard management controller (BMC) is designed for each server motherboard, resulting in an out-of-band monitoring architecture with multiple baseboard management controllers. In order to save hardware resources in structure, there will be scenarios where multiple baseboard management controllers monitor or control the same hardware at the same time, for example: the baseboard management controllers of two nodes need to monitor the power supply unit (PSU) information and control the system fan, etc.

[0030] Figure 1 A schematic diagram of the architecture of an out-of-band monitoring system for a multi-baseboard management controller.

[0031] like Figure 1 As shown, the baseboard management controller in a server is recorded as a first baseboard management controller 101 and a second baseboard management controller 102. It should be noted that the first baseboard management controller 101 and the second baseboard management controller 102 only refer to the roles of the baseboard management controllers, which are used to distinguish the current baseboard management controller from other baseboard management controllers in the server, and the number of the second baseboard management controllers 102 can be one or more.

[0032] In a server, the baseboard management controller is usually connected to the power board 104 through an integrated circuit bus. Figure 1 As shown, the first baseboard management controller 101 and the second baseboard management controller 102 are respectively connected to the integrated circuit bus arbitration controller 103 , and the other end of the integrated circuit bus arbitration controller 103 is connected to the power board 104 .

[0033] The power board 104 may optionally be provided with two power supply units (eg Figure 1 The power supply unit 0 and the power supply unit 1 shown are also provided with sensors, firmware and other devices.

[0034] The integrated circuit bus is a multi-master and multi-slave communication bus, which can be used but not limited to a two-wire serial bus (Inter-Integrated Circuit, I2C) and an improved integrated circuit bus (Improved Inter Integrated Circuit, I3C).

[0035] In this architecture, in the communication protocol of the integrated circuit bus, the baseboard management controller is the master device (maser) and the power supply unit is the slave device (slave). The first baseboard management controller 101 and the second baseboard management controller 102 monitor the power supply unit in real time, but only one master device can communicate with the slave device through the integrated circuit bus at the same time, and at this time, arbitration is required for access to multiple master devices.

[0036] In the traditional multi-node out-of-band monitoring solution, the business thread of the baseboard management controller locks the integrated circuit bus when it needs to access the hardware through the integrated circuit bus to obtain the monitoring information of the hardware. Specifically, the baseboard management controller creates a separate thread for each integrated circuit bus, which is responsible for polling and accessing the slave devices mounted on the corresponding integrated circuit bus. When the system is initialized, each thread initializes a lock, usually a mutex, to control access to the integrated circuit bus. When the thread needs to read data from the slave device on the integrated circuit bus or write data to the slave device, the thread first tries to acquire the lock of the corresponding integrated circuit bus. If the lock is already held by other threads, the current thread waits until the lock is released. Similarly, when multiple baseboard management controllers need to occupy the integrated circuit bus, they also use locking to prevent the integrated circuit bus from being used by other baseboard management controllers during the period when the baseboard management controller performs business access to the hardware.

[0037] However, when using this method of multi-master preemption of the integrated circuit bus, if a complete business access of the baseboard management controller requires multiple accesses to the hardware, if the access is interrupted due to an exception, or if there is no exception but the overall time consumption is long, the integrated circuit bus will be occupied by a baseboard management controller for a long time, affecting other business threads or the business of other baseboard management controllers.

[0038] Moreover, this multi-master preemption integrated circuit bus mechanism requires each service thread of the baseboard management controller to deploy the code for preempting the integrated circuit bus, resulting in a large amount of repetitive code.

[0039] To this end, the relevant field proposes to use an integrated circuit bus arbitration controller 103 to perform arbitration on access to multiple master devices, replacing the above-mentioned mechanism of implementing multi-master preemption of the integrated circuit bus by the business code of the baseboard management controller, and transforming the entire business access into fragmented access.

[0040] like Figure 1 As shown, in one integrated circuit bus, one end of the integrated circuit bus arbitration controller 103 supports access to multiple baseboard management controllers, and the other end is connected to the slave device. In terms of software, the integrated circuit bus arbitration controller 103 adopts a fragmentation processing mechanism, performs arbitration in the kernel state, and preempts the arbitration of the integrated circuit bus for a single access of each master device.

[0041] For example, when the first baseboard management controller 101 needs to obtain the register status of the power supply unit, it sends a command to obtain the register status value to the power supply unit through the integrated circuit bus, and the bottom layer will perform bus arbitration through the integrated circuit bus arbitration controller 103. After successfully obtaining the control right of the integrated circuit bus, the command will be sent to the power supply unit and the return value will be successfully obtained. At the same time, the second baseboard management controller 102 is also constantly sending a request to obtain control right to the integrated circuit bus arbitration controller 103 through the integrated circuit bus. After the request is successful, the second baseboard management controller 102 will obtain the register status value of the power supply unit through the integrated circuit bus.

[0042] It can be seen from the above processing that the number of times the control right of the integrated circuit bus is obtained in each stage is dynamic and unpredictable. The first baseboard management controller 101 obtains the control right of the integrated circuit bus this time, but it cannot be guaranteed that it can continue to obtain the control right next time. This fragmented reading method will not affect the baseboard management controller to obtain some hardware information, but it will cause the reading of the black box log of the power supply unit to fail.

[0043] The black box log of the power supply unit refers to the reading log of each register when the power supply unit fails. The power engineer can further analyze what kind of failure the power supply unit has according to the reading of the fault history register, so it is very important for the baseboard management controller to obtain the black box log at the time when the power supply unit fails. The power supply unit is based on the ability to record three failure histories. When recording the black box log, the baseboard management controller will save these three records in its own one-click log. When the user finds that the power supply unit has a fault, he can download the one-click log of the baseboard management controller to view the black box log of the power supply unit.

[0044] When the baseboard management controller reads the black box log of the power supply unit, it is first necessary to operate the factory information register (MfrPage) of the power supply unit to put the power supply unit into the black box mode. At this time, the meaning of the values ​​of other registers no longer represents the current reading value, but refers to the historical wrong reading value. Therefore, if the first baseboard management controller 101 detects that the power supply unit has failed and records the black box log of the power supply unit, after operating the above registers, the second baseboard management controller 102 must stop polling the power supply unit, otherwise the reading values ​​of other registers obtained by the second baseboard management controller 102 are all wrong, which will generate an error alarm for the power supply unit.

[0045] That is to say, if the fragmented access mechanism formed by the integrated circuit bus arbitration controller 103 introduced above is adopted, multiple baseboard management controllers in the server cannot read the black box log of the power supply unit equally, and when one baseboard management controller reads the black box log, it will also cause other baseboard management controllers to generate false alarms for the power supply unit.

[0046] In summary, it can be seen that although the fragmented access mechanism formed based on the integrated circuit bus arbitration controller 103 can improve the utilization efficiency of hardware resources and save the code of the business application layer of the baseboard management controller to obtain bus control through locking, it will cause the baseboard management controllers of multiple nodes to be unable to read the black box logs equally, affecting other baseboard management controllers to obtain the correct monitoring information of the power supply unit.

[0047] To solve the above problems, an embodiment of the present invention provides a scheme for obtaining black box logs. On a multi-node server, after detecting a failure of a power supply unit, the first baseboard management controller checks the status of the second baseboard management controller; if the second baseboard management controller is in the first state of collecting black box logs, the power supply unit is accessed through the integrated circuit bus to collect the black box logs after the second baseboard management controller completes the collection; if the second baseboard management controller is not in the first state, the black box logs are collected through the integrated circuit bus after sending first information that the local baseboard management controller is in the first state, thereby effectively solving the conflict of different baseboard management controllers preempting the right to obtain the black box log, and solving the problem of other baseboard management controllers generating false alarms after one baseboard management controller starts reading the black box log due to fragmented access caused by arbitration of a single access of multiple master devices of the integrated circuit bus to slave devices by an integrated circuit bus arbitration controller.

[0048] The following describes a method for obtaining a black box log provided by an embodiment of the present invention in conjunction with the accompanying drawings.

[0049] Figure 2A flowchart of a method for obtaining a black box log provided by an embodiment of the present invention.

[0050] like Figure 2 As shown, the method for obtaining a black box log provided by an embodiment of the present invention, applied to a first baseboard management controller, includes: S201: After detecting a power supply unit failure, checking the state of the second baseboard management controller; S202: if there is a second baseboard management controller in the first state of collecting black box logs, wait until the second baseboard management controller completes the collection, and then access the power supply unit through the integrated circuit bus to collect the black box logs; S203: If the second baseboard management controller is not in the first state, after sending first information indicating that the local baseboard management controller is in the first state to the second baseboard management controller, the black box log is collected through the integrated circuit bus.

[0051] The first baseboard management controller and the second baseboard management controller are located in the same device and connected to the power supply unit through an integrated circuit bus arbitration controller, which is used to perform arbitration of a single access of multiple master devices of the integrated circuit bus to the slave device.

[0052] It should be noted that, in the embodiments of the present invention, the first baseboard management controller and the second baseboard management controller only refer to the roles of the baseboard management controller, which are used to distinguish the current baseboard management controller from other baseboard management controllers in the server, and the number of the second baseboard management controllers can be one or more. In the embodiments of the present invention, the connection relationship between the baseboard management controller and the power supply unit through the integrated circuit bus and the integrated circuit bus arbitration controller can refer to Figure 1 Description.

[0053] In the embodiment of the present invention, the type of the integrated circuit bus arbitration controller corresponds to the number of baseboard management controllers. For example, in a dual-node server, a two-choice integrated circuit bus master device selector PCA9641, PCA9541A, etc. can be used. In a server with more nodes, a four-choice integrated circuit bus master device selector PCA9544A, an eight-choice integrated circuit bus master device selector PCA9548A, etc. can be selected.

[0054] For S201, detecting a power supply unit failure may include: after querying that the power supply unit is in the on-site state, accessing the power supply status register of the power supply unit; if the power supply status register is abnormal, determining that the power supply unit is faulty; wherein the power supply status register includes at least one of a factory information register and a status value register.

[0055] In a specific implementation, when the baseboard management controller periodically polls the in-place status of the power supply unit, a fault diagnosis is performed on the in-place power supply unit, and if a power supply unit fault occurs, a black box log is collected.

[0056] Specifically, there are two scenarios: if the factory information register (MfrPage) is abnormal, the baseboard management controller collects black box logs; if the status value register (StatusWord) (0x79) is abnormal and the abnormal value is different from the last time, black box logs are collected.

[0057] The content of the black box log may include: the number of the power supply unit, the value of the factory information register, the value of the abnormal target register, and other information.

[0058] The baseboard management controller only needs to collect the fault register information and does not need to clear the fault register content.

[0059] The target fault registers collected may include: output current status register (STATUS_IOUT, 0x7b), power input status register (STATUS_INPUT, 0x7c), temperature status register (STATUS_TEMPERATUR, 0x7d), communication, logic and memory status register (STATUS_CML, 0x7e), manufacturer-related alarm status register (STATUS_MFR_SPEC, 0x80), fan status register (STATUS_FANS_1_2, 0x81), read input voltage information register (READ_VIN, 0x88), read input current information register (READ_IIN, 0x89), read power consumption information register (READ_ECAP, 0x8a), read output voltage information register (READ_R EAD_VOUT, 0x8b), Read Output Current Information Register (READ_IOUT, 0x8c), Ambient Temperature Register (AMBIENT_TEMPERAT, 0x8d), Secondary Temperature Register (SECONDARY_TEMPER, 0x8e), Primary Temperature Register (PRIMARY_TEMPERAT, 0x8f), Fan Speed ​​Register (FAN_SPEED_1, 0x90), Read Output Power Information Register (READ_POUT, 0x96), Read Input Power Information Register (READ_PIN, 0x97), Manufacturer Specific Information Register (MFR_POS_TOTAL, 0xe5), Last or Last Requested Manufacturer Specific Information Register (MFR_POS_LAST, 0xe6).

[0060] The format of the recorded black box log can be: PSU-0, Page-0: cmd-0x79: byte-0: 0x48, byte-1: 0x28, cmd-0x7a: byte-0: 0x0, cmd-0x7b: byte-0: 0x0, cmd-0x7c: byte-0: 0x38, cmd-0x7d: byte-0: 0x0, cmd-0x7e: byte-0: 0x0, cmd -0x80:byte-0:0x0,cmd-0x81:byte-0:0x0,cmd-0x88:byte-0:0x0,byte-1:0x0,cmd-0x89:byte- 0:0x0,byte-1:0x0,cmd-0x8a:byte-0:0x9b,byte-1:0x1,cmd-0x8b:byte-0:0x0,byte-1:0x0,cmd -0x8c:byte-0:0x0,byte-1:0x0,cmd-0x8d:byte-0:0x79,byte-1:0xdb,cmd-0x8e:byte-0:0x17, byte-1:0xe2,cmd-0x8f:byte-0:0x58,byte-1:0xe2,cmd-0x90:byte-0:0xad,byte-1:0x1b,cmd- 0x96:byte-0:0x0,byte-1:0x0,cmd-0x97:byte-0:0x0,byte-1:0x0,cmd-0xe5:byte-0:0x0,byte -1:0x78,byte-2:0x0,byte-3:0x0,cmd-0xe6:byte-0:0xb,byte-1:0x0,byte-2:0x0,byte-3:0x0.

[0061] Among them, "PSU-0" indicates the identification of the power supply unit; "Page-0" indicates the log page number; "cmd-" indicates the command (Command), and the command code after "-" is used to execute a specific function, corresponding to different; "byte-" indicates the data bit, and the specific number of data bits is after "-".

[0062] On a multi-node server, each baseboard management controller can collect black box logs. When one baseboard management controller collects black box logs, it will affect the access of another baseboard management controller to the power supply unit. In addition, the baseboard management controllers need to collect black box logs mutually exclusively.

[0063] In order to complete the collection of black box logs in a multi-node scenario, in an embodiment of the present invention, after detecting a power supply unit failure, the first baseboard management controller first checks the status of the second baseboard management controller. The second baseboard management controller here includes all other baseboard management controllers that are connected to the power supply unit through the same integrated circuit bus arbitration controller as the first baseboard management controller.

[0064] In the embodiment of the present invention, for ease of explanation, the state in which the baseboard management controller is collecting black box logs is defined as the first state so that each baseboard management controller can be informed that other baseboard management controllers are in the first state. In the embodiment of the present invention, after obtaining control of the integrated circuit bus, the baseboard management controller first sends the first information to other baseboard management controllers, and then starts reading the black box log.

[0065] For S202, if the first baseboard management controller has received the first information sent by the second baseboard management controller, it is determined that the second baseboard management controller is in the first state. At this time, the first baseboard management controller remains waiting without applying for control of the integrated circuit bus until it is determined that the second baseboard management controller has completed the collection, and then applies for control of the integrated circuit bus to read the black box log.

[0066] For S203, if the first baseboard management controller has not received the first information sent by the second baseboard management controller, it is determined that the second baseboard management controller is not in the first state. At this time, the first baseboard management controller first sends the first information to the second baseboard management controller to prevent the second baseboard management controller from reading the black box log, and then applies for the control right of the integrated circuit bus and collects the black box log through the integrated circuit bus.

[0067] In order to enable the second baseboard management controller to know that the first baseboard management controller has completed collecting black box logs, when the first baseboard management controller completes collecting black box logs, it sends third information indicating that the black box log collection process is normal and completed to the second baseboard management controller.

[0068] After applying the method for obtaining the black box log provided by the embodiment of the present invention, when the baseboard management controller needs to obtain other hardware information, it can also directly adopt the method of applying for the control right of the integrated circuit bus and then waiting for the integrated circuit bus arbitration controller to arbitrate to achieve fragmented access. However, when it is necessary to collect the black box log, when a baseboard management controller enters the black box log state, other baseboard management controllers will no longer access the power supply unit until the current baseboard management controller has completed the collection, and then another baseboard management controller can enable access to the power supply unit.

[0069] According to the method for obtaining black box logs provided by the embodiment of the present invention, on a multi-node server, after detecting a fault in a power supply unit, the first baseboard management controller checks the state of the second baseboard management controller; if the second baseboard management controller is in the first state of collecting black box logs, the power supply unit is accessed through the integrated circuit bus to collect the black box logs after the second baseboard management controller completes the collection; if the second baseboard management controller is not in the first state, the black box logs are collected through the integrated circuit bus after sending first information that the local area is in the first state to the second baseboard management controller, thereby effectively solving the conflict of different baseboard management controllers preempting the right to obtain the black box log, and solving the problem that after one baseboard management controller starts to read the black box log, the arbitration of a single access of multiple master devices of the integrated circuit bus to the slave device is realized by the integrated circuit bus arbitration controller, and other baseboard management controllers generate false alarms.

[0070] On the basis of the above embodiment, the embodiment of the present invention describes the specific steps of the first baseboard management controller sending the first information to the second baseboard management controller.

[0071] In the embodiment of the present invention, the first baseboard management controller communicates with the second baseboard management controller to convey the state of collecting black box logs.

[0072] In some optional implementations of the embodiments of the present invention, sending first information that the local state is in the first state to the second baseboard management controller in S203 may include: sending the first information to the second baseboard management controller through a general purpose input / output interface (GPIO).

[0073] In some other optional implementations of the embodiment of the present invention, sending the first information that the local is in the first state to the second baseboard management controller in S203 may also include: sending the first information to the second baseboard management controller through a coprocessor. The coprocessor may be a complex programmable logic device (CPLD), such as a CPLD of a fan board.

[0074] In some further optional implementations of the embodiments of the present invention, sending the first information in the first state locally to the second baseboard management controller in S203 may also include: sending the first information to a shared address between the first baseboard management controller and the second baseboard management controller, so that the second baseboard management controller obtains the first information by accessing the shared address.

[0075] The shared address may be a shared mailbox in the integrated circuit bus arbitration controller.

[0076] In a specific implementation, when the first baseboard management controller reads the black box log, it notifies the second baseboard management controller through the shared mailbox, and notifies the second baseboard management controller again of the end of collection when the collection is completed. After receiving the data from the shared mailbox, the second baseboard management controller terminates the access to the power supply unit when it determines that the first baseboard management controller is in the first state of collecting black box logs, until the first baseboard management controller completes the collection of black box logs and then opens the access to the power supply unit.

[0077] Take the example of a two-to-one integrated circuit bus arbitration controller (such as PAC9641) in a dual-node server. The shared mailbox contains two 8-bit bidirectional storage units (boxes) for communication between two baseboard management controllers. Each baseboard management controller has a high mailbox (MB HI) and a low mailbox (MB LO) register on its address map. A total of 16 bits can be used. The shared mailbox includes two states, "MBOX FULL" and "MBOX EMPTY", to facilitate data flow and prevent data loss or corruption. When a baseboard management controller wants to send data, it must check the MBOXEMPTY status bit. When the MBOX EMPTY status bit is 1 (EMPTY), the master server can write to the mailbox. If the MBOXEMPTY status bit is 0, it contains data from another host. If it has not been read or written at this time, it will cause data loss / corruption. When the MBOX FULL status bit of a host is set, it means that there is data from another host in the mailbox that has not been read yet. The master can read the mailboxes in any order, but the FULL flag is not cleared until MB LO and MB HI have been read. When they are read, the sending host's MBOX EMPTY status bit is set, indicating that the data has been read and the mailbox is ready for more data. When they are read, the receiving host's MBOX FULL status bit is cleared, indicating that there is no new data in the mailbox to read.

[0078] Alternatively, the shared address may also be set in a shared memory between the first baseboard management controller and the second baseboard management controller.

[0079] In the embodiment of the present invention, checking the state of the second baseboard management controller in S201 may include: accessing a shared address to obtain a first variable corresponding to the second baseboard management controller.

[0080] In S202, the second baseboard management controller is in the first state, which may include: a first variable corresponding to the second baseboard management controller is in a first state value corresponding to the first state.

[0081] In S203, the second baseboard management controller is not in the first state, which may include: a first variable corresponding to the second baseboard management controller is not in the first state value.

[0082] The sending of the first information that the local BMC is in the first state in S203 may include: setting a first variable corresponding to the first BMC in the shared address to a first state value.

[0083] In the embodiment of the present invention, a first variable (which may be recorded as variable A) may be defined to realize the state of each baseboard management controller communicating with each other to collect black box logs.

[0084] In some optional implementations of the embodiments of the present invention, the first status value may include: a second status value corresponding to a status of sending a black box log collection start request, and a third status value corresponding to a black box log collection process status.

[0085] In addition, in order to communicate the status of completing the collection of black box logs and the status of abnormal collection of black box logs, the fourth status value of the first variable can also be defined as the status of the black box log collection process being normal and completed, and the fifth status value of the first variable can be defined as the status of the black box log collection process being abnormal and not completed.

[0086] Then the state value of the first variable may include: A=0, no request to collect black box logs; A=0x01 (also referred to as the second state value in the embodiment of the present invention), sending a request to start collecting black box logs; A=0x02 (also called the third state value in the embodiment of the present invention), start collecting black box logs; A=0x03 (also called the fourth state value in the embodiment of the present invention), the black box log collection process is normal and ends; A=0x04 (also referred to as the fifth status value in the embodiment of the present invention), the black box log collection process is abnormal and has not ended.

[0087] Before the baseboard management controller starts collecting black box logs and during the process of collecting black box logs, the first variable in the shared address can be set to a corresponding state so that other baseboard management controllers can know the state of collecting black box logs locally.

[0088] In the shared address, each baseboard management controller has a one-to-one corresponding first variable for other baseboard management controllers to view.

[0089] On the basis of the above embodiment, the method for obtaining a black box log provided by the embodiment of the present invention may further include: setting a state value of a second variable stored locally according to a collection state of the black box log.

[0090] Since collecting black box logs takes a certain amount of time, in order to enable the baseboard management controller to locally learn the collection status of the black box logs, an embodiment of the present invention defines a second variable (which can be recorded as variable Psublackboxcollectflag) stored locally in the baseboard management controller so that the baseboard management controller can know whether the power supply unit is in a state where the black box logs are being collected.

[0091] In the embodiment of the present invention, the second variable may be stored in a local non-volatile medium of the baseboard management controller.

[0092] In an embodiment of the present invention, setting the state value of a second variable stored locally according to the collection state of the black box log may include: if the black box log is not in a collected state, setting the second variable to a sixth state value; if the black box log is in a state of being collected locally, setting the second variable to a seventh state value; if the black box log is in a state of being collected by a second baseboard management controller, setting the second variable to an eighth state value.

[0093] Then the state value of the second variable may include: Psublackboxcollectflag=0x00 (also called the sixth state value in the embodiment of the present invention), black box logs are not being collected; Psublackboxcollectflag=0x01(master) (also called the seventh status value in the embodiment of the present invention), the black box log is being collected locally; Psublackboxcollectflag=0x02(slave) (also called the eighth state value in the embodiment of the present invention), the black box log is being collected by other baseboard management controllers.

[0094] On the basis of the above embodiment, taking a dual-node server as an example, the embodiment of the present invention continues to explain the process of the first baseboard management controller collecting black box logs.

[0095] The collection of black box logs is mainly completed by the power supply unit monitoring service of the baseboard management controller. During the periodic polling of the power supply unit, if it is determined that the power supply unit has a fault, the black box log will be collected. In this process, the first baseboard management controller can perform the following steps S301~S315.

[0096] S301: Run the power supply unit monitoring service.

[0097] S302: Read the register of the power supply unit to determine whether the black box log collection condition is met. If yes, proceed to S303; if not, return to S301.

[0098] S303: Determine whether the power supply unit is in an upgrade state. If yes, return to S301; if no, enter S304.

[0099] S304: Determine whether the status register "MBOX FULL" in the shared mailbox is set. If yes, proceed to S305; if not, return to S304 after the polling times out (such as more than 10 seconds).

[0100] S305: Read the first variable A in the shared mailbox, and determine whether the first variable A is the second state value (0x01, send a black box log collection start request) or the third state value (0x02, start collecting black box logs). If not, proceed to S306.

[0101] S306: Determine whether the status register "MBOX EMPTY" in the shared mailbox is 1. If yes, proceed to S307; if not, return to S306 after the polling times out (eg, exceeds 10 seconds).

[0102] S307: Set the first variable A in the shared mailbox to 0x01 (send a request to start collecting black box logs).

[0103] S308: Determine whether the status register "MBOX FULL" in the shared mailbox is set. If yes, proceed to S309; ​​if not, return to S308 when the polling times out (for example, if the second baseboard management controller does not respond for more than 1 minute, the first baseboard management controller seizes the integrated circuit bus).

[0104] S309: Determine whether the first variable A in the shared mailbox is 0x02 (start collecting black box logs). If yes, proceed to S310; if no, return to S308.

[0105] S310: Set the local second variable Psublackboxcollectflag to 0x01 (black box logs are being collected locally).

[0106] S311: Seize the integrated circuit bus arbitration controller and execute the black box log collection process.

[0107] S312: Determine whether the status register "MBOX EMPTY" in the shared mailbox is 1. If yes, proceed to S313; if not, return to S312 after the polling times out (eg, exceeds 10 seconds).

[0108] S313: Set the first variable A in the shared mailbox to 0x03 (the black box log collection process is normal and completed) to notify the second baseboard management controller that the collection is completed.

[0109] S314: Set the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).

[0110] S315: Release the control right over the integrated circuit bus arbitration controller.

[0111] In the above process, the steps performed by the second baseboard management controller are shown in S401 to S410 below.

[0112] S401: Interact and communicate with a first baseboard management controller.

[0113] S402: Determine whether the status register "MBOX FULL" in the shared mailbox is set. If yes, proceed to S403; if not, return to S402 after the polling times out (such as more than 10 seconds).

[0114] S403: Read the first variable A in the shared mailbox, and proceed to S404 or S408 according to the reading result.

[0115] S404: Determine whether the first variable A is 0x01 (send a black box log collection start request). If yes, proceed to S405.

[0116] S405: Set the local second variable Psublackboxcollectflag to 0x02 (black box logs are being collected by other baseboard management controllers).

[0117] S406: Stop applying for resources from the integrated circuit bus arbitration controller.

[0118] S407: Set the value of the first variable A in the shared mailbox to 0x02 to notify the first baseboard management controller that it can start collecting black box logs.

[0119] S408: Determine whether the first variable A is 0x03 (the black box log collection process is normal and ends). If yes, proceed to S409.

[0120] S409: Set the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).

[0121] S410: Resume resource application to the integrated circuit bus arbitration controller.

[0122] When the baseboard management controller is collecting black box logs, in order to handle abnormal restart situations that may occur in the process of collecting black box logs for the baseboard management controller, when the baseboard management controller restarts, the collection status of the black box log can be obtained according to the second variable stored locally to determine whether the power supply unit is currently accessible.

[0123] The method for obtaining the black box log provided by the embodiment of the present invention may further include: after restarting, checking the second variable; if the second variable is the seventh state value, sending second information indicating failure to obtain the black box log locally to the second baseboard management controller to release control over the integrated circuit bus.

[0124] In the embodiment of the present invention, the second information is defined as information that indicates a failure in locally obtaining a black box log and is sent to other baseboard management controllers.

[0125] That is to say, if the first baseboard management controller checks the local second variable after restarting, and finds that the local black box log was being collected before the restart and the restart occurred before the collection was completed, it is necessary to release the control of the integrated circuit bus in time to restore the normal use of the integrated circuit bus by each baseboard management controller.

[0126] The method for obtaining a black box log provided by the embodiment of the present invention may further include: after sending the second information to the second baseboard management controller, setting the second variable to a sixth state value; and recording a fault log of failure to obtain the black box log.

[0127] That is to say, if the first baseboard management controller checks the local second variable after restarting, and finds that the local black box log was being collected before the restart and the restart occurs before the collection is completed, the local second variable is set to the sixth state value (i.e., Psublackboxcollectflag=0x00) to record the status of each baseboard management controller resuming normal use of the integrated circuit bus, and record the fault log of the failure to obtain the black box log to facilitate problem location.

[0128] The method for obtaining the black box log provided by the embodiment of the present invention may also include: after restarting, checking the second variable; if the second variable is the eighth state value, checking the state of the second baseboard management controller; if the second baseboard management controller is in the first state, stopping monitoring the access to the power supply unit; if the second baseboard management controller is in the second state in which the black box log collection process is normal and ended or the third state in which the black box log collection process is abnormal and not ended, setting the second variable to the sixth state value.

[0129] That is to say, if the first baseboard management controller checks the local second variable after restarting and finds that the black box log is being collected by other baseboard management controllers before restarting, then the state of the second baseboard management controller is checked to verify whether the second baseboard management controller is in the normal process of collecting black box logs. If the second baseboard management controller is in the normal process of collecting black box logs, the first baseboard management controller stops the resource application to the integrated circuit bus arbitration controller. If the second baseboard management controller is in the second state where the black box log collection process is normal and ended or the third state where the black box log collection process is abnormal and not ended, the first baseboard management controller sets the local second variable to the sixth state value where the black box log is not being collected to resume the resource application to the integrated circuit bus arbitration controller.

[0130] For the scenario where the baseboard management controller restarts abnormally during the black box log collection process, the specific process is as follows.

[0131] If the first baseboard management controller abnormally restarts during the process of collecting the black box log, the first baseboard management controller executes the following steps S501 to S505 .

[0132] S501: A first baseboard management controller is restarted during the process of collecting black box logs.

[0133] S502: The first baseboard management controller determines whether the local second variable Psublackboxcollectflag is 0x01 (black box logs are being collected locally). If yes, the process proceeds to S503.

[0134] S503: The first baseboard management controller sets the value of the first variable A in the shared mailbox to 0x04 (the black box log collection process is abnormal and has not ended).

[0135] S504: The first baseboard management controller records a fault log of failure in obtaining a black box log.

[0136] S505: The first baseboard management controller sets the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).

[0137] In the above process, the second baseboard management controller executes the following steps S506 to S508.

[0138] S506: The second baseboard management controller determines whether the value of the first variable A in the shared mailbox is 0x04 (the black box log collection process is abnormal and has not ended). If yes, proceed to S507.

[0139] S507: The second baseboard management controller sets the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).

[0140] S508: The second baseboard management controller resumes the resource application to the integrated circuit bus arbitration controller and accesses the power supply unit normally.

[0141] If the second baseboard management controller abnormally restarts during the process of the first baseboard management controller collecting the black box log, the second baseboard management controller executes the following steps S601 to S607 .

[0142] S601: While the first baseboard management controller is collecting black box logs, the second baseboard management controller is restarted.

[0143] S602: The second baseboard management controller determines whether the local second variable Psublackboxcollectflag is 0x02 (black box logs are being collected by other baseboard management controllers). If yes, the process proceeds to S603.

[0144] S603: The second baseboard management controller reads the value of the first variable A in the shared mailbox.

[0145] S604: The second baseboard management controller determines whether the first baseboard management controller has completed the collection of black box logs or whether the black box log collection process is abnormal. If yes, proceed to S605; if not, proceed to S607.

[0146] S605: The second baseboard management controller sets the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).

[0147] S606: The second baseboard management controller resumes the resource application to the integrated circuit bus arbitration controller and accesses the power supply unit normally.

[0148] S607: The second baseboard management controller stops monitoring the power supply unit and responding to device access.

[0149] Through the above method, after an abnormal restart occurs in the process of the baseboard management controller collecting black box logs, another baseboard management controller can also resume the preemption of the integrated circuit bus arbitration controller to monitor the power supply unit.

[0150] It should be noted that in the embodiments of the methods for obtaining black box logs of the present invention, some of the steps or features may be ignored or not executed. The hardware or software functional modules divided for the convenience of description are not the only implementation form of the methods for obtaining black box logs provided in the embodiments of the present invention.

[0151] The above describes in detail various embodiments corresponding to the method for obtaining a black box log. On this basis, the present invention also discloses a black box log obtaining device, equipment, non-volatile storage medium and computer program product corresponding to the above method.

[0152] Applied to the first baseboard management controller, the device for obtaining the black box log provided by the embodiment of the present invention may include: The power supply unit status monitoring unit is used to detect the status of the power supply unit. A resource application unit, configured to check the state of the second baseboard management controller after detecting a failure of the power supply unit; The black box log collection unit is configured to, if the second baseboard management controller is in the first state of collecting black box logs, wait for the second baseboard management controller to complete the collection, and then access the power supply unit through the integrated circuit bus to collect the black box logs; if the second baseboard management controller is not in the first state, send first information that the local is in the first state to the second baseboard management controller, and then collect the black box logs through the integrated circuit bus; The first baseboard management controller and the second baseboard management controller are located in the same device and connected to the power supply unit through an integrated circuit bus arbitration controller, which is used to perform arbitration of a single access of multiple master devices of the integrated circuit bus to the slave device.

[0153] The device for obtaining a black box log provided by an embodiment of the present invention may further include: The black box log status recording unit is used to set the status value of the second variable stored locally according to the collection status of the black box log. The black box log status recording unit is also used to set the second variable to the sixth state value if the black box log is not in the collected state; set the second variable to the seventh state value if the black box log is in the state of being collected locally; and set the second variable to the eighth state value if the black box log is in the state of being collected by the second baseboard management controller.

[0154] The black box log status recording unit is also used to check the second variable after restarting; if the second variable is the seventh state value, send the second information of failure to obtain the black box log locally to the second baseboard management controller to release the control right of the integrated circuit bus.

[0155] The black box log state recording unit is further used to set the second variable to a sixth state value after sending the second information to the second baseboard management controller; and record a fault log of failure to obtain the black box log.

[0156] The black box log status recording unit is also used to check the second variable after restart; if the second variable is the eighth state value, check the state of the second baseboard management controller; if the second baseboard management controller is in the first state, stop monitoring access to the power supply unit; if the second baseboard management controller is in the second state in which the black box log collection process is normal and ended or the third state in which the black box log collection process is abnormal and not ended, set the second variable to the sixth state value.

[0157] It should be noted that in each implementation of the device for obtaining a black box log provided in an embodiment of the present invention, the division of units is only a logical functional division, and other division methods may be used. The connection method between different units may be electrical, mechanical or other connection methods. Separated units may be located in the same physical location or distributed on multiple network nodes. Each unit may be implemented in the form of hardware or in the form of a software functional unit. That is, part or all of the units provided in the embodiment of the present invention may be selected according to actual needs and a corresponding connection method or integration method may be adopted to achieve the purpose of the embodiment of the present invention.

[0158] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0159] Figure 3 A schematic diagram of the structure of a black box log acquisition device provided by an embodiment of the present invention.

[0160] like Figure 3 As shown, the black box log acquisition device provided by an embodiment of the present invention includes: a memory 310, used to store a computer program 311; a processor 320, used to execute the computer program 311, and when the computer program 311 is executed by the processor 320, the steps of the black box log acquisition method provided in any one of the above embodiments are implemented.

[0161] Among them, the processor 320 may include one or more processing cores, such as a 3-core processor, an 8-core processor, etc. The processor 320 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 320 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 320 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 320 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0162] The memory 310 may include one or more non-volatile storage media, which may be non-transitory. The memory 310 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 310 is at least used to store the following computer program 311, wherein the computer program 311, after being loaded and executed by the processor 320, can implement the relevant steps in the method for obtaining the black box log disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 310 may also include an operating system 312 and data 313, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 312 may be Windows or other types of operating systems. Data 313 may include, but is not limited to, the data involved in the above method.

[0163] In some embodiments, the black box log acquisition device may further include a display screen 330 , a power supply 340 , a communication interface 350 , an input and output interface 360 ​​, a sensor 370 , and a communication bus 380 .

[0164] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the device for obtaining black box logs, and may include more or fewer components than those shown in the figure.

[0165] The black box log acquisition device provided in an embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the steps of the black box log acquisition method provided in the above embodiment, and the effect is the same as above.

[0166] An embodiment of the present invention provides a non-volatile storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for obtaining a black box log provided in any one of the above embodiments can be implemented.

[0167] The non-volatile storage medium may include: 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, and other media that can store program codes.

[0168] For the introduction of the non-volatile storage medium provided in the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the method for obtaining the black box log provided in the embodiment of the present invention, and the present invention will not be elaborated here.

[0169] An embodiment of the present invention provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method for obtaining a black box log provided in any one of the above embodiments are implemented.

[0170] For an introduction to the computer program product provided in the embodiment of the present invention, please refer to the above method embodiment, and the effect thereof is the same as the method for obtaining the black box log provided in the embodiment of the present invention, and the present invention will not elaborate on it here.

[0171] The above is a detailed introduction to a method, device, equipment and non-volatile storage medium for obtaining a black box log provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the devices, equipment, non-volatile storage media and computer program products disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0172] It should also be noted that, in this specification, 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 "comprise", "include" 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for obtaining black box logs, characterized in that: Applicable to the first baseboard management controller, comprising: After detecting a power supply unit failure, checking a state of the second baseboard management controller; If the second baseboard management controller is in the first state of collecting black box logs, wait until the second baseboard management controller completes the collection, and then access the power supply unit through the integrated circuit bus to collect the black box logs; If the second baseboard management controller is not in the first state, after sending first information indicating that the local baseboard management controller is in the first state to the second baseboard management controller, the black box log is collected through the integrated circuit bus; The first baseboard management controller and the second baseboard management controller are located in the same device and are connected to the power supply unit through an integrated circuit bus arbitration controller, and the integrated circuit bus arbitration controller is used to perform arbitration of a single access of multiple master devices of the integrated circuit bus to a slave device.

2. The method for obtaining black box logs according to claim 1, characterized in that: Sending first information that the local area is in the first state to the second baseboard management controller includes: The first information is sent to a shared address between the first baseboard management controller and the second baseboard management controller, so that the second baseboard management controller obtains the first information by accessing the shared address.

3. The method for obtaining black box logs according to claim 2, characterized in that: The shared address is a shared mailbox in the integrated circuit bus arbitration controller.

4. The method for obtaining black box logs according to claim 2, characterized in that: The shared address is located in a shared memory between the first baseboard management controller and the second baseboard management controller.

5. The method for obtaining black box logs according to claim 2, characterized in that: Checking the state of the second baseboard management controller includes: accessing the shared address to obtain a first variable corresponding to the second baseboard management controller; The second baseboard management controller is in the first state, comprising: the first variable corresponding to the second baseboard management controller is in a first state value corresponding to the first state; The second baseboard management controller is not in the first state, including: the first variable corresponding to the second baseboard management controller is not in the first state value; Sending first information indicating that the local BMC is in the first state to the second BMC includes: setting the first variable corresponding to the first BMC in the shared address to the first state value.

6. The method for obtaining black box logs according to claim 5, characterized in that: The first status value includes: a second status value corresponding to a status of sending a black box log collection start request, and a third status value corresponding to a black box log collection process status.

7. The method for obtaining black box logs according to claim 1, characterized in that: Also includes: The state value of the second variable stored locally is set according to the collection state of the black box log.

8. The method for obtaining black box logs according to claim 7, characterized in that: Setting the state value of the second variable stored locally according to the collection state of the black box log includes: If the black box log is not in a collected state, setting the second variable to a sixth state value; If the black box log is in a state of being collected locally, setting the second variable to a seventh state value; If the black box log is in a state of being collected by the second baseboard management controller, the second variable is set to an eighth state value.

9. The method for obtaining black box logs according to claim 8, characterized in that: Also includes: After restarting, checking the second variable; If the second variable is the seventh state value, second information indicating a failure in locally acquiring the black box log is sent to the second baseboard management controller to release control over the integrated circuit bus.

10. The method for obtaining black box logs according to claim 9, characterized in that: Also includes: After sending the second information to the second baseboard management controller, setting the second variable to the sixth state value; A fault log is recorded in which the black box log fails to be obtained.

11. The method for obtaining black box logs according to claim 8, characterized in that: Also includes: After restarting, checking the second variable; If the second variable is the eighth state value, checking the state of the second baseboard management controller; If the second baseboard management controller is in the first state, stopping monitoring access to the power supply unit; If the second baseboard management controller is in the second state where the black box log collection process is normal and completed or in the third state where the black box log collection process is abnormal and not completed, the second variable is set to the sixth state value.

12. The method for obtaining black box logs according to claim 1, characterized in that: Detecting a failure of the power supply unit includes: After querying that the power supply unit is in the on-state, accessing the power status register of the power supply unit; If the power status register is abnormal, determining that the power supply unit is faulty; The power status register includes at least one of a factory information register and a status value register.

13. A device for obtaining black box logs, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for obtaining a black box log as described in any one of claims 1 to 12 are implemented.

14. A non-volatile storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for obtaining a black box log as described in any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for obtaining a black box log as described in any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • A data communication synchronization method based on a shared memory

    CN106407132A

  • Timing task processing method and device, computer equipment and storage medium

    CN111142977A

  • Multistage cascade server BMC black box log collection method and system, terminal and medium

    CN116319291A

  • Almost fair busy lock

    US20160139966A1

  • Intelligent server fault pushing method, apparatus, and device, and storage medium

    WO2022237507A1