A method, device, medium and computer program product for obtaining black box logs
By detecting and waiting or sending information to obtain permission, the conflict between the baseboard management controller and the black box log of the power supply unit in the multi-node server is resolved, effective black box log collection is achieved, and false alarms are avoided.
Patent Information
- Application Number
- CN202411721339.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In multi-node servers, the fragmented access mechanism caused by the integrated circuit bus arbitration controller cannot effectively resolve the reading conflicts of the multi-baseboard management controller on the power supply unit black box log, resulting in false alarms on some nodes.
By detecting the status of the second baseboard management controller, if it is in the black box log collection state, it will wait for it to complete and then access the power supply unit; if it is not in this state, it will send information to obtain permission and then access, and use the integrated circuit bus arbitration controller to achieve equal black box log collection.
This solves the conflict of different baseboard management controllers preempting black box log permissions, avoids false alarms, and ensures that the baseboard management controllers in multi-node servers can successfully collect the black box logs of the power supply units.
Smart Images

Figure CN119201797B_ABST
Abstract
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 traditional single-node servers, a single baseboard management controller (BMC) provides out-of-band management of server components. To achieve more advanced monitoring and management capabilities, dual-node servers or servers with more than two nodes are emerging. To conserve hardware resources, multiple BMCs may monitor the same hardware simultaneously, leading to conflicts in shared hardware resources.
[0003] To resolve this resource conflict, related technologies use an integrated circuit bus arbitration controller to perform arbitration on a single access by multiple master devices of the integrated circuit bus to a slave device, thereby enabling fragmented access by multiple baseboard management controllers to the same hardware and 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 resolve the conflict of multiple nodes reading the black box log, and may also cause some nodes to generate false alarms.
[0005] How to ensure that the baseboard management controller in a multi-node server successfully collects the black box logs of the power supply unit is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0006] The purpose of the present invention is to provide a method, device, medium and computer program product for obtaining black box logs, which are used to solve the problem of failure to obtain black box logs of power supply units caused by fragmented acquisition of hardware information by multiple baseboard management controllers through integrated circuit bus arbitration controllers.
[0007] To solve the above technical problems, the present invention provides a method for obtaining black box logs, which is applied to a first baseboard management controller, comprising:
[0008] After detecting a power supply unit failure, checking a status of the second baseboard management controller;
[0009] 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;
[0010] If the second baseboard management controller is not in the first state, sending first information indicating that the local baseboard is in the first state to the second baseboard management controller, and then collecting the black box log through the integrated circuit bus;
[0011] 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 for a single access of multiple master devices of the integrated circuit bus to a slave device.
[0012] On the one hand, sending first information indicating that the local device is in the first state to the second baseboard management controller includes:
[0013] 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.
[0014] On the other hand, the shared address is a shared mailbox in the integrated circuit bus arbitration controller.
[0015] In another aspect, the shared address is located in a shared memory between the first baseboard management controller and the second baseboard management controller.
[0016] On the other hand, checking the status of the second baseboard management controller includes: accessing the shared address to obtain a first variable corresponding to the second baseboard management controller;
[0017] 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;
[0018] The second baseboard management controller is not in the first state, comprising: the first variable corresponding to the second baseboard management controller is not in the first state value;
[0019] 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.
[0020] On the other hand, the first status value includes: a second status value corresponding to the status of sending a black box log collection start request, and a third status value corresponding to the black box log collection process status.
[0021] On the other hand, it also includes:
[0022] The state value of the locally stored second variable is set according to the collection state of the black box log.
[0023] On the other hand, setting the state value of the locally stored second variable according to the collection state of the black box log includes:
[0024] If the black box log is not in the collected state, setting the second variable to a sixth state value;
[0025] If the black box log is in a state of being collected locally, setting the second variable to a seventh state value;
[0026] 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.
[0027] On the other hand, it also includes:
[0028] After restarting, checking the second variable;
[0029] If the second variable is the seventh state value, second information indicating a failure in locally obtaining the black box log is sent to the second baseboard management controller to release control over the integrated circuit bus.
[0030] On the other hand, it also includes:
[0031] After sending the second information to the second baseboard management controller, setting the second variable to the sixth state value;
[0032] Record the failure log of obtaining the black box log.
[0033] On the other hand, it also includes:
[0034] After restarting, checking the second variable;
[0035] If the second variable is the eighth state value, checking the state of the second baseboard management controller;
[0036] If the second baseboard management controller is in the first state, stopping monitoring access to the power supply unit;
[0037] 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.
[0038] On the other hand, detecting a failure of the power supply unit includes:
[0039] After querying that the power supply unit is in the on-state, accessing the power status register of the power supply unit;
[0040] If the power status register is abnormal, determining that the power supply unit is faulty;
[0041] The power status register includes at least one of a factory information register and a status value register.
[0042] To solve the above technical problems, the present invention further provides a device for obtaining black box logs, comprising:
[0043] memory for storing computer programs;
[0044] A processor is configured to execute the computer program, wherein 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.
[0045] To solve the above technical problems, the present invention further provides a non-volatile storage medium having a computer program stored thereon. 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.
[0046] To solve the above technical problems, the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for obtaining a black box log as described in any one of the above items.
[0047] 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 power supply unit failure, 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 first information that the local unit is in the first state is sent to the second baseboard management controller, and then the black box logs are collected through the integrated circuit bus, effectively resolving the conflict of different baseboard management controllers preempting the right to obtain black box logs, and resolving the problem of fragmented access caused by arbitration of single access of multiple master devices to slave devices of the integrated circuit bus by the integrated circuit bus arbitration controller, which causes one baseboard management controller to generate false alarms in other baseboard management controllers after starting to read the black box logs.
[0048] 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
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.
[0050] Figure 1 A schematic diagram of the architecture of an out-of-band monitoring system for a multi-baseboard management controller;
[0051] Figure 2 A flowchart of a method for obtaining black box logs provided by an embodiment of the present invention;
[0052] 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
[0053] The core of the present invention is to provide a method, device, medium and computer program product for obtaining black box logs, which are used to solve the problem of failure in obtaining black box logs of power supply units caused by the fragmented acquisition of hardware information by multiple baseboard management controllers through integrated circuit bus arbitration controllers.
[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 are within the scope of protection of the present invention.
[0055] As servers are upgraded, dual-node or multi-node servers begin to appear. The node here refers to the server motherboard, which can be equipped with processors, memory, etc.
[0056] To implement comprehensive out-of-band monitoring and management capabilities, a baseboard management controller (BMC) is designed for each server motherboard, resulting in a multi-BMC out-of-band monitoring architecture. To conserve hardware resources, multiple BMCs may simultaneously monitor or control the same hardware. For example, two BMCs on two nodes may both need to monitor power supply unit (PSU) information and control system fans.
[0057] Figure 1 A schematic diagram of the architecture of an out-of-band monitoring system for multiple baseboard management controllers.
[0058] like Figure 1 As shown, the baseboard management controllers in a server are referred to 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. The number of second baseboard management controllers 102 can be one or more.
[0059] 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 .
[0060] 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.
[0061] The integrated circuit bus is a multi-master and multi-slave communication bus, which can be used but is not limited to a two-wire serial bus (Inter-Integrated Circuit, I2C) and an improved integrated circuit bus (Improved Inter Integrated Circuit, I3C).
[0062] In this architecture, the BMC is the master device (master) and the power supply unit (power supply unit) is the slave device (slave) in the integrated circuit bus communication protocol. The first BMC 101 and the second BMC 102 monitor the power supply unit in real time. However, only one master device can communicate with a slave device via the integrated circuit bus at a time, requiring arbitration for access to multiple masters.
[0063] In traditional multi-node out-of-band monitoring solutions, the baseboard management controller (BMC) locks the IC bus when its service threads need to access hardware through the IC bus to obtain hardware monitoring information. Specifically, the BMC creates a separate thread for each IC bus, which is responsible for polling and accessing the slave devices mounted on the corresponding IC bus. During system initialization, each thread initializes a lock, typically a mutex, to control access to the IC bus. When a thread needs to read data from or write data to a slave device on the IC bus, it first attempts to acquire the lock for the corresponding IC bus. If the lock is already held by another thread, the current thread waits until the lock is released. Similarly, when multiple BMCs need to occupy the IC bus, locking is also implemented to prevent the IC bus from being used by other BMCs while the BMCs are performing service access to the hardware.
[0064] However, when using this multi-master preemption integrated circuit bus method, 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.
[0065] Moreover, this multi-master preemptive 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.
[0066] 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.
[0067] like Figure 1 As shown, on an integrated circuit bus, one end of the integrated circuit bus arbitration controller 103 supports access to multiple baseboard management controllers, while the other end is connected to the slave device. In terms of software, the integrated circuit bus arbitration controller 103 uses a fragmentation processing mechanism, performing arbitration in kernel mode, and preempting the arbitration of single accesses to the integrated circuit bus by each master device.
[0068] 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 via the integrated circuit bus. The bottom layer will then conduct bus arbitration through the integrated circuit bus arbitration controller 103. After successfully obtaining control 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 also continuously sends requests to obtain control rights to the integrated circuit bus arbitration controller 103 via the integrated circuit bus. If the request is successful, the second baseboard management controller 102 will then obtain the register status value of the power supply unit via the integrated circuit bus.
[0069] As can be seen from the above process, the number of times the IC bus control is acquired at each stage is dynamic and unpredictable. Even if the first baseboard management controller 101 acquires control of the IC bus this time, there's no guarantee it will be able to do so again next time. This fragmented reading method doesn't affect the baseboard management controller's ability to obtain some hardware information, but it can cause reading failures for the power supply unit's black box log.
[0070] The black box log of a power supply unit (PSU) is a log of the readings from various registers when a PSU fault occurs. Power engineers can use the readings from the fault history registers to further analyze the nature of the PSU fault. Therefore, it is crucial for the BMC to capture the black box log at the time of a PSU fault. The PSU is capable of recording three fault histories. When recording the black box log, the BMC saves all three records in its own one-click log. When a PSU fault is detected, the user can download the BMC's one-click log to access the PSU's black box log.
[0071] When the baseboard management controller reads the power supply unit's black box log, it first needs to operate the power supply unit's factory information register (MfrPage) to put the power supply unit into black box mode. At this point, the values of other registers no longer represent the current readings, but instead refer to historical erroneous readings. Therefore, if the first baseboard management controller 101 detects a power supply unit failure and records the power supply unit's black box log, after operating the aforementioned registers, the second baseboard management controller 102 must stop polling the power supply unit. Otherwise, the readings of other registers obtained by the second baseboard management controller 102 will be erroneous, generating an error alarm for the power supply unit.
[0072] 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.
[0073] 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 efficiency of hardware resource utilization 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.
[0074] To solve the above problems, an embodiment of the present invention provides a black box log acquisition solution. On a multi-node server, after detecting a power supply unit failure, 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 first information that the local baseboard management controller is in the first state is sent to the second baseboard management controller, and then the black box logs are collected through the integrated circuit bus, thereby effectively solving the conflict of different baseboard management controllers preempting the right to obtain the black box log, and solving the problem of fragmented access caused by the arbitration of single access of multiple master devices to slave devices of the integrated circuit bus by the integrated circuit bus arbitration controller, which causes one baseboard management controller to generate false alarms in other baseboard management controllers after starting to read the black box log.
[0075] The following describes a method for obtaining black box logs provided by an embodiment of the present invention with reference to the accompanying drawings.
[0076] Figure 2 This is a flowchart of a method for obtaining black box logs provided by an embodiment of the present invention.
[0077] like Figure 2 As shown, the method for obtaining black box logs provided by the embodiment of the present invention, applied to the first baseboard management controller, includes:
[0078] S201: After detecting a power supply unit failure, checking the status of the second baseboard management controller;
[0079] S202: 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;
[0080] S203: If the second baseboard management controller is not in the first state, first information indicating that the local baseboard management controller is in the first state is sent to the second baseboard management controller, and then a black box log is collected through the integrated circuit bus.
[0081] 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, which is used to perform arbitration for single access of multiple master devices of the integrated circuit bus to the slave device.
[0082] 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. The number of 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.
[0083] In this embodiment of the present invention, the type of integrated circuit bus arbitration controller corresponds to the number of baseboard management controllers. For example, in a two-node server, a two-choose-one integrated circuit bus master selector such as PCA9641 or PCA9541A can be used. In a server with more nodes, a four-choose-one integrated circuit bus master selector such as PCA9544A or an eight-choose-one integrated circuit bus master selector such as PCA9548A can be used.
[0084] 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 status register of the power supply unit; if the power status register is abnormal, determining that the power supply unit is faulty; wherein the power status register includes at least one of a factory information register and a status value register.
[0085] In a specific implementation, when the baseboard management controller periodically polls the in-place status of the power supply unit, it will perform fault diagnosis on the in-place power supply unit, and collect black box logs if there is a power supply unit fault.
[0086] 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 previous one, black box logs are collected.
[0087] The contents 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.
[0088] The baseboard management controller only needs to collect the fault register information and does not need to clear the fault register content.
[0089] 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 energy consumption information register (READ_ECAP, 0x8a), read output voltage information register (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).
[0090] 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.
[0091] 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 followed by "-".
[0092] On a multi-node server, each baseboard management controller (BMC) can collect black box logs. However, if one BMC collects black box logs, it will affect another BMC's access to the power supply unit. Furthermore, BMCs must mutually exclude each other from collecting black box logs.
[0093] 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 controllers here include all other baseboard management controllers that are connected to the power supply unit of the first baseboard management controller through the same integrated circuit bus arbitration controller.
[0094] In an 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 know that other baseboard management controllers are in the first state. In an 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.
[0095] 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.
[0096] In S203, if the first baseboard management controller has not received the first message sent by the second baseboard management controller, it is determined that the second baseboard management controller is not in the first state. In this case, the first baseboard management controller first sends the first message to the second baseboard management controller to prevent the second baseboard management controller from reading the black box log, and then applies for control of the integrated circuit bus and collects the black box log via the integrated circuit bus.
[0097] To enable the second baseboard management controller to know that the first baseboard management controller has completed collecting black box logs, after completing collecting black box logs, the first baseboard management controller sends third information to the second baseboard management controller indicating that the black box log collection process is normal and completed.
[0098] After applying the method for obtaining the black box log provided in the embodiment of the present invention, when the baseboard management controller needs to obtain other hardware information, it can also directly implement fragmented access by applying for control of the integrated circuit bus and then waiting for arbitration by the integrated circuit bus arbitration controller. However, when it is necessary to collect the black box log, when one baseboard management controller enters the black box log state, the other baseboard management controllers will no longer access the power supply unit until the current baseboard management controller has completed the collection, and then the other baseboard management controller can enable access to the power supply unit.
[0099] An embodiment of the present invention provides a method for obtaining black box logs. On a multi-node server, after detecting a power supply unit failure, 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 method waits until the second baseboard management controller completes the collection, and then accesses the power supply unit through the integrated circuit bus to collect the black box log; if the second baseboard management controller is not in the first state, the method sends first information that the local area is in the first state to the second baseboard management controller, and then collects the black box log through the integrated circuit bus, effectively resolving the conflict of different baseboard management controllers preempting the right to obtain the black box log, and resolving the problem of arbitration of single access of multiple master devices to slave devices of the integrated circuit bus by the integrated circuit bus arbitration controller, in which other baseboard management controllers generate false alarms after one baseboard management controller starts reading the black box log.
[0100] Based on 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.
[0101] In the embodiment of the present invention, the first baseboard management controller communicates with the second baseboard management controller to convey the status of collecting black box logs.
[0102] In some optional implementations of the embodiments of the present invention, sending the first information that the local device 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 via a general purpose input / output (GPIO) interface.
[0103] In some alternative implementations of the embodiments of the present invention, sending the first information indicating that the local computer is in the first state to the second baseboard management controller in S203 may further include sending the first information to the second baseboard management controller via a coprocessor. The coprocessor may be a complex programmable logic device (CPLD), such as a CPLD of a fan board.
[0104] In some further optional implementations of the embodiments of the present invention, sending the first information locally in the first state 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.
[0105] The shared address may be a shared mailbox in the integrated circuit bus arbitration controller.
[0106] In a specific implementation, when the first baseboard management controller reads the black box log, it notifies the second baseboard management controller via a shared mailbox. When the collection is complete, it notifies the second baseboard management controller again. After receiving the data from the shared mailbox, the second baseboard management controller determines that the first baseboard management controller is in the first state of collecting black box logs and terminates access to the power supply unit. It then resumes access to the power supply unit after the first baseboard management controller completes collecting black box logs.
[0107] For example, in a dual-node server using a two-to-one integrated circuit bus arbitration controller (such as the PAC9641), the shared mailbox contains two 8-bit bidirectional storage units (boxes) for communication between the two baseboard management controllers. Each baseboard management controller has a high mailbox (MB HI) and a low mailbox (MB LO) register in its address map, with a total of 16 available bits. The shared mailbox has two states: "MBOX FULL" and "MBOX EMPTY," facilitating data flow and preventing 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 primary server can write to the mailbox. If the MBOXEMPTY status bit is 0, the mailbox contains data from another host, which has not yet been read or written, resulting in data loss or corruption. When the MBOX FULL status bit is set on a host, it means that there is data from the other host in the mailbox that has not yet been read. The master can read the mailbox in any order, but the FULL flag will not be cleared until the MB LO and MB HI bits are 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 to receive 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 be read.
[0108] Alternatively, the shared address may also be set in a shared memory between the first baseboard management controller and the second baseboard management controller.
[0109] In the embodiment of the present invention, checking the status 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.
[0110] 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.
[0111] 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.
[0112] 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.
[0113] In the embodiment of the present invention, a first variable (which may be recorded as variable A) may be defined to implement the state of each baseboard management controller communicating with each other to collect black box logs.
[0114] 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.
[0115] In addition, in order to communicate the status of the completion of collecting black box logs and the status of abnormal black box log collection, 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.
[0116] The state value of the first variable may include:
[0117] A=0, no request to collect black box logs;
[0118] A=0x01 (also called the second state value in this embodiment of the present invention): Send a request to start collecting black box logs;
[0119] A=0x02 (also called the third state value in this embodiment of the present invention): Start collecting black box logs;
[0120] A=0x03 (also called the fourth status value in this embodiment of the present invention): The black box log collection process is normal and complete;
[0121] A=0x04 (also called the fifth status value in this embodiment of the present invention): the black box log collection process is abnormal and has not yet ended.
[0122] Before or during the baseboard management controller starts 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 the local black box log collection.
[0123] In the shared address, each baseboard management controller has a one-to-one corresponding first variable for viewing by other baseboard management controllers.
[0124] Based on the above embodiment, the method for obtaining black box logs provided by the embodiment of the present invention may further include: setting a status value of a locally stored second variable according to a collection status of the black box logs.
[0125] Since collecting black box logs takes a certain amount of time, in order to enable the baseboard management controller to locally know 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 for the baseboard management controller to know whether the power supply unit is in a state where the black box logs are being collected.
[0126] In the embodiment of the present invention, the second variable may be stored in a local non-volatile medium of the baseboard management controller.
[0127] In an embodiment of the present invention, setting the state value of the locally stored second variable 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 the second baseboard management controller, setting the second variable to an eighth state value.
[0128] The state value of the second variable may include:
[0129] Psublackboxcollectflag=0x00 (also called the sixth status value in this embodiment of the present invention): black box logs are not being collected;
[0130] Psublackboxcollectflag = 0x01 (master) (also known as the seventh status value in this embodiment of the present invention): black box logs are being collected locally.
[0131] Psublackboxcollectflag=0x02(slave) (also called the eighth state value in this embodiment of the present invention): the black box log is being collected by other baseboard management controllers.
[0132] Based on the above embodiment, taking a dual-node server as an example, the embodiment of the present invention continues to illustrate the process of the first baseboard management controller collecting black box logs.
[0133] Black box log collection is primarily performed by the baseboard management controller's power supply unit monitoring service. During periodic polling of the power supply unit, if a fault is detected, black box log collection will begin. During this process, the first baseboard management controller can execute steps S301-S315.
[0134] S301: Running a power supply unit monitoring service.
[0135] S302: Read the register of the power supply unit to determine whether the black box log collection conditions are met. If yes, proceed to S303; if not, return to S301.
[0136] S303: Determine whether the power supply unit is in an upgrade state. If yes, return to S301; if not, proceed to S304.
[0137] 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 (e.g., more than 10 seconds).
[0138] S305: Read the first variable A in the shared mailbox and determine whether the first variable A is the second state value (0x01, sending a request to start collecting black box logs) or the third state value (0x02, starting to collect black box logs). If not, proceed to S306.
[0139] 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).
[0140] S307: Set the first variable A in the shared mailbox to 0x01 (send a request to start collecting black box logs).
[0141] S308: Determine whether the status register "MBOX FULL" in the shared mailbox is set. If so, proceed to S309; if not, return to S308 if the polling times out (e.g., if the second BMC does not respond after more than 1 minute, the first BMC will preempt the IC bus).
[0142] S309: Determine whether the first variable A in the shared mailbox is 0x02 (start collecting black box logs). If yes, proceed to S310; if not, return to S308.
[0143] S310: Set the local second variable Psublackboxcollectflag to 0x01 (black box logs are being collected locally).
[0144] S311: Seize the integrated circuit bus arbitration controller and execute the black box log collection process.
[0145] 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 (e.g., exceeds 10 seconds).
[0146] 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.
[0147] S314: Set the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).
[0148] S315: Release the control right of the integrated circuit bus arbitration controller.
[0149] In the above process, the second baseboard management controller executes steps as shown in S401 to S410 below.
[0150] S401: Interactively communicate with a first baseboard management controller.
[0151] 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 (e.g., more than 10 seconds).
[0152] S403: Read the first variable A in the shared mailbox, and proceed to S404 or S408 according to the reading result.
[0153] S404: Determine whether the first variable A is 0x01 (sending a request to start collecting black box logs). If yes, proceed to S405.
[0154] S405: Set the local second variable Psublackboxcollectflag to 0x02 (black box logs are being collected by other baseboard management controllers).
[0155] S406: Stop applying for resources from the integrated circuit bus arbitration controller.
[0156] S407: Set the value of the first variable A in the shared mailbox to 0x02 to notify the first baseboard management controller to start collecting black box logs.
[0157] S408: Determine whether the first variable A is 0x03 (the black box log collection process is normal and complete). If so, proceed to S409.
[0158] S409: Set the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).
[0159] S410: Resume resource application to the integrated circuit bus arbitration controller.
[0160] When the baseboard management controller is collecting black box logs, in order to handle abnormal restart situations that may occur during 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 logs can be obtained based on the second variable stored locally to determine whether the power supply unit is currently accessible.
[0161] 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 that local acquisition of the black box log failed to the second baseboard management controller to release control of the integrated circuit bus.
[0162] In the embodiment of the present invention, the second information is defined as information sent to other baseboard management controllers indicating failure in locally obtaining black box logs.
[0163] 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.
[0164] The method for obtaining a black box log provided by an 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 indicating a failure in obtaining the black box log.
[0165] That is, 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.
[0166] The method for obtaining the black box log provided by an 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 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 completed or the third state in which the black box log collection process is abnormal and not completed, setting the second variable to the sixth state value.
[0167] 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 completed or the third state where the black box log collection process is abnormal and not completed, 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.
[0168] For the scenario where the baseboard management controller restarts abnormally during the black box log collection process, the specific process is as follows.
[0169] 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 .
[0170] S501: A first baseboard management controller is restarted during the process of collecting black box logs.
[0171] 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.
[0172] 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).
[0173] S504: The first baseboard management controller records a fault log indicating a failure in obtaining a black box log.
[0174] S505: The first baseboard management controller sets the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).
[0175] In the above process, the second baseboard management controller executes the following steps S506 to S508 .
[0176] 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 yet ended). If so, the process proceeds to S507.
[0177] S507: The second baseboard management controller sets the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).
[0178] S508: The second baseboard management controller resumes the resource application to the integrated circuit bus arbitration controller and accesses the power supply unit normally.
[0179] If the second baseboard management controller abnormally restarts while the first baseboard management controller is collecting black box logs, the second baseboard management controller executes the following steps S601 to S607 .
[0180] S601: While a first baseboard management controller is collecting black box logs, a second baseboard management controller is restarted.
[0181] 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.
[0182] S603: The second baseboard management controller reads the value of the first variable A in the shared mailbox.
[0183] 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, the process proceeds to S605; if not, the process proceeds to S607.
[0184] S605: The second baseboard management controller sets the local second variable Psublackboxcollectflag to 0x00 (black box logs are not being collected).
[0185] S606: The second baseboard management controller resumes the resource application to the integrated circuit bus arbitration controller and accesses the power supply unit normally.
[0186] S607: The second baseboard management controller stops monitoring the power supply unit and responding to device access.
[0187] By using the above method, after an abnormal restart occurs during the process of collecting black box logs, another baseboard management controller can resume the preemption of the integrated circuit bus arbitration controller to monitor the power supply unit.
[0188] It should be noted that in the embodiments of the black box log acquisition method of the present invention, some of the steps or features may be ignored or not executed. The hardware or software functional modules are divided for the convenience of description and are not the only implementation form of the black box log acquisition method provided in the embodiments of the present invention.
[0189] The above describes in detail various embodiments corresponding to the method for obtaining black box logs. 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.
[0190] Applied to the first baseboard management controller, the apparatus for obtaining a black box log provided by an embodiment of the present invention may include:
[0191] The power supply unit status monitoring unit is used to detect the status of the power supply unit.
[0192] a resource application unit, configured to check the status of the second baseboard management controller after detecting a failure of the power supply unit;
[0193] The black box log collection unit is configured to, if the second baseboard management controller is in the first state for 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 indicating that the local unit is in the first state to the second baseboard management controller and then collect the black box logs through the integrated circuit bus;
[0194] 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, which is used to perform arbitration for single access of multiple master devices of the integrated circuit bus to the slave device.
[0195] The apparatus for obtaining black box logs provided in the embodiment of the present invention may further include:
[0196] The black box log state recording unit is used to set the state value of the locally stored second variable according to the collection state of the black box log.
[0197] 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.
[0198] The black box log status recording unit is further configured to check the second variable after restart; if the second variable is the seventh state value, send second information indicating failure to obtain the black box log locally to the second baseboard management controller to release control of the integrated circuit bus.
[0199] The black box log state recording unit is further configured 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 indicating a failure in obtaining the black box log.
[0200] 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 completed or the third state in which the black box log collection process is abnormal and not completed, set the second variable to the sixth state value.
[0201] It should be noted that in each embodiment of the black box log acquisition device provided by the embodiment of the present invention, the division of units is only a logical functional division, and other division methods can be used. The connection method between different units can be electrical, mechanical or other connection methods. Separated units can be located in the same physical location or distributed on multiple network nodes. Each unit can be implemented in the form of hardware or in the form of a software functional unit. That is, according to actual needs, some or all of the units provided in the embodiment of the present invention can be selected and the corresponding connection method or integration method can be adopted to achieve the purpose of the embodiment of the present invention.
[0202] 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, and they will not be repeated here.
[0203] Figure 3 A schematic diagram of the structure of a black box log acquisition device provided by an embodiment of the present invention.
[0204] like Figure 3 As shown, the black box log acquisition device provided by an embodiment of the present invention includes: a memory 310, which is used to store a computer program 311; a processor 320, which is used to execute the computer program 311. When the computer program 311 is executed by the processor 320, the steps of the black box log acquisition method provided by any of the above embodiments are implemented.
[0205] The processor 320 may include one or more processing cores, such as a 3-core processor or an octa-core processor. The processor 320 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 320 may also include a main processor and a coprocessor. The main processor is used to process data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 320 may integrate a graphics processing unit (GPU), which is responsible for rendering and drawing content required 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 handle computational operations related to machine learning.
[0206] 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, after the computer program 311 is loaded and executed by the processor 320, it 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. The data 313 may include but is not limited to the data involved in the above method.
[0207] 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 / output interface 360 , a sensor 370 , and a communication bus 380 .
[0208] 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 shown in the figure.
[0209] 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.
[0210] An embodiment of the present invention provides a non-volatile storage medium having a computer program stored thereon. 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.
[0211] 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, etc., which can store program code.
[0212] For an introduction to the non-volatile storage medium provided in the embodiment of the present invention, please refer to the above method embodiment. 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.
[0213] 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 computer program implements the steps of the method for obtaining a black box log provided in any one of the above embodiments.
[0214] For an introduction to the computer program product provided by the embodiment of the present invention, please refer to the above method embodiment. The effect thereof is the same as the method for obtaining the black box log provided by the embodiment of the present invention, and the present invention will not elaborate on it here.
[0215] The above is a detailed introduction to the 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 various embodiments can be referred 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 be referred 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.
[0216] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only 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 "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
Claims
1. A method for obtaining black box logs, characterized in that: Applicable to the first baseboard management controller, including: After detecting a power supply unit failure, checking a status 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, sending first information indicating that the local baseboard is in the first state to the second baseboard management controller, and then collecting the black box log 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 via an integrated circuit bus arbitration controller, and the integrated circuit bus arbitration controller is used to perform arbitration for a single access of multiple master devices of the integrated circuit bus to a slave device; Sending first information locally in the first state to the second baseboard management controller includes: when checking that the MBOXEMPTY status bit of the shared mailbox in the integrated circuit bus arbitration controller is 1, determining that the shared mailbox does not contain data of the second baseboard management controller, and writing a first variable corresponding to the first baseboard management controller as the first state value into the shared mailbox; when checking that the MBOXEMPTY status bit in the shared mailbox is 0, determining that the shared mailbox contains data of the second baseboard management controller that has not been read, reading the data in the shared mailbox to clear the shared mailbox so that the MBOXEMPTY status bit is set to 1, and then writing the first variable corresponding to the first baseboard management controller as the first state value into the shared mailbox so that the MBOXEMPTY status bit is set to 0; Checking the status of the second baseboard management controller includes: accessing the shared mailbox to obtain the first variable corresponding to the second baseboard management controller; The first status value includes: a second status value corresponding to the status of sending a black box log collection start request, and a third status value corresponding to the black box log collection process status; the first variable also includes: a fourth status value corresponding to the black box log collection process being normal and completed, and a fifth status value corresponding to the black box log collection process being abnormal and not completed.
2. The method for obtaining black box logs according to claim 1, characterized in that: 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, which includes: the first variable corresponding to the second baseboard management controller is not in the first state value.
3. The method for obtaining black box logs according to claim 1, wherein: Also includes: The state value of the locally stored second variable is set according to the collection state of the black box log.
4. The method for obtaining black box logs according to claim 3, characterized in that: Setting a status value of a locally stored second variable according to a collection status of the black box log includes: If the black box log is not in the 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.
5. The method for obtaining black box logs according to claim 4, 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 obtaining the black box log is sent to the second baseboard management controller to release control over the integrated circuit bus.
6. The method for obtaining black box logs according to claim 5, 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; Record the failure log of obtaining the black box log.
7. The method for obtaining black box logs according to claim 4, 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.
8. 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.
9. A device for obtaining black box logs, characterized in that: include: memory for storing computer programs; A processor is configured to execute the computer program, wherein when the computer program is executed by the processor, the steps of the method for obtaining a black box log according to any one of claims 1 to 8 are implemented.
10. 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 according to any one of claims 1 to 8 are implemented.
11. 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 according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
A data communication synchronization method based on a shared memory
CN106407132A