Fault diagnosis method and system

By setting up fixed and switchable physical links between the host and the BMC, stable transmission of fault data is ensured, solving the problem of fault log transmission failure in scenarios where a single BMC manages multiple host motherboards, and improving the efficiency of server fault diagnosis and maintenance.

CN121560618APending Publication Date: 2026-02-24LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511783209.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

In scenarios where a single BMC manages multiple host motherboards, the operating system fault logs of abnormal hosts cannot be successfully sent to the BMC, affecting the efficiency of server fault diagnosis.

Method used

By setting up a fixed physical link and a switchable physical link between the host and the BMC, and using the fixed link to transmit control signals, the link between the host and the BMC is ensured to remain open during data transmission, thereby achieving time-division multiplexing and stable transmission of fault data.

Benefits of technology

It effectively solves the problem that the operating system fault log data of abnormal hosts cannot be successfully sent to BMC, improves the efficiency of server fault diagnosis and maintenance, and enhances the high availability of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560618A_ABST
    Figure CN121560618A_ABST
Patent Text Reader

Abstract

The invention discloses a fault diagnosis method and system, and relates to the technical field of computers. The method comprises the steps that a management controller manages a plurality of hosts, and the management controller receives a link connection request signal sent by one host through a fixed physical link and controls the host to be communicated with a switchable physical link between the host and the management controller. A link operation control signal is sent to the host through the fixed physical link, and when a fault data indication signal sent by the host is received through the switchable physical link, data reading is conducted from the sharing position where the fault data are stored through the switchable physical link. According to the method and the device, the problem that the operating system fault log of the host cannot be successfully sent to the BMC in the prior art can be solved, the fault diagnosis and server maintenance efficiency of the server can be effectively improved, and the high availability of services is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a fault diagnosis method and system. Background Technology

[0002] The BMC (Baseboard Management Controller) is an embedded controller independent of the operating system. Currently, a single BMC can manage multiple hosts simultaneously. However, when the operating system kernel of at least one host crashes, the related technology cannot successfully send the operating system fault log data to the BMC, affecting the efficiency of server fault diagnosis. Summary of the Invention

[0003] This invention provides a fault diagnosis method and apparatus to solve the problem that the operating system fault log data of an abnormal host cannot be successfully sent to the BMC, effectively improving the efficiency of server fault diagnosis and server maintenance, and enhancing the high availability of services.

[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0005] The first aspect of this invention provides a fault diagnosis method applied to a management controller that simultaneously manages multiple hosts, comprising:

[0006] When a link connection request signal is received from the first host via the first physical link, the first switchable physical link between the control controller and the first host is connected; a link operation control signal is sent to the first host via the first physical link; when a fault data indication signal is received from the first host via the first switchable physical link, the first fault data is read from the first shared location via the first switchable physical link; wherein, the first physical link is a fixed connection link between the first host and the control controller; the link operation control signal indicates that the first switchable physical link between the first host and the control controller is successfully connected; the fault data indication signal is used to indicate that the fault data is waiting for the control controller to read.

[0007] A second aspect of the present invention provides a fault diagnosis method applied to a target host, comprising:

[0008] When a fault data storage requirement is detected, a link connection request signal is sent to the management controller via a fixed physical link. The fixed physical link is a fixed connection link between the target host and the management controller. The management controller manages at least two hosts. When a link operation control signal is received from the management controller via the fixed physical link, a fault data indication signal is sent to the management controller via a switchable physical link, so that the management controller can read the target fault data from the target shared location based on the switchable physical link. The link operation control signal indicates that the switchable physical link connection between the target host and the management controller is successful. The fault data indication signal indicates that the fault data is waiting for the management controller to read.

[0009] A third aspect of the present invention provides a fault diagnosis device applied to a management controller that simultaneously manages multiple hosts, comprising:

[0010] The host service management module is used to control the connection of the first switchable physical link between the management controller and the first host when it receives a link connection request signal sent by the first host through the first physical link, and to send a link operation control signal to the first host through the first physical link; the first physical link is a fixed connection link between the first host and the management controller; the link operation control signal indicates that the first switchable physical link between the first host and the management controller has been successfully connected.

[0011] The link communication module is used to read first fault data from the first shared location through the first switchable physical link when it receives a fault data indication signal sent by the first host through the first switchable physical link; the fault data indication signal is used to indicate that the fault data is waiting to be read by the management controller.

[0012] A fourth aspect of the present invention provides a fault diagnosis device applied to a target host, comprising:

[0013] The link request module is used to send a link connection request signal when a faulty data storage requirement is detected; the fixed physical link is a fixed connection link between the target host and the management controller; the management controller manages at least two hosts.

[0014] The control signal monitoring module is used to monitor control signals sent by the management controller through a fixed physical link.

[0015] The signal control module is used to send the link connection request signal sent by the link request module to the management controller through the fixed physical link, and to send the link operation control signal sent by the management controller through the fixed physical link to the host link communication module.

[0016] The host link communication module is used to send a fault data indication signal to the management controller when it receives a link operation control signal, so that the management controller can read the target fault data from the target shared location based on the switchable physical link. The link operation control signal indicates that the switchable physical link between the target host and the management controller is successfully connected. The fault data indication signal is used to indicate that the fault data is waiting for the management controller to read.

[0017] The fifth aspect of the present invention provides an electronic device, including a memory and a processor, wherein the processor is configured to implement the steps of any of the above-described fault diagnosis methods when executing a computer program stored in the memory.

[0018] The sixth aspect of the present invention also provides a non-volatile storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of any of the above-described fault diagnosis methods.

[0019] A seventh aspect of the present invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the above-described fault diagnosis methods.

[0020] The eighth aspect of the present invention provides a fault diagnosis system, including a management controller and a host cluster;

[0021] There are at least two independent physical links and switchable physical links between the management controller and each host in the host cluster; the management controller includes at least an in-band data communication device and a route selector, the management controller communicates with each host through the in-band data communication device, and switches the switchable physical links with each host through the route selector; when the management controller executes a computer program, it implements the steps of any of the above-mentioned fault diagnosis methods; when each host executes a computer program, it implements the steps of any of the above-mentioned fault diagnosis methods.

[0022] The advantage of the technical solution provided by this invention is that, in scenarios where the management controller manages multiple hosts simultaneously, in addition to the physical links that are switched by the management controller's route selector, a fixed physical link that is not controlled by the management controller's route selector is also set up between the hosts and the management controller. By sending and receiving control signals that control the link status can be switched through the fixed physical link, the management controller can control the running status of the host's transmission service. This allows multiple hosts to time-share the physical link with the management controller. After receiving the link operation control signal, the host can maintain the link with the management controller and will not be affected by other hosts and disconnect the link. The management controller can then use this physical link that maintains the connection to transfer the fault data collected when the host is abnormal to its local storage, thereby solving the problem that the operating system fault log data of the abnormal host cannot be successfully sent to the BMC. Regardless of whether the abnormal host can start normally, the transferred fault data can be used for fault analysis, which helps to improve the efficiency of locating the fault source, effectively improves the efficiency of server fault diagnosis and server maintenance, and enhances the high availability of services.

[0023] Furthermore, the present invention also provides corresponding implementation devices, systems, electronic devices, non-volatile storage media, and computer program products for the fault diagnosis method, further making the method more practical, and the devices, systems, electronic devices, non-volatile storage media, and computer program products have corresponding advantages. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the present invention or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A schematic diagram of the hardware composition framework for an illustrative example to which the fault diagnosis method provided by the present invention is applicable;

[0026] Figure 2 A schematic diagram of the hardware composition framework under another illustrative example to which the fault diagnosis method provided by the present invention is applicable;

[0027] Figure 3 A flowchart illustrating a fault diagnosis method provided by the present invention;

[0028] Figure 4 A flowchart illustrating another fault diagnosis method provided by the present invention;

[0029] Figure 5A schematic diagram illustrating the workflow of an exemplary embodiment of the fault diagnosis system provided by the present invention;

[0030] Figure 6 A schematic diagram of the fault diagnosis interaction process between the management controller and the host in an exemplary application scenario provided by the present invention;

[0031] Figure 7 A schematic diagram of the fault diagnosis interaction process between the management controller and the host provided by the present invention in another exemplary application scenario;

[0032] Figure 8 This is a structural framework diagram of an exemplary embodiment of the fault diagnosis device provided by the present invention;

[0033] Figure 9 A structural framework diagram of another exemplary embodiment of the fault diagnosis device provided by the present invention;

[0034] Figure 10 This is a structural diagram of an exemplary embodiment of the fault diagnosis system provided by the present invention. Detailed Implementation

[0035] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. In this specification and the aforementioned drawings, the terms "first," "second," "third," "fourth," etc., are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. The term "exemplary" means "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior to or better than other embodiments.

[0036] The operating system kernel, as the core of the server, is responsible for managing hardware resources, scheduling processes, and handling system calls. When the kernel stops running due to an unrecoverable error (such as illegal memory access, driver defects, or hardware failure), i.e., a kernel crash occurs, the server will exhibit abnormalities such as unresponsiveness, Windows blue screens, and Linux kernel panics. When an abnormality occurs (such as a driver defect), the operating system stops the current kernel and all processes, and then loads a backup kernel into a reserved memory space for execution. This memory space is used only for loading the backup kernel, which is used solely to run backup services. After the backup service starts running, it can read the operating system memory space and dump the kernel's stack information, kernel code segment, data segment, and call information that caused the abnormality to the file system. After the dump is complete, the operating system is restarted. Alternatively, it can dump the memory information at the time of the kernel crash (such as the error logs collected during a Windows blue screen or the kdump (kernel crash dump mechanism) service during a Linux panic) to the hard drive.

[0037] However, the backup kernel in this memory dumping method is only used to run backup services and cannot support the operation of regular programs. After the dump is complete, the operating system needs to be restarted, and regular programs can only run after the original kernel is running. Therefore, when a kernel crash occurs, the system administrator cannot obtain the memory information at the time of the crash to locate the cause of the anomaly, resulting in low efficiency in server fault diagnosis and maintenance. Furthermore, since this data used for fault location requires a restart of the operating system and can only be read after the operating system is running normally, if the operating system cannot recover to a normal state, the system administrator cannot obtain the dumped file to analyze the cause of the anomaly, which seriously affects server fault diagnosis.

[0038] The BMC (Band Control Component) is a control device used for server control, management, and monitoring, independent of the host operating system. As an in-band management component of the server, it enables hardware monitoring, remote control, and fault diagnosis through BMC firmware. The stability and security of the BMC firmware directly affect the operational efficiency of a single server or data center. Currently, the BMC supports H2B (Host-to-BMC Device) functionality: communicating with the host motherboard via PCIe (Peripheral Component Interconnect Express). The host's OS configures the H2B BAR (Base Address Register), mapping the BMC address space to system memory space or I / O (Input / Output) space, enabling data sharing between the BMC and the host. Compared to LPC (Low Pin Count Bus), SMBus (System Management Bus), or I2C (Inter-Integrated Circuit) buses, PCIe buses have higher transmission rates and are more suitable for transmitting large amounts of data. Furthermore, through the PCIe BAR space, the OS can read and write H2B device space as easily as reading and writing system memory space without complex configuration, thus achieving data sharing with the BMC.

[0039] To address the issues with memory dumping methods, related technologies transfer operating system fault logs collected when the server operating system kernel crashes to the BMC when an abnormality occurs. When a fault occurs, the operating system fault logs that were originally transferred to the hard disk / file system are instead transmitted to the BMC via a channel between the Host and the BMC, and the BMC's log management module stores the operating system fault logs generated by the Host.

[0040] In a scenario where a single BMC manages a single host, a data link is always maintained between the host and the BMC, so fault logs can be transmitted directly through the data channel between the host and the BMC.

[0041] However, in scenarios where a single BMC manages multiple host motherboards: the BMC connects to multiple motherboards via a multiplexer, which ensures that only one motherboard can maintain a connection with the BMC at any given time. When a host needs the BMC, it requests to establish a connection with the current host motherboard via a link switching protocol. In this scenario, when an malfunctioning server is sending its operating system fault logs to the BMC, if other hosts request a data link, the original data link will inevitably be broken, leading to the failure of the malfunctioning server's operating system fault log transmission. In other words, when the BMC's H2B device is preempted by another host, there is a risk that the transmission channel will be broken due to link switching, preventing the successful transmission of the operating system fault logs to the BMC.

[0042] In view of this, to solve the problem that the operating system fault logs of abnormal hosts cannot be successfully sent to the BMC in scenarios where a single BMC manages multiple hosts, this invention, when a host malfunctions and causes a kernel crash, uses a memory transfer service to transmit fault log data via a fixed physical link. This service uses a link connection request signal and a status control signal to control the link between the host and the BMC, ensuring that the link remains open during data transmission. The fault data is transferred from the host to the BMC space using the previously switchable fixed link. By transmitting data to the BMC in a time-sharing manner, the data link can be reused in a time-sharing manner when multiple hosts need to transmit data to the BMC, thus achieving stable transmission of fault data in scenarios where a single BMC manages multiple hosts. The specific application environment architecture or hardware architecture on which the fault diagnosis method depends is described here. The following are examples of some possible application scenarios related to the technical solution of this invention, which may include the following:

[0043] like Figure 1As shown, the data center uses a single BMC to manage multiple hosts simultaneously (Host0, Host1...Hostn, where n represents the total number of hosts). Each host connects to the BMC via PCIe. The BMC board includes H2B devices as PCIe devices and a router. The BMC and hosts can interact or share data based on the PCI (Peripheral Component Interconnect, a high-speed bus connecting the computer motherboard to external devices) channel. The BMC firmware controls the router to switch the PCIe links between itself and each host (i.e., the switchable links between the hosts and the BMC). In addition, each host also has a fixed physical link with the BMC. This link is not controlled by the router. Each host sends a link connection request signal to the BMC through its fixed physical link and receives status control signals from the BMC to control the corresponding switchable physical link. The status control signals indicate whether the switchable link is running (link running control signal) or hibernating (link hibernating control signal). Each host configures an H2B BAR (Base Address Register) in its operating system to map the BMC space address to the operating system's memory space or I / O space, enabling data sharing between the BMC and the host side, that is, it serves as a shared location provided by the host.

[0044] During data center operation, whenever a host experiences an operating system kernel crash, a fault log is collected via a memory transfer service and stored in the host's reserved memory within the operating system. When the host detects data in this reserved memory, it sends a link connection request signal to the BMC via a fixed physical link. Upon receiving this signal, the BMC switches its PCIe link to connect to the host and then sends a link operation control signal via the fixed physical link. Upon receiving this signal, the host wakes up its PCIe link connected to the BMC and sends a fault data indication signal to the BMC via the PCIe link, writing the fault log to a shared location. The BMC then reads the fault log based on the switchable physical link and stores it locally.

[0045] In another application scenario, such as Figure 2As shown, the 2U (standard unit for server vertical height) dual-node server adopts a two-motherboard configuration within a single chassis. The two hosts (Host0 and Host1) share the power supply, fans, and chassis. The CPUs / memory / storage of the two hosts are independent. The BMC (Browser Control Center) is connected to Host0 and Host1 respectively via two independent PCIe interfaces. Similarly, in this dual-node server, Host0 and Host1 also have a fixed physical link with the BMC. This link is not controlled by a router. Host0 and Host1 send link connection request signals to the BMC through their respective fixed physical links and receive status control signals from the BMC for the corresponding switchable physical links. These status control signals indicate whether the switchable link is running (link running control signal) or hibernating (link hibernation control signal). Host0 and Host1 configure H2B BAR (Base Address Register) in the operating system to map the BMC space address to the operating system memory space or I / O space, enabling data sharing between the BMC and Host0 and Host1.

[0046] During the operation of the dual-node server, when Host0 experiences an operating system kernel crash, it collects fault logs through a memory transfer service and stores them in the memory reserved by the host in the operating system. When Host0 detects data in this reserved memory, it sends a link connection request signal to the BMC via a fixed physical link. Upon receiving this link connection request signal, the BMC controls its PCIe link to switch to a connection with Host0, and then sends a link operation control signal via the fixed physical link. Upon receiving the link operation control signal, Host0 wakes up its PCIe_0 link connected to the BMC and sends a fault data indication signal to the BMC via the PCIe_0 link, writing the fault log to a shared location on Host0. The BMC then reads the fault log based on this PCIe_0 link and stores it locally.

[0047] It should be noted that the above application scenarios are only shown to facilitate understanding of the ideas and principles of the present invention, and the embodiments of the present invention are not limited in any way. On the contrary, the embodiments of the present invention can be applied to any applicable scenario. After introducing the technical solution of the present invention, various non-limiting embodiments of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0048] Please see first. Figure 3 , Figure 3This is a flowchart illustrating a fault diagnosis method provided in this embodiment. This embodiment is applied to a scenario where a single management controller manages multiple hosts simultaneously. The management controller is used for the management and monitoring of servers and network devices, and it runs independently of the server's operating system. In practical applications, the management controller can be, for example, a BMC (Browser Control Center). The fault diagnosis process performed by the management controller may include the following:

[0049] S301: When a link connection request signal is received from the first host through the first physical link, the first switchable physical link between the control management controller and the first host is connected, and a link operation control signal is sent to the first host through the first physical link.

[0050] In this embodiment, the first host refers to the host that sends a link connection request signal to the management controller at the current moment. The first host is also the host that has encountered an anomaly and needs to transfer fault data to the management controller. The anomaly refers to a fault that causes the operating system to be unable to continue to operate normally, such as an operating system kernel crash: a blue screen error in Windows (also known as a bug check, stop code error, or kernel error) or a kernel crash in Linux. Of course, it can also be other anomaly or fault scenarios defined by the user. The host of this invention refers to the main computing unit of the operating system and applications running on the server, which is managed by the management controller (i.e., the object to be monitored by the management controller) and can be used to process the server's computing tasks. The management controller of this invention includes at least two physical links for transmitting control information and data information between the management controller and each managed host. One is a fixed physical link (defined as a fixed physical link in this invention), and the other is a switchable physical link (defined as a switchable physical link in this invention). The switchable physical link is the link between the current host and the management controller connected through the current bus, and the number of such buses is limited, so one-to-one connection services cannot be provided. For ease of description, the fixed physical link between the first host and the management controller is defined as the first physical link, that is, the fixed connection link between the first host and the management controller; the switchable physical link between the first host and the management controller is defined as the first switchable physical link. When the first host needs to transmit fault data through the switchable link, it sends a link connection request signal to the management controller. Upon receiving the link connection request signal, the management controller will switch the current physical link to the physical link connected to the first host, i.e., the first switchable physical link, through the physical link switching tool of the control hardware, such as a route selector. After the switch is successful, it sends a link operation control signal to the first host through the fixed physical link. The link operation control signal indicates that the first switchable physical link between the first host and the management controller is successfully connected. When the first host receives the link operation control signal, it indicates that the first switchable physical link can be woken up, and the switchable physical link between the first host and the management controller is successfully connected, allowing them to interact or share data.

[0051] S302: When a fault data indication signal sent by the first host is received through the first switchable physical link, the first fault data is read from the first shared location through the first switchable physical link.

[0052] The fault data indication signal indicates that fault data is awaiting reading by the management controller. This signifies that the first host has prepared the fault data at the shared location. For ease of description, the shared location between the first host and the management controller is defined as the first shared location. The first shared location stores the fault data collected by the first host. It is a register or storage space that allows data exchange between the host and the management controller and can store data. For example, the host's OS (operating system) can be configured to indicate the location of the management controller in the system address space, mapping the management controller's address space to the system memory space or I / O space, thereby enabling data sharing between the management controller and the host. After reading the fault data from the first host at the first shared location, the management controller can store it locally. This can be done by pre-allocating storage for the fault data or by temporarily caching the data after reading it before storing it at the designated location. Fault data refers to the relevant data collected by the primary host when a specified anomaly or a failure occurs in the operating system. This data, such as fault logs, can provide fault diagnosis data for the underlying hardware interaction of the operating system, determining whether the current fault is caused by a hardware problem or a purely software problem, thereby accurately locating the root cause of the fault (hardware, driver, firmware, or the operating system itself). Of course, the management controller can also predict hardware failure risks in advance through correctable error trends in the fault data, triggering early warnings, realizing predictive maintenance, and avoiding unplanned downtime.

[0053] In the technical solution provided in this embodiment, for scenarios where the management controller manages multiple hosts simultaneously, in addition to the physical links that are switched by the management controller's route selector, a fixed physical link that is not controlled by the management controller's route selector is also set up between the hosts and the management controller. By sending and receiving control signals that control the switchable link status through the fixed physical link, the management controller can control the running status of the host's transmission service. This allows multiple hosts to time-share the physical link with the management controller. After receiving the link operation control signal, the host can maintain the link with the management controller and will not disconnect the link due to the influence of other hosts. The management controller can then use this physical link that maintains the connection to transfer the fault data collected when the host is abnormal to its local storage. This solves the problem that the operating system fault log data of the abnormal host cannot be successfully sent to the BMC. Regardless of whether the abnormal host can start normally, the transferred fault data can be used for fault analysis, which helps to improve the efficiency of locating the fault source, effectively improves the efficiency of server fault diagnosis and server maintenance, and enhances the high availability of services.

[0054] Furthermore, to ensure efficient and effective transfer of fault data to the local management controller, based on the above embodiments, the fault data indication signal may include a fault data transmission control signal and a fault data signal sent in stages. After the first switchable physical link is awakened, the first host may send a fault data transmission control signal to the management controller. The fault data transmission control signal indicates that the transmission of fault data can begin. When the management controller receives the fault data transmission control signal sent by the first host through the first switchable physical link, it may configure a target storage area for storing the first fault data. The first host writes the first fault data to the first shared location and then sends the fault data signal through the first switchable physical link. When the management controller receives the fault data signal sent by the first host through the first switchable physical link, it indicates that the first host has written the first fault data to the first shared location. The management controller can then read the first fault data through the first switchable physical link and write it to the target storage area, thereby completing the transfer of the fault data of the first host to the local management controller.

[0055] Based on the above embodiments, the target storage area can be a storage area temporarily requested for the first fault data when a fault data transmission control signal is received, or it can be a storage area divided into the storage space reserved by the management controller for fault data. That is, the log storage space is a storage space specifically allocated for storing fault data. For ease of description, it can be defined as the log storage space. Correspondingly, the management controller includes a log storage space for storing fault data sent by each host. The process of requesting a target storage area for storing the corresponding fault data is as follows: determine the target storage area for storing the first fault data in the log storage space, so as to realize partitioned storage of fault data of different hosts, which is convenient for management and query. Furthermore, a host identifier can be set for the target storage area as index information to improve the efficiency of the management controller in querying and retrieving fault data.

[0056] It is understandable that during the process of the management controller reading the first fault data from the first shared location, if other hosts also experience anomalies (defined as the second host in this embodiment), such as a kernel crash in the operating system of another host, and send a link connection request signal to the management controller, this embodiment also provides a method for the management controller to actively switch physical links between multiple hosts to improve the user experience of the hosts. This may include the following:

[0057] When a link connection request signal is received from the second host via the second physical link, a link sleep control signal is sent to the second host via the second physical link; when the amount of data read from the first shared location reaches the first preset data threshold, a link sleep control signal is sent to the first host via the first physical link; the communication link between the management controller and the host is switched to the second switchable physical link connected to the second host, and a link operation control signal is sent to the second host via the second physical link; when a fault data indication signal is received from the second host via the second switchable physical link, the second fault data is read from the second shared location via the second switchable physical link.

[0058] In this embodiment, the fixed physical link between the second host and the management controller is defined as the second physical link, which is a fixed connection link between the second host and the management controller. The switchable physical link between the second host and the management controller is defined as the second switchable physical link, and the shared location between the second host and the management controller is defined as the second shared location. The second shared location stores fault data collected by the second host (i.e., second fault data). It is a register or storage space that allows data interaction between the host and the management controller and can store data. Similarly, for example, the host's OS can be configured to specify a register or storage space indicating the location of the management controller in the system address space, mapping the management controller's address space to the system memory space or I / O space, thereby enabling data sharing between the management controller and the second host. Similarly, when the second host needs to transmit fault data through the second switchable link, it will request the management controller to connect to the management controller's switchable physical link, that is, send a link connection request signal to the management controller. After receiving the link connection request signal, the management controller will first determine the total amount of data read from the first shared location. If it does not reach the first preset data threshold (which can be a preset value), it will continue to read the first fault data from the first shared location, that is, the first switchable physical link remains connected. At the same time, it can send a link sleep control signal to the second host, which indicates that it will not switch to the switchable physical link connecting the management controller and the second host, that is, the second switchable physical link is in a sleep state. If the first preset data threshold is reached, the system will actively stop reading data from the first host. It can send a link sleep control signal to the first host via the first physical link. At this time, the first switchable physical link changes from running state to sleep state. At the same time, the physical link switching tool of the control hardware, such as a router, switches the current physical link to the physical link connected to the second host. After the switch is successful, a link operation control signal is sent to the second host via the second physical link. The link operation control signal indicates that the second switchable physical link between the second host and the management controller is successfully connected. When the second host receives the link operation control signal, it indicates that the second switchable physical link can be woken up. The switchable physical link between the second host and the management controller is successfully connected, and the two can perform data interaction or data sharing. When the management controller receives the fault data indication signal, it can read the second fault data from the second shared location and store the second fault data locally.

[0059] Based on the above embodiments, an exemplary scenario is as follows: Both the first and second hosts that fail simultaneously have no priority configuration, meaning they are managed at the same level. To prevent either host from waiting for too long, they can switch back after one link connection. This means the two hosts alternately use a switchable physical link for a period of time to transmit information and control the operation of the host's switchable physical link. The host with the established switchable physical link operates its switchable physical link, while the host without an established switchable physical link sleeps. When the amount of data read from the second shared location reaches a second preset data threshold (which may be the same as or different from the first preset data threshold), a link sleep control signal is sent to the second host via the second physical link. The communication link between the management controller and the host is switched to the first switchable physical link connected to the first host, and a link operation control signal is sent to the first host via the first physical link. When a fault data indication signal is received from the first host via the first switchable physical link, the first fault data is read from the first shared location via the first switchable physical link. The process can be repeated cyclically using the links as described above until all fault data at one of the shared locations has been read. Then, the remaining host can use the switchable physical link exclusively for fault data transmission. Alternatively, in another implementation of this embodiment, after two switches, regardless of whether the fault data read at the first shared location in the current round reaches the first preset data threshold, the first fault data at the first shared location is read first. That is, if there is no new fault data at the first shared location, or if the amount of data read from the first shared location does not reach the first preset data threshold and there is no new fault data at the first shared location, a data transmission completion signal is sent to the first host. The communication link between the management controller and the host is switched to a second switchable physical link connected to the second host, and a link operation control signal is sent to the second host through the second physical link. When a fault data indication signal sent by the second host is received through the second switchable physical link, the second fault data is read from the second shared location through the second switchable physical link until there is no new fault data at the second shared location.

[0060] Based on the above embodiments, another exemplary scenario is as follows: the second host has a higher priority than the first host, or the fault repair time of the second host is shorter, or the business run by the second host is more urgent. Accordingly, after the switchable physical link of the management controller switches from the first host to the second host, it will first read the second fault data and then read the first fault data. Accordingly, it may include the following: when there is no new fault data from the second shared location, a data transmission completion signal is sent to the second host; the communication link between the management controller and the host is switched to the first switchable physical link connected to the first host, and a link operation control signal is sent to the first host through the first physical link; when a fault data indication signal sent by the first host is received through the first switchable physical link, the first fault data is continued to be read from the first shared location through the first switchable physical link until there is no new fault data in the first shared location.

[0061] For example, considering that if the host wait time exceeds the limit, to avoid data loss due to host failure, a mid-term timeout duration and a total timeout duration can be preset. If the first host has not received a new link operation control signal within the preset time period, that is, if the first host exceeds the mid-term timeout duration, the remaining fault data in the first shared location will be transferred to the hard drive of the first host. Furthermore, if the second host has not received a link operation control signal after exceeding the total timeout duration, the second fault data will be directly transferred to the hard drive of the second host.

[0062] Based on the above embodiments, when multiple hosts simultaneously require a switchable link connection to the management controller, in order to adapt to more business needs and application scenarios, the present invention also determines whether to switch and the switching duration based on fault diagnosis priority, which may include the following:

[0063] When a link connection request signal is received from the second host through the second physical link, the fault diagnosis priority of the first host and the second host is determined; based on the fault diagnosis priority of the first host and the second host, the physical link allocation parameters of the first host and the second host are determined; based on the physical link allocation parameters, the running time or sleep time of the first physical link and the second physical link is determined, and switching is performed between the first physical link and the second physical link according to the running time or sleep time.

[0064] For example, the importance level of each host can be preset based on its actual hardware condition or operational business needs. Multiple levels can be set, such as important, moderate, and unimportant. The fault diagnosis priority is determined based on the preset importance level of each host; the higher the host's importance, the higher its fault diagnosis priority. Furthermore, the fault status of the hosts can be assessed in real time, and hosts requiring immediate maintenance can be given a high fault diagnosis priority. For example, hosts with severely aged hardware or faulty critical components can be given a high fault diagnosis priority. For instance, based on the device identification information of the second and first hosts, historical fault data and pre-fault operational status data of the first and second hosts can be obtained. Based on the historical fault data and operational status data, the fault severity level of the first and second hosts can be determined. Finally, based on the fault severity level of the first and second hosts, their fault diagnosis priorities can be determined. In addition, the priority of fault diagnosis can be determined based on the operational business and user needs. If the operational business requires high continuity, a high priority of fault diagnosis can be set. If the user needs short fault response time, a high priority of fault diagnosis can be set. For example, the operational business and / or user needs of the first and second hosts can be obtained based on the device identification information of the second host and the device identification information of the first host. The fault diagnosis priority of the first and second hosts can be determined based on the operational business type and / or user needs.

[0065] Once the fault diagnosis priorities of the two hosts are determined, if their fault diagnosis priorities are the same or similar, they can switch back and forth on their respective switchable links to store their respective fault data, as described in the above embodiment. That is, link switching is allowed and the link usage time for both hosts is almost the same. If their fault diagnosis priorities are different, and one host has the highest fault diagnosis priority, or one host has a much higher priority than the other, then after switching the link to that host, it is not allowed to switch the link to other hosts. If their priorities are similar, link switching is allowed, and the higher-priority host can be allocated a longer link usage time according to a preset ratio, such as 7:3 or 6:4.

[0066] Furthermore, the present invention also provides a method for analyzing fault data based on fault diagnosis priority, thereby enabling the output of different host fault diagnosis results on demand or according to priority, which may include the following:

[0067] The log storage space stores multiple fault data. From the log storage space, the fault data and corresponding identification information of each storage area are read. Based on the identification information of each fault data, the fault diagnosis priority of the corresponding host is determined, which serves as the data processing priority of each fault data. Based on the data processing priority of each fault data, the fault diagnosis results are determined for the corresponding host in sequence.

[0068] In this embodiment, when each host stores its own fault data, it can simultaneously store unique identification information of the host, such as directly using the host device number + fault log. When the management controller's computing resources allow, multiple fault data can be processed simultaneously, and corresponding fault diagnosis results can be output. However, in scenarios with limited computing resources, or when other threads are currently consuming significant computing resources (i.e., when it is impossible to process all fault data simultaneously), they can be processed sequentially according to their respective fault diagnosis priorities. For example, the resources available for processing fault data can be determined based on resource allocation, such as the management controller's existing computing resources, currently used computing resources, and reserved computing resources. Then, the number of data processing threads is determined based on these resources. If the total number of data processing threads is greater than or equal to the total number of fault data, fault analysis is performed on each fault data simultaneously. If the total number of data processing threads is less than the total number of fault data, fault analysis is performed on each fault data sequentially according to its data processing priority. This ensures full utilization of resources without affecting the normal operation of the management controller and allows for timely response to server fault diagnosis. The above embodiment describes the process of transferring host failure data to the management controller's local storage by managing multiple hosts simultaneously from a single management controller. This embodiment also provides an implementation process for how a host experiencing an anomaly (i.e., the target host in this embodiment) has its failure data read locally by the management controller, which may include the following:

[0069] S401: When a fault data storage requirement is detected, a link connection request signal is sent to the management controller via a fixed physical link.

[0070] The management controller manages at least two hosts. The target host is one of the managed hosts that has experienced an anomaly. The fault data storage requirement refers to the need to temporarily store the collected fault data of the target host in a designated location or to store the fault data directly, without limiting the storage location. The fixed physical link between the target host and the management controller is defined as the target fixed physical link, which is the fixed connection link between the target host and the management controller.

[0071] S402: When a link operation control signal is received from the management controller via a fixed physical link, a fault data indication signal is sent to the management controller via a switchable physical link so that the management controller can read the target fault data from the target shared location based on the switchable physical link.

[0072] Specifically, the switchable physical link between the target host and the management controller is defined as the target switchable physical link, and the link operation control signal indicates that the switchable physical link between the target host and the management controller has been successfully connected. The shared location between the target host and the management controller is defined as the target shared location. The target shared location stores fault data collected by the target host (i.e., target fault data). This location is a register or storage space that allows data exchange between the host and the management controller and can store data. For example, the host's OS (operating system) can be configured to indicate the location of the management controller in the system address space, mapping the management controller's address space to the system memory space or I / O space, thereby enabling data sharing between the management controller and the host. The fault data indication signal indicates that the fault data is awaiting reading by the management controller.

[0073] Furthermore, to ensure that fault data is efficiently and effectively transferred to the local management controller, based on the above embodiments, the fault data indication signal may include a fault data transmission control signal and a fault data signal sent in stages. The target host sends the fault data transmission control signal to the management controller through a switchable physical link. The management controller receives the fault data transmission control information and requests a target storage area to store the corresponding fault data. The target host writes the fault data to the target shared location and sends the fault data signal to the management controller through the switchable physical link. The fault data signal indicates that the target host has written the fault data to the target shared location.

[0074] For example, to improve the efficiency of fault data transfer and fault diagnosis, this embodiment also reserves memory space within the target host's operating system. This reserved memory space is used to store fault data. Correspondingly, the target host includes reserved memory space, and the link request connection request signal can be triggered by detecting whether there is data in the reserved memory space. The reserved memory space actually serves as a data cache between the target host and the management controller. Therefore, it is not necessary to wait for the memory dump service to completely collect the fault data before starting the transfer process to the management controller. After the memory dump service collects a segment of log, it can write the data segment into the reserved memory space. Then, by transferring the fault data segment to the management controller through the above embodiment, the following can be included:

[0075] The target fault data includes fault data blocks, that is, all fault data consists of multiple consecutive fault data blocks. When the operating system is abnormal, the memory dump service thread is triggered. Each time a fault data segment is collected, it is sent to the reserved memory space as the corresponding fault data block. When the reserved memory space receives the fault data block, it triggers the sending of a link connection request signal to the management controller.

[0076] For example, when the fault data acquisition is completed, the state of the memory dump service thread is adjusted to a dormant state; when a data transmission completion signal is received, the memory dump service thread is woken up to trigger the operating system restart process; wherein, the data transmission completion signal is a signal sent by the management controller to the target host when it determines that there is no fault data block of the target host in the shared location.

[0077] It should be noted that there is no strict order of execution between the steps in this invention. As long as they conform to the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 3 and Figure 4 This is just an illustrative example and does not mean that this is the only possible execution order.

[0078] To enable those skilled in the art to more clearly understand the technical solution of the present invention, the present invention also provides an exemplary implementation. In this embodiment, the management controller can be, for example, a BMC. The switchable physical link between the BMC and the host is a PCIe link. The BMC and the host interact with each other through an H2B device. The host's operating system configures the Msg Bar (Message Base Address Register) and Mem Bar (Memory Base Address Register) to map the BMC space to the host. The corresponding target shared location is the Mem Bar. The fault data stored in the Mem Bar is the fault log. The fault diagnosis process for a single BMC with multiple hosts may include the following:

[0079] like Figure 5 As shown, each managed host's operating system includes a host data channel management module and a control signal module that encapsulate computer programs implementing the corresponding methods. The BMC software includes a data channel management module corresponding to the host data channel management module. The functional modules and implementation methods of each module are as follows:

[0080] For any managed host, the host data channel management module manages the communication process with the BMC and may include a link request module, a wake-up / sleep listening module, a link communication module, and reserved memory. Reserved memory stores fault logs transmitted to the BMC. The memory dump service dumps fault logs originally stored on the hard drive into the reserved memory of the data channel management module. When the link communication module runs, it reads data from this memory and transmits it to the Mem Bar. The link request module sends a PCIe device switching request to the BMC when a host needs to transmit data with the BMC via a PCIe link. After responding to the switching request, the BMC controls the selector to switch the PCIe device to the requesting host. The selector is an existing hardware component of the BMC; signals from the link request module trigger software in the BMC to control the selector, enabling the switching of the PCIe link between different hosts. Wake-up / Sleep Listening Module: Listens for wake-up / sleep signals sent by the BMC. When the BMC sends a wake-up signal (i.e., a link operation control signal), the link communication module runs, sending fault log transmission control signals and fault log data signals to the BMC via the PCIe link. When the BMC sends a sleep signal (i.e., a link sleep control signal), the link communication module stops running to prevent PCIe signal transmission failure due to PCIe link disconnection. Link Communication Module: Used to transmit fault data transmission control signals and fault data signals to the BMC. It uses the Msg Bar of the PCIe H2B device to transmit fault data transmission control signals and fault data signals, and uses the MemBar of the PCIe H2B device to store data, transferring fault logs from the MemBar to the log storage space.

[0081] Control Signal Module: Manages the control signal flow with the BMC, sending notifications to the BMC or transmitting notifications from the BMC to the Data Channel Management Module. The Control Signal Module is unaffected by the BMC's PCIe routing control, maintains a constant link with the BMC, and can send route-switching requests to the BMC at any time or respond promptly to wake-up / sleep signals sent by the BMC. The Control Signal Module may include a route-switching request signal management module and a sleep / wake-up service signal management module. The route-switching request signal management module notifies the BMC of route-switching requests sent by the Data Channel Management Module, enabling the BMC to respond with a route-switching action. The sleep / wake-up service signal management module notifies the Data Channel Management Module of wake-up / sleep signals sent by the BMC, causing the link communication module within the Data Channel Management Module to either run or sleep.

[0082] The data channel management module of the management controller is used to manage communication with the host and may include a host service management module, a link communication module, and a log storage module. The data channel management module of the management controller and the data channel management module of the host are different ends of the communication. After the host sends a signal to the BMC, a module in the BMC receives and responds to that signal. Similarly, when the BMC sends a signal to the host, the host also has a dedicated module to receive and respond to that signal. The Host service management module manages the operational status of the Host link communication module. When data transmission is required, it wakes the module with a wake-up signal; when data transmission needs to be paused, it puts the module to sleep with a sleep signal. It also responds to the Host's routing requests, invoking the routing control module to switch the PCIe link between the BMC and the Host. The link communication module communicates with the Host via the PCIe link, transmitting fault log transmission control signals and fault log data signals. It receives fault log transmission control signals from the H2B device's Msg Bar and responds accordingly. It receives fault log data signals from the H2B device's Mem Bar and transfers them to the log storage module. The log storage module reserves storage space for each Host that needs to transfer fault logs, storing the fault logs sent by the Host.

[0083] Based on the above single BMC multi-host architecture, the following sections detail the implementation process of fault log transmission timing under conditions of no link contention and under conditions of link contention, and may include the following:

[0084] The timing implementation process of fault log transmission without link contention: as follows Figure 6 As shown, when the host operating system experiences a kernel crash and needs to transmit memory and other fault logs collected by the memory dump service to the BMC, there is no interference from other hosts requesting link connections. That is, during the fault log transmission phase, the faulty host can completely occupy the PCIe link communicating with the BMC, and the BMC will not receive link connection request signals initiated by other hosts during the transmission.

[0085] A11: When the operating system kernel of the target host crashes, the memory dump service is started to collect fault logs such as memory and calltrace, and the fault logs are transferred to the reserved memory of the data channel management module.

[0086] Among them, the memory dump service can collect a segment of log and write the data into the reserved memory, and the link communication module will then transfer the fault log segment to the BMC.

[0087] A12: When the reserved memory of the target host's data channel management module receives the fault log, it sends a link connection request signal through the link request module, requesting the BMC to switch the PCIe link to the target host. The target host can use the PCIe link to transmit data to the BMC. After the BMC executes the switching request, it sends a wake-up signal, the link operation control signal, to start the target host's link communication module.

[0088] A13: When the link communication module starts, it sends a fault data transmission control signal to the BMC via the Msg Bar, and the BMC requests a target storage area for the fault log.

[0089] A14: The link communication module reads the fault log in the reserved memory, writes the fault log into the MemBar of the H2B device, and sends the fault data signal to the BMC through the Msg BAR. After receiving the fault data signal, the BMC transfers the fault log data in the MemBar to the log storage space.

[0090] A15: After the memory transfer service finishes collecting memory and other fault logs, it enters a hibernation state. When the fault logs in the reserved memory are completely transferred to the BMC, the BMC sends a data transfer completion signal to the target host. At this time, the target host wakes up the memory transfer service and executes subsequent operating system restart and other processes.

[0091] The timing implementation process of fault log transmission without link contention: as follows Figure 7 As shown, when Host1 is dumping fault logs to the BMC, Host2's operating system also experiences a kernel crash and needs to transmit memory and other fault logs collected by the memory dump service to the BMC. At this time, to prevent a host from waiting too long and being unable to transmit fault log data in a timely manner, the BMC actively switches the PCIe link between Host1 and Host2. This allows the host requiring a PCIe link to temporarily use the PCIe link to transmit information, and controls the operating status of the link communication modules in the hosts, keeping the link communication modules in the hosts with established PCIe links running, and putting the link communication modules in the hosts without established PCIe links to sleep.

[0092] A21: When Host1 requests a PCIe link from BMC to transmit data, if the kernel of Host2's operating system crashes and it needs to request a PCIe link, BMC sends a link hibernation control signal to Host2, causing Host2's link communication module to hibernate and preventing Host2 from using the PCIe link.

[0093] A22: After Host1 sends a fault log to BMC, BMC saves the Host1 log, sends a link hibernation control signal to Host1, causing the Host1 link communication module to enter hibernation mode, temporarily releasing Host1's use of the PCIe link. BMC then performs PCIe link switching to Host2 and sends a link operation control signal to Host2, causing the Host2 link communication module to start working.

[0094] The upper limit for the transmission of fault logs is the maximum space of Mem BAR, which is affected by the specific implementation of Mem BAR. The lower limit is 0 because the transmission of data and the operation of caching fault logs to reserved memory are asynchronous. When the PCIe link is obtained, the transfer service may only write a small part of the logs to the reserved memory.

[0095] A23: After Host2 transmits a fault log to BMC, BMC sends a link hibernation control signal to Host2, causing Host2's link communication module to enter hibernation mode, temporarily releasing Host2's use of the PCIe link. BMC then performs a PCIe link switch to Host1, allowing the link communication module in Host1 to continue transferring fault log data to BMC.

[0096] A24: After Host1 completes the transfer of fault logs, the BMC sends a data transfer completion signal to Host1, wakes up the Host1 memory transfer service to restart Host1, and switches the PCIe link to Host2 for Host2 to transfer fault logs. At this time, only one Host needs the PCIe link. When the Host transfers data, the BMC will no longer switch the link until Host2 completes the transfer of fault logs.

[0097] As shown above, this embodiment reserves memory in the host to cache the fault logs collected by the memory dump service. When the host's operating system kernel crashes, the memory dump service transfers the fault logs containing memory information to the reserved memory, thus achieving asynchronous fault log collection and transmission. A PCIe link is requested from the BMC. Upon receiving the request, the BMC performs a PCIe link switch and wakes up the link transmission module in the host to begin transmitting fault log data. Fault log transmission uses the Msg BAR of the H2B device to transmit the fault log data dump control signal and the Mem BAR of the H2B device to transmit the fault log data signal. The BMC integrates a module that controls host data transmission. When a host is transmitting fault log data, if only one host needs to transmit fault logs to the BMC, that host will always occupy the PCIe link to transmit fault logs to the BMC. When multiple hosts fail simultaneously and need to transfer fault logs, the BMC controls the competing hosts: if other hosts managed by the BMC also experience kernel crashes and need to transfer fault logs, the BMC controls the link transmission module to ensure that only one link transmission module operates at a time, guaranteeing that only one host needs the PCIe link during that period. After a host transmits a segment of fault log data, the BMC actively puts the transmission service on that host to sleep, switches the PCIe link to another host that needs it, and wakes up the transmission service on that host, thus preventing a single host from monopolizing the PCIe link and causing other hosts that need the PCIe link to become blocked.

[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0099] This invention also provides a corresponding apparatus for the fault diagnosis method, further enhancing the practicality of the method. The apparatus can be described from both a functional module perspective and a hardware perspective. The fault diagnosis apparatus provided by this invention is described below. This apparatus is used to implement the fault diagnosis method provided by this invention. In this embodiment, the fault diagnosis apparatus may include or be divided into one or more program modules. These one or more program modules are stored in a storage medium and executed by one or more processors to complete the fault diagnosis method disclosed in Embodiment 1. The program module referred to in this embodiment is a series of computer program instruction segments capable of performing a specific function, which is more suitable than the program itself for describing the execution process of the fault diagnosis apparatus in the storage medium. The following description will specifically introduce the functions of each program module in this embodiment. The fault diagnosis apparatus described below can be referred to in correspondence with the fault diagnosis method described above.

[0100] From the perspective of functional modules, see Figure 8, Figure 8 This is a structural diagram of the fault diagnosis device provided in this embodiment under one specific implementation. The device is applied in a management controller and may include:

[0101] The host service management module 801 is used to control the connection of the first switchable physical link between the management controller and the first host when it receives a link connection request signal sent by the first host through the first physical link, and to send a link operation control signal to the first host through the first physical link; the first physical link is a fixed connection link between the first host and the management controller; the link operation control signal indicates that the first switchable physical link between the first host and the management controller has been successfully connected.

[0102] The link communication module 802 is used to read first fault data from the first shared location through the first switchable physical link when it receives a fault data indication signal sent by the first host through the first switchable physical link; the fault data indication signal is used to indicate that the fault data is waiting to be read by the management controller.

[0103] For example, in some embodiments of this example, the link communication module 802 can also be used to: when receiving a link connection request signal sent by the second host through the second physical link, send a link sleep control signal to the second host through the second physical link; the second physical link is a fixed connection link between the second host and the management controller; when the amount of data read from the first shared location reaches a first preset data threshold, send a link sleep control signal to the first host through the first physical link; switch the communication link between the management controller and the host to a second switchable physical link connected to the second host, and send a link operation control signal to the second host through the second physical link; when receiving a fault data indication signal sent by the second host through the second switchable physical link, read the second fault data from the second shared location through the second switchable physical link.

[0104] As an exemplary implementation of the above embodiments, the link communication module 802 can also be used to: when the amount of data read from the second shared location reaches a second preset data threshold, send a link sleep control signal to the second host through the second physical link; switch the communication link between the management controller and the host to a first switchable physical link connected to the first host, and send a link operation control signal to the first host through the first physical link; when a fault data indication signal sent by the first host is received through the first switchable physical link, continue to read the first fault data from the first shared location through the first switchable physical link. As an exemplary implementation of the above embodiments, the link communication module 802 can also be used to: when there is no new fault data at the first shared location, send a data transmission completion signal to the first host; switch the communication link between the management controller and the host to a second switchable physical link connected to the second host, and send a link operation control signal to the second host through the second physical link; when a fault data indication signal sent by the second host is received through the second switchable physical link, read the second fault data from the second shared location through the second switchable physical link until there is no new fault data at the second shared location.

[0105] As another exemplary implementation of the above embodiments, the link communication module 802 can also be used to: if the first host does not receive a new link operation control signal within a preset time period, then transfer the remaining fault data of the first shared location to the hard disk of the first host.

[0106] As another exemplary implementation of the above embodiments, the link communication module 802 can also be used to: send a data transmission completion signal to the second host when there is no new fault data from the second shared location; switch the communication link between the management controller and the host to a first switchable physical link connected to the first host, and send a link operation control signal to the first host through the first physical link; when a fault data indication signal sent by the first host is received through the first switchable physical link, continue to read the first fault data from the first shared location through the first switchable physical link until there is no new fault data from the first shared location.

[0107] For example, in some other embodiments of this embodiment, the link communication module 802 can also be used to: the fault data indication signal includes a fault data transmission control signal and a fault data signal; when the fault data transmission control signal sent by the first host through the first switchable physical link is received, the target storage area for storing the first fault data is configured; when the fault data signal sent by the first host through the first switchable physical link is received, it is determined that the first host has written the first fault data to the first shared location.

[0108] For example, in some other embodiments of this embodiment, the link communication module 802 can also be used to: when receiving a link connection request signal sent by the second host through the second physical link, determine the fault diagnosis priority of the first host and the second host; determine the physical link allocation parameters of the first host and the second host according to the fault diagnosis priority of the first host and the second host; determine the running time or sleep time of the first physical link and the second physical link according to the physical link allocation parameters, and switch between the first physical link and the second physical link according to the running time or sleep time.

[0109] As an exemplary implementation of the above embodiments, the link communication module 802 can also be used to: obtain historical fault data and pre-fault operating status data of the first host and the second host based on the device identification information of the second host and the device identification information of the first host; determine the fault severity level of the first host and the second host based on the historical fault data and the operating status data; and determine the fault diagnosis priority of the first host and the second host based on the fault severity level of the first host and the second host.

[0110] As another exemplary implementation of the above embodiments, the link communication module 802 can also be used to: obtain the operating services and / or user requirements of the first host and the second host based on the device identification information of the second host and the device identification information of the first host; and determine the fault diagnosis priority of the first host and the second host based on the operating service type and / or user requirements.

[0111] For example, in some other embodiments of this embodiment, the above-mentioned device may further include a fault diagnosis module, which can be used to: read fault data and corresponding identification information of each storage area from the log storage space; determine the fault diagnosis priority of the corresponding host according to the identification information of each fault data, so as to serve as the data processing priority of each fault data; and determine the fault diagnosis result for the corresponding host in sequence according to the data processing priority of each fault data.

[0112] As an exemplary implementation of the above embodiments, the fault diagnosis module can also be used to: determine the number of data processing threads based on resource allocation; if the total number of data processing threads is greater than or equal to the total number of fault data, then perform fault analysis on each fault data simultaneously; if the total number of data processing threads is less than the total number of fault data, then perform fault analysis on each fault data sequentially according to the data processing priority of each fault data. As another exemplary implementation of the above embodiments, the link communication module 802 can also be used to: the management controller includes a log storage space pre-configured for storing fault data sent by each host, and determine a target storage area for storing the first fault data in the log storage space.

[0113] From the perspective of functional modules, see Figure 9 , Figure 9 This is a structural diagram of the fault diagnosis device provided in this embodiment under one specific implementation. The device is applied to a target host and may include:

[0114] The link request module 901 is used to send a link connection request signal when a faulty data storage requirement is detected; the fixed physical link is a fixed connection link between the target host and the management controller; the management controller manages at least two hosts.

[0115] The control signal monitoring module 902 is used to monitor the control signals sent by the management controller through a fixed physical link.

[0116] The signal control module 903 is used to send the link connection request signal sent by the link request module to the management controller through the fixed physical link, and to send the link operation control signal sent by the management controller through the fixed physical link to the host link communication module.

[0117] The host link communication module 904 is used to send a fault data indication signal to the management controller when it receives a link operation control signal, so that the management controller can read the target fault data from the target shared location based on the switchable physical link; the link operation control signal indicates that the switchable physical link between the target host and the management controller is successfully connected; the fault data indication signal is used to indicate that the fault data is waiting for the management controller to read.

[0118] For example, in some embodiments of this example, the host link communication module 904 can also be used to: send the fault data indication signal, which includes a fault data transmission control signal and a fault data signal, to the management controller via a switchable physical link so that the management controller receives the fault data transmission control information and requests a target storage area to store the corresponding fault data; write the fault data to the target shared location and send the fault data signal to the management controller via the switchable physical link; the fault data signal indicates that the target host has written the fault data to the target shared location.

[0119] For example, in some other embodiments of this embodiment, the link request module 901 can also be used to: trigger a memory dump service thread when the operating system is abnormal, and send each piece of fault data collected as a corresponding fault data block to the reserved memory space; when the reserved memory space receives the fault data block, it triggers the sending of a link connection request signal to the management controller.

[0120] For example, in some other embodiments of this embodiment, the above-mentioned device may further include a restart module, which may also be used to: adjust the state of the memory dump service thread to a dormant state when the fault data acquisition is completed; wake up the memory dump service thread when a data transmission completion signal is received to trigger the operating system restart process; wherein, the data transmission completion signal is a signal sent by the management controller to the target host when it determines that there is no fault data block of the target host in the shared location.

[0121] The fault diagnosis device mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, described from a hardware perspective. This electronic device includes a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the fault diagnosis method embodiments described above.

[0122] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described fault diagnosis method embodiments when it is run.

[0123] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0124] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described fault diagnosis method embodiments.

[0125] Embodiments of this application also provide another computer program product, including a non-volatile storage medium, i.e., a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-described fault diagnosis method embodiments.

[0126] Finally, the present invention also provides a fault diagnosis system, see [link to relevant documentation]. Figure 10The system may include a management controller 11 and a host cluster 12; there are at least two independent fixed physical links and switchable physical links between the management controller 11 and each host in the host cluster 12; the management controller 11 includes at least an in-band data communication device and a route selector, such as an H2B in-band data communication device, and the management controller 11 communicates with each host through the in-band data communication device and switches the switchable physical links with each host through the route selector; when the management controller 11 executes a computer program, it implements the steps of executing a corresponding fault diagnosis method as described in any of the above embodiments; when each host executes a computer program, it implements the steps of executing a corresponding fault diagnosis method as described in any of the above embodiments.

[0127] For example, each host includes a reserved memory space for storing fault data; the management controller 11 includes a log storage space for storing fault data sent by each server; the management controller 11 receives fault data transmission control information and determines the target storage area for storing the corresponding fault data in the log storage space; each host reads the fault data from the reserved memory space and writes it to the memory base address register.

[0128] For example, each host includes a base address register, through which it reads and writes data with the in-band data communication device; the base address register maps the space of the management controller 11 to the host space, including a message base address register and a memory base address register; each host sends a fault data transmission control signal to the in-band data communication device through the message base address register, the management controller 11 receives the fault data transmission control information, and requests a target storage area to store the corresponding fault data; each host writes the fault data to the memory base address register, and sends a fault data signal to the in-band data communication device through the message base address register, the management controller 11 receives the fault data signal, reads the fault data from the memory base address register, and stores it in the target storage area.

[0129] The Msg BAR is a channel in the H2B device, enabling signal transmission in both directions: from the host to the management controller 11 or from the management controller 11 to the host. This channel also features interrupt control; sending a signal to the peer simultaneously triggers an interrupt notification, which the peer can then read from the Msg BAR within its interrupt response logic. The Msg BAR can transmit a small amount of data at a time, only a few bytes, making it suitable for transmitting control signals. Furthermore, in scenarios where a host failure renders interrupts unusable, the host will not use the interrupt mechanism, while the management controller can still utilize it normally. Mem BAR is the second channel in the H2B device. Unlike Msg BAR, the Mem BAR channel has no interrupt mechanism and no directionality. This register space is a shared space between the BMC and the Host, and either party can read and write to it. However, due to the lack of directionality and interrupt mechanism support, neither the host nor the management controller 11 knows which party wrote data to this space or when. Therefore, it needs to cooperate with Msg BAR. Msg BAR notifies the other end to read data from Mem BAR and how to process the data, such as whether to read the first piece of data or newly added data at a certain time.

[0130] The foregoing has provided a detailed description of a fault diagnosis method and system provided by the present invention. The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Whether the units and algorithm steps of the various examples described in the disclosed embodiments are executed by electronic hardware or computer software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, and such implementations should not be considered beyond the scope of the present invention. Several improvements and modifications can be made to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. A fault diagnosis method, characterized in that, Management controllers used to manage multiple hosts simultaneously include: When a link connection request signal is received from the first host through the first physical link, the management controller controls the first switchable physical link between the management controller and the first host to connect, and sends a link operation control signal to the first host through the first physical link. When a fault data indication signal sent by the first host is received through the first switchable physical link, the first fault data is read from the first shared location through the first switchable physical link in order to determine the fault diagnosis result of the first host through the first fault data. Wherein, the first physical link is a fixed connection link between the first host and the management controller; the link operation control signal indicates that the first switchable physical link between the first host and the management controller has been successfully connected; the fault data indication signal is used to indicate that the fault data is waiting for the management controller to read.

2. The fault diagnosis method according to claim 1, characterized in that, The process of reading fault data from the first shared location via the first switchable physical link also includes: When a link connection request signal is received from the second host via the second physical link, a link sleep control signal is sent to the second host via the second physical link; the second physical link is a fixed connection link between the second host and the management controller; When the amount of data read from the first shared location reaches the first preset data threshold, a link sleep control signal is sent to the first host through the first physical link. The communication link between the management controller and the host is switched to a second switchable physical link connected to the second host, and a link operation control signal is sent to the second host through the second physical link. When a fault data indication signal sent by the second host is received through the second switchable physical link, the second fault data is read from the second shared location through the second switchable physical link.

3. The fault diagnosis method according to claim 2, characterized in that, Also includes: When the amount of data read from the second shared location reaches the second preset data threshold, a link sleep control signal is sent to the second host through the second physical link. The communication link between the management controller and the host is switched to a first switchable physical link connected to the first host, and a link operation control signal is sent to the first host through the first physical link. When a fault data indication signal sent by the first host is received through the first switchable physical link, the first fault data is read from the first shared location through the first switchable physical link.

4. The fault diagnosis method according to claim 3, characterized in that, After continuing to read the first fault data from the first shared location via the first switchable physical link, the method further includes: If no new fault data is found at the first shared location, a data transmission completion signal is sent to the first host. The communication link between the management controller and the host is switched to a second switchable physical link connected to the second host, and a link operation control signal is sent to the second host through the second physical link. When a fault data indication signal sent by the second host is received through the second switchable physical link, the second fault data is read from the second shared location through the second switchable physical link until there is no new fault data in the second shared location.

5. The fault diagnosis method according to claim 2, characterized in that, Also includes: If the first host does not receive a new link operation control signal within a preset time period, the remaining fault data of the first shared location will be transferred to the hard disk of the first host.

6. The fault diagnosis method according to claim 2, characterized in that, Reading second fault data from the second shared location via the second switchable physical link includes: If no new fault data is found from the second shared location, a data transmission completion signal is sent to the second host. The communication link between the management controller and the host is switched to a first switchable physical link connected to the first host, and a link operation control signal is sent to the first host through the first physical link. When a fault data indication signal sent by the first host is received through the first switchable physical link, the first fault data is read from the first shared location through the first switchable physical link until there is no new fault data in the first shared location.

7. The fault diagnosis method according to claim 1, characterized in that, The process of reading fault data from the first shared location via the first switchable physical link also includes: When a link connection request signal is received from the second host via the second physical link, the fault diagnosis priority of the first host and the second host is determined. Based on the fault diagnosis priorities of the first host and the second host, determine the physical link allocation parameters of the first host and the second host; The running time or sleep time of the first physical link and the second physical link is determined according to the physical link allocation parameters, and the switching between the first physical link and the second physical link is performed according to the running time or the sleep time.

8. The fault diagnosis method according to claim 7, characterized in that, Before determining the fault diagnosis priority of the first host and the second host, the process also includes: Based on the device identification information of the second host and the device identification information of the first host, obtain the historical fault data and the operating status data before the fault of the first host and the second host; Based on the historical fault data and the operating status data, determine the fault severity level of the first host and the second host; Based on the fault severity levels of the first host and the second host, the fault diagnosis priority of the first host and the second host is determined.

9. The fault diagnosis method according to claim 7, characterized in that, Before determining the fault diagnosis priority of the first host and the second host, the process also includes: Based on the device identification information of the second host and the device identification information of the first host, obtain the operating services and / or user requirements of the first host and the second host; The fault diagnosis priorities of the first host and the second host are determined based on the type of business being run and / or user needs.

10. The fault diagnosis method according to any one of claims 1 to 9, characterized in that, The fault data indication signal includes a fault data transmission control signal and a fault data signal. Receiving the fault data indication signal sent by the first host via the first switchable physical link includes: When a fault data transmission control signal is received from the first host via the first switchable physical link, the target storage area for storing the first fault data is configured. When a fault data signal is received from the first host via the first switchable physical link, it is determined that the first host has written the first fault data to the first shared location.

11. The fault diagnosis method according to claim 10, characterized in that, The management controller includes a log storage space pre-configured for storing fault data sent by each host, and a target storage area for storing the first fault data, including: Determine the target storage area for storing the first fault data within the log storage space.

12. The fault diagnosis method according to claim 11, characterized in that, The log storage space stores multiple fault data, and also includes: Read the fault data and corresponding identification information of each storage area from the log storage space; Based on the identification information of each fault data, the corresponding fault diagnosis priority of the host is determined, which is then used as the data processing priority for each fault data. Based on the data processing priority of each fault data, the fault diagnosis results are determined for the corresponding host in sequence.

13. The fault diagnosis method according to claim 11, characterized in that, Based on the data processing priority of each fault data, the fault diagnosis results are determined for the corresponding host in sequence, including: The number of data processing threads is determined based on resource allocation. If the total number of data processing threads is greater than or equal to the total number of faulty data, then fault analysis is performed on each faulty data simultaneously; if the total number of data processing threads is less than the total number of faulty data, then fault analysis is performed on each faulty data in order of its data processing priority.

14. A fault diagnosis method, characterized in that, Applied to the target host, including: When a faulty data storage requirement is detected, a link connection request signal is sent to the management controller via a fixed physical link; the fixed physical link is a fixed connection link between the target host and the management controller; the management controller manages at least two hosts; When a link operation control signal sent by the management controller is received through the fixed physical link, a fault data indication signal is sent to the management controller through the switchable physical link, so that the management controller can read the target fault data from the target shared location based on the switchable physical link; The link operation control signal indicates that the switchable physical link between the target host and the management controller is successfully connected; the fault data indication signal indicates that the fault data is waiting for the management controller to read.

15. The fault diagnosis method according to claim 14, characterized in that, The fault data indication signal includes a fault data transmission control signal and a fault data signal. The fault data indication signal is sent to the management controller via a switchable physical link, including: A fault data transmission control signal is sent to the management controller via a switchable physical link, so that the management controller receives the fault data transmission control information and requests a target storage area to store the corresponding fault data. The fault data is written to the target shared location, and a fault data signal is sent to the management controller through the switchable physical link; the fault data signal indicates that the target host has written the fault data to the target shared location.

16. The fault diagnosis method according to claim 14, characterized in that, The target host includes reserved memory space, and the fault data includes fault data blocks. When a fault data storage requirement is detected, a link connection request signal is sent to the management controller, including: When the operating system malfunctions, the memory dump service thread is triggered. Each piece of fault data collected is sent to the reserved memory space as the corresponding fault data block. When the reserved memory space receives a faulty data block, it triggers the sending of a link connection request signal to the management controller.

17. The fault diagnosis method according to any one of claims 14 to 16, characterized in that, Once the fault data collection is complete, the state of the memory dump service thread is adjusted to a sleep state. When a data transmission completion signal is received, the memory dump service thread is awakened to trigger the operating system restart process; The data transmission completion signal is a signal sent by the management controller to the target host when it determines that there is no faulty data block of the target host in the shared location.

18. A fault diagnosis system, comprising a management controller and a host cluster; There must be at least two independent physical links and switchable physical links between the management controller and each host in the host cluster; The management controller includes at least an in-band data communication device and a route selector. The management controller communicates with each host through the in-band data communication device and switches the switchable physical links with each host through the route selector. The management controller is used to execute a computer program to implement the steps of the fault diagnosis method as described in any one of claims 1 to 13; each host is used to execute a computer program to implement the steps of the fault diagnosis method as described in any one of claims 14 to 17.

19. The fault diagnosis system according to claim 18, characterized in that, Each host includes a base address register, through which it reads and writes data with the in-band data communication device; The base address register maps the management controller space to the host space, including the message base address register and the memory base address register; Each host sends a fault data transmission control signal to the in-band data communication device through the message base address register. The management controller receives the fault data transmission control information and requests a target storage area to store the corresponding fault data. Each host writes fault data to the memory base address register and sends a fault data signal to the in-band data communication device through the message base address register. The management controller receives the fault data signal, reads the fault data from the memory base address register, and stores it in the target storage area.

20. The fault diagnosis system according to claim 18, characterized in that, Each host includes reserved memory space for storing fault data; Each host reads fault data from the reserved memory space and writes it to the memory base address register.