Health monitoring method and device of electronic equipment and electronic equipment
By periodically triggering system management interrupts in electronic devices to scan and compare device status information, the problem of passively responding to hardware failures in existing technologies is solved. This enables real-time monitoring of electronic devices and prediction of system failure risks, improving system reliability and maintainability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINHUASAN INFORMATION TECH CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, hardware failures in electronic devices can only be addressed passively after they occur, which has a significant impact on device operation. In particular, in FTTR architecture network servers, it can lead to serious problems such as network outages. How to predict system failure risks is an urgent problem to be solved.
After the operating system of an electronic device starts up, a system management interrupt is periodically triggered based on a timer to scan the current status information of each device to be monitored, compare it with the normal status information, determine whether there is an anomaly, and output an alarm, thereby realizing real-time monitoring of the device and prediction of system failure risks.
It enables real-time monitoring of electronic equipment, allowing for timely detection of abnormal status before complete equipment failure, providing early warnings, improving system reliability and maintainability, and reducing serious problems such as network outages caused by hardware failures.
Smart Images

Figure CN122019301A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic device monitoring technology, and in particular to a health monitoring method, device and electronic device for electronic devices. Background Technology
[0002] Currently, electronic devices such as network servers and computers primarily use interrupt methods to monitor the hardware and software operation status of electronic devices. For example, when a serious hardware event occurs in an electronic device, such as a memory error, a Peripheral Component Interconnect (PCI) bus error, or a chipset failure, the system firmware will trigger a System Management Interrupt (SMI) to record the event in the system event log and initiate a recovery process.
[0003] Because hardware interrupt mechanisms typically only respond passively after a fault occurs, severe hardware failures often necessitate downtime for maintenance, significantly impacting the operation of electronic devices. For example, in a network server using an FTTR (Fiber To The Room) architecture, if a hardware failure triggers a Service Misoperation (SMI), the already established hardware malfunction could lead to serious problems such as network outages.
[0004] Therefore, how to predict the risk of system failure before the equipment completely fails is an urgent problem to be solved. Summary of the Invention
[0005] The purpose of this application is to provide a health monitoring method, device, and electronic device for electronic devices, so as to predict system failure risks in advance. The specific technical solution is as follows:
[0006] In a first aspect, embodiments of this application provide a health monitoring method for an electronic device, including:
[0007] After the operating system of the electronic device starts up, a timer is used to determine whether the current time has reached the trigger time of the system management interrupt. If it has, the system management interrupt routine is invoked. The timer is created by the BIOS based on a preset trigger period during the operating system startup process.
[0008] The system management interrupt routine performs interrupt handling, including: scanning each monitored device to obtain its current status information; comparing the current status information with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result; outputting an alarm and ending the system management interrupt routine if an anomaly has occurred; and ending the system management interrupt routine if no anomaly has occurred. The normal status information of each monitored device is acquired and stored during the operating system startup process of the electronic device.
[0009] In one possible implementation, the device to be monitored includes one or more of the following: PCIe device, memory device, USB device, and SATA device;
[0010] When the device to be monitored includes a PCIe device, a memory device, a USB device, or a SATA device.
[0011] The step of scanning each device to be monitored and obtaining the current status information of each device to be monitored includes: obtaining the current in-situ status information of PCIe devices, memory devices, USB devices, or SATA devices.
[0012] The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result, includes: if the current presence status information of the PCIe device, memory device, USB device, or SATA device indicates that the PCIe device, memory device, USB device, or SATA device is not present, then it is determined that the PCIe device, memory device, USB device, or SATA device has an anomaly.
[0013] In one possible implementation, the device to be monitored further includes: a CPU;
[0014] The step of scanning each device to be monitored and obtaining the current status information of each device to be monitored further includes: obtaining the number of CPU cores and the operating frequency of the currently running CPU.
[0015] The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result, further includes:
[0016] If the number of CPU cores currently running is less than the number of CPU cores installed in the electronic device, or if the difference between the current operating frequency and the normal operating frequency is greater than a preset operating frequency difference threshold, then the CPU is determined to be abnormal.
[0017] In one possible implementation, when the device to be monitored includes a PCIe device, the step of scanning each device to be monitored and obtaining the current status information of each device to be monitored further includes: obtaining the current bandwidth information and rate information of the PCIe device.
[0018] The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result, further includes:
[0019] If the difference between the current bandwidth and the normal bandwidth is greater than the preset bandwidth difference threshold, or the difference between the current rate and the normal rate is greater than the preset rate difference threshold, then the PCIe device is determined to be abnormal.
[0020] In one possible implementation, when the device to be monitored includes a memory device, the step of scanning each device to be monitored to obtain the current status information of each device to be monitored further includes: obtaining the current power management information of the memory device by reading the power management register.
[0021] The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an abnormality has occurred based on the comparison result, further includes: if the power management information of the memory device indicates that the memory device has an overcurrent or overvoltage condition, then the memory device is determined to be abnormal.
[0022] In one possible implementation, the CPU of the electronic device, upon receiving a fault signal from any device under monitoring, triggers a system management interrupt and executes the system management interrupt program.
[0023] In one possible implementation, during the operating system startup process, monitoring configuration information regarding whether periodic monitoring is performed is further read from the baseboard management controller; the monitoring configuration information is set by the user through the control interface.
[0024] If the monitoring configuration information indicates that periodic monitoring is to be performed, the following steps are executed: after the operating system of the electronic device starts, it is determined whether the current time has reached the trigger time of the system management interrupt based on the preset trigger period, and if so, the system management interrupt program is invoked.
[0025] Secondly, embodiments of this application provide a health monitoring device for an electronic device, comprising:
[0026] The interrupt cycle triggering module is used to determine, based on a timer, whether the current time has reached the trigger time of the system management interrupt after the operating system of the electronic device starts up. If it has, the system management interrupt program is invoked. The timer is created by the BIOS based on a preset trigger cycle during the operating system startup process.
[0027] The interrupt handling module is used for interrupt handling during the execution of the system management interrupt program. This includes: scanning each monitored device to obtain its current status information; comparing the current status information with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result; outputting an alarm and terminating the system management interrupt program if an anomaly occurs; and terminating the system management interrupt program if no anomaly occurs. The normal status information of each monitored device is acquired and stored during the operating system startup process of the electronic device.
[0028] Thirdly, embodiments of this application provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0029] Memory, used to store computer programs;
[0030] When a processor executes a program stored in memory, it implements any of the above method steps.
[0031] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described method steps.
[0032] Beneficial effects of the embodiments in this application:
[0033] This application provides a health monitoring method, apparatus, and electronic device for electronic devices. The health monitoring method periodically triggers system management interrupts based on a timer. During the interruption, the current state of each monitored device is compared with its normal state to determine if an anomaly has occurred. If an anomaly is detected, an alarm is output. This achieves real-time monitoring of electronic devices, enabling timely detection of anomalies before complete device failure and providing early warnings. Therefore, it allows for early prediction of system failure risks, thereby improving system reliability and maintainability. Especially when the electronic device is a network server in a network using an FTTR architecture, it can promptly detect anomalies in the monitored device's state, allowing for timely maintenance and reducing serious problems such as network outages caused by hardware failures.
[0034] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0036] Figure 1 An example flowchart of a health monitoring method for electronic devices provided in this application embodiment;
[0037] Figure 2 Another example flowchart of the health monitoring method for electronic devices provided in the embodiments of this application;
[0038] Figure 3 A schematic diagram of an example of a health monitoring device for an electronic device provided in this application embodiment;
[0039] Figure 4 A schematic diagram of another example of a health monitoring device for an electronic device provided in the embodiments of this application;
[0040] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0042] In order to predict the risk of system failure in electronic devices in advance, this application provides a health monitoring method, device and electronic device for electronic devices, which will be described in detail below.
[0043] First, the technical terms used in the embodiments of this application will be introduced.
[0044] The Basic Input Output System (BIOS) is a set of programs embedded in a read-only memory (ROM) chip on the computer's motherboard. Its main function is to provide the lowest-level and most direct hardware settings and control for the computer.
[0045] The Baseboard Management Controller (BMC) is a set of programs embedded on a server processor independent of the motherboard CPU. It uses sensors to monitor the status of a computer, network server, or other hardware driver and communicates with the system administrator via a separate connection.
[0046] System Management Interrupt (SMI) is a high-priority, non-maskable interrupt used to handle system management-related tasks, such as hardware monitoring and power management.
[0047] The high-speed serial computer expansion bus (PCIe, Peripheral Component Interconnect Express) is used to connect external devices.
[0048] The Intelligent Platform Management Interface (IPMI) provides hardware management functions that are independent of the operating system.
[0049] General Purpose Input / Output (GPIO) pins can be used to transmit signals and status information.
[0050] Universal Serial Bus (USB) is a standardized interface for connecting external devices.
[0051] Serial Advanced Technology Attachment (SATA) is a computer bus interface used to connect storage devices.
[0052] Next, the health monitoring method for electronic devices provided in the embodiments of this application will be described in detail.
[0053] See Figure 1 , Figure 1 An example flowchart of a health monitoring method for an electronic device provided in an embodiment of this application; the process includes:
[0054] Step S101: After the operating system of the electronic device starts, based on the timer, it is determined whether the current time has reached the trigger time of the system management interrupt. If it has, the system management interrupt routine is called.
[0055] The timer is created by the BIOS based on a preset trigger cycle during the operating system startup process;
[0056] Step S102, the system management interrupt routine performs interrupt handling, including: scanning each device to be monitored to obtain the current status information of each device; comparing the current status information of each device with the normal status information of each device, and determining whether an abnormality has occurred based on the comparison result; if an abnormality occurs, outputting an alarm and ending the system management interrupt routine; if no abnormality occurs, ending the system management interrupt routine.
[0057] The normal status information of each monitored device is acquired and stored during the startup process of the electronic device's operating system.
[0058] Depend on Figure 1 As shown in the illustrated embodiment, this health monitoring method can periodically trigger system management interrupts based on a timer. During the interruption, the current state of each monitored device is compared with its normal state to determine if any abnormality has occurred. If an abnormality is detected, an alarm is output. This achieves real-time monitoring of electronic devices, enabling timely detection of abnormal states in monitored devices before complete failure and providing early warnings. Therefore, it allows for early prediction of system failure risks, thereby improving system reliability and maintainability. Especially when electronic devices are network servers in networks using an FTTR architecture, timely detection of abnormal states in monitored devices allows for prompt maintenance, reducing serious problems such as network outages caused by hardware failures.
[0059] As computer systems become increasingly complex, the reliability and stability of hardware devices become ever more critical. In modern servers, industrial control systems, and embedded systems, various hardware devices (such as PCIe devices, USB devices, SATA devices, memory, and CPUs) may experience various failures during operation, such as device malfunctions, loose connections, and performance degradation. These problems can all potentially affect the normal operation of services running within the system.
[0060] In some embodiments, health monitoring can be performed on PCIe devices, USB devices, SATA devices, memory, and CPU to improve the reliability and stability of hardware devices.
[0061] For details, see Figure 2 , Figure 2 Another example flowchart of the health monitoring method for electronic devices provided in the embodiments of this application; the process includes:
[0062] Step S201: The system starts up and the BIOS initializes the SMI timer.
[0063] In this embodiment, the device health status detection can be triggered periodically by setting an SMI timer and setting an appropriate time interval (such as 100ms or 1 minute).
[0064] In practical applications, if the electronic device has frequently encountered errors in the past, the SMI timer can be set to a shorter duration, such as 100ms or 1 second. If the electronic device has not frequently encountered errors in the past, the SMI timer can be set to a longer duration, such as 2 minutes, 10 minutes, or longer. This application does not impose any limitations on these settings.
[0065] Step S202: Collect device information.
[0066] In this step, key status information such as the presence information of each monitored device can be read during the BISO system self-test (POST, Power-On Self-Test).
[0067] For example, when the devices to be monitored include PCIe devices, memory devices, USB devices, SATA devices, and CPUs, key status information such as the presence information of each device can be read.
[0068] Step S203: Store in the device information database.
[0069] In this step, the key status information such as the on-site information of each device can be read and stored in the device information database as the standard information (i.e., normal status information) of each device.
[0070] Step S204: Obtain monitoring configuration from BMC.
[0071] The electronic device in this embodiment is equipped with a BMC. The BMC's monitoring configuration includes monitoring configuration information on whether periodic monitoring is enabled.
[0072] In this embodiment, the monitoring configuration information can be set by the user through the control interface.
[0073] Step S205: Determine whether periodic monitoring is enabled. If yes, proceed to step S206; otherwise, proceed to step S207.
[0074] Step S206: Start the SMI timer. Proceed to step S208.
[0075] Step S207: Turn off the SMI timer.
[0076] Step S208: Enter the operating system.
[0077] If the SMI timer is enabled, proceed to step S209; if the SMI timer is disabled, proceed to step S217.
[0078] Step S209: Wait for the SMI timer to interrupt.
[0079] When the timed period arrives, execute step S210.
[0080] Step S210: Invoke the SMI callback handler.
[0081] This step involves calling the system management interrupt routine.
[0082] Step S211: Scan PCIe / USB / SATA devices and CPU.
[0083] Step S212: Read the device status register.
[0084] In this step, the current in-situ status information of the PCIe device, memory device, USB device, or SATA device is obtained by reading the device status register.
[0085] Specifically, the presence information of PCIe devices, USB devices, and SATA devices can be determined by reading the identification information of the PCIe devices, USB devices, and SATA devices; if the identification information of a PCIe device, USB device, or SATA device is read, then the PCIe device, USB device, or SATA device is present; if the identification information of a PCIe device, USB device, or SATA device cannot be read, then the PCIe device, USB device, or SATA device is not present.
[0086] The presence of a memory device can be determined by reading its configuration information; if the configuration information is found, the memory device is present; if the configuration information cannot be found, the memory device is not present.
[0087] In addition, for PCIe devices, the current bandwidth and speed information can be obtained. For memory devices, the current power management information can be obtained by reading the power management register. For the CPU, the number of CPU cores and operating frequency can be obtained.
[0088] Step S213: Compare with standard information.
[0089] In this step, the current status information of each device can be compared with the status information stored in the device information database.
[0090] Step S214: Determine if an anomaly is found. If yes, proceed to step S215; otherwise, return to step S209.
[0091] In this step, if the current presence information of the PCIe device, memory device, USB device, or SATA device indicates that the PCIe device, memory device, USB device, or SATA device is not present, then the PCIe device, memory device, USB device, or SATA device is determined to be abnormal, i.e., a card drop has occurred. If the difference between the current bandwidth and the normal bandwidth of the PCIe device is greater than a preset bandwidth difference threshold, or the difference between the current speed and the normal speed is greater than a preset speed difference threshold, then the PCIe device is determined to be abnormal, i.e., a bandwidth reduction or speed reduction has occurred. Additionally, if a bandwidth reduction or speed reduction abnormality occurs, it may be due to a loose PCIe device connection.
[0092] If the power management information of the memory device indicates that the memory device is experiencing overcurrent or overvoltage, then the memory device is considered to be malfunctioning.
[0093] If the number of CPU cores currently running is less than the number of CPU cores installed in the electronic device, or if the difference between the current operating frequency and the normal operating frequency is greater than a preset operating frequency difference threshold, the CPU is considered to be malfunctioning. If the number of CPU cores currently running is less than the number of CPU cores installed in the electronic device, a core shutdown (downcore) exception exists. If the difference between the current operating frequency and the normal operating frequency is greater than a preset operating frequency difference threshold, CPU performance is degraded.
[0094] Step S215: Report to BMC via IPMI.
[0095] In this step, the operating system reports information about abnormalities in the monitored device to the BMC via the IPMI interface.
[0096] In step S216, the BMC logs the information and issues an alarm.
[0097] In this step, the BMC outputs alarm information.
[0098] If an alarm is triggered, it means that a potential abnormality has been detected in the equipment, and preventative maintenance can be performed to reduce system downtime and repair costs.
[0099] Step S217: Hardware failure triggers SMI.
[0100] In this step, the CPU of the electronic device can trigger a system management interrupt and execute the system management interrupt program after receiving a fault signal from any monitored device via GPIO.
[0101] In this embodiment, by periodically triggering SMI while retaining the hardware triggering mechanism of SMI, SMI is cleverly utilized. This not only enables timely detection of potential device anomalies and early prediction of system failure risks, but also allows for alarms to be triggered even after a hardware failure.
[0102] Therefore, this embodiment enables real-time monitoring. Through periodic SMI timed interrupts, real-time monitoring of system devices is achieved, allowing for timely detection of anomalies such as card drops, speed reduction, and bandwidth degradation, significantly improving the efficiency of fault prediction.
[0103] Moreover, this embodiment achieves comprehensive device coverage. It expands the device monitoring scope, supporting not only PCIe devices but also USB devices, SATA devices, memory devices, CPUs, and other device types, providing a more comprehensive view of system health status monitoring.
[0104] Furthermore, this embodiment enables fine-grained detection. Specifically, by reading low-level information such as the status register and capability register of the monitored device, subtle performance degradation and intermittent faults that are difficult to detect using traditional methods can be detected, thus improving detection accuracy.
[0105] Furthermore, the health monitoring method in this embodiment is flexible and controllable. A one-button on / off control function can be provided in the control interface, allowing users to enable or disable the monitoring function according to actual needs. After the system restarts, it can automatically obtain the monitoring status from the BMC, greatly improving management flexibility.
[0106] In addition, this embodiment can also be used for preventative maintenance. Specifically, through continuous monitoring, potential problems can be detected before the equipment completely fails, enabling preventative maintenance and reducing system downtime and repair costs.
[0107] Next, the health monitoring device for electronic devices provided in the embodiments of this application will be described in detail.
[0108] Corresponding to the health monitoring method described above, this application also provides a health monitoring device for an electronic device. See also... Figure 3 , Figure 3 A schematic diagram illustrating an example of a health monitoring device for an electronic device provided in this application embodiment; the health monitoring device includes:
[0109] The interrupt cycle trigger module 301 is used to determine, based on a timer, whether the current time has reached the trigger time of the system management interrupt after the operating system of the electronic device starts up. If it has, the system management interrupt program is invoked. The timer is created by the BIOS based on a preset trigger cycle during the operating system startup process.
[0110] Interrupt handling module 302 is used for interrupt handling during the execution of the system management interrupt program, including: scanning each device to be monitored to obtain the current status information of each device; comparing the current status information of each device with the normal status information of each device, and determining whether an abnormality has occurred based on the comparison result; outputting an alarm and ending the system management interrupt program if an abnormality occurs; ending the system management interrupt program if no abnormality occurs; the normal status information of each device to be monitored is obtained and stored during the startup process of the electronic device's operating system.
[0111] The health monitoring device for electronic devices provided in this application enables real-time monitoring of electronic devices. It can detect abnormal states of the monitored device before a complete failure and issue early warnings. Therefore, it can predict system failure risks in advance, thereby improving system reliability and maintainability. Especially when the electronic device is a network server in a network using an FTTR architecture, timely detection of abnormal states of the monitored device and timely maintenance can reduce serious problems such as network outages caused by hardware failures.
[0112] See Figure 4 , Figure 4 A schematic diagram of another example of a health monitoring device for an electronic device provided in this application embodiment; the health monitoring device includes:
[0113] The SMI timer initialization module 410 is used to create a periodically triggered SMI Timer by the BIOS before entering the operating system during system startup. An appropriate time interval (such as 100ms) is set to periodically trigger device health status detection.
[0114] The device information storage module 420 is used to store device presence information during the BIOS POST process, including PCIe devices, USB devices, SATA devices, memory devices, CPU, etc., into the device information database. This information is used to compare with the runtime device status.
[0115] The SMI callback processing module 430 is used to monitor system faults after entering the operating system via an SMI timer callback program. This module includes detection sub-modules for different types of devices, such as... Figure 4 As shown, it includes a PCIe device detection submodule 431, a USB device detection submodule 432, a SATA device detection submodule 433, a memory detection submodule 434, and a CPU detection submodule 435. Each detection submodule is used to obtain the current status information of the corresponding device to be monitored.
[0116] The status analysis and comparison module 440 is used to compare and analyze the detected device presence information with the pre-stored standard information to identify whether the device has any abnormal situations such as card loss or memory loss.
[0117] At the same time, for individual devices in place, such as printers with PCIe interfaces, their device space information, such as PCIe device negotiation bandwidth or negotiation rate, is also read. This information is then compared with the current bandwidth or rate of the PCIe device to determine if there are any abnormal data indicators.
[0118] For memory devices, the system also reads their serial presence detect (SPD) information and PMIC register information to determine if there are any abnormal health conditions such as overvoltage or overcurrent. For CPU devices, the system can read the CPU core count and frequency to determine if there are any issues such as downcore or performance abnormalities.
[0119] The communication module 450 is used to communicate with the BMC via protocols such as IPMI, report device abnormal information, and trigger alarm mechanisms.
[0120] The control interface module 460 is used to obtain the monitoring function's on / off status from the BMC after the system restarts, and provides a one-button on / off control function, allowing users to dynamically enable or disable the monitoring function.
[0121] Next, the electronic device provided in the embodiments of this application will be described in detail.
[0122] This application also provides an electronic device, such as... Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0123] Memory 503 is used to store computer programs;
[0124] When processor 501 executes the program stored in memory 503, it performs the following steps:
[0125] After the operating system of the electronic device starts up, a timer is used to determine whether the current time has reached the trigger time of the system management interrupt. If it has, the system management interrupt routine is invoked. The timer is created by the BIOS based on a preset trigger period during the operating system startup process.
[0126] The system management interrupt routine performs interrupt handling, including: scanning each monitored device to obtain its current status information; comparing the current status information with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result; outputting an alarm and ending the system management interrupt routine if an anomaly has occurred; and ending the system management interrupt routine if no anomaly has occurred. The normal status information of each monitored device is acquired and stored during the operating system startup process of the electronic device.
[0127] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0128] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0129] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0130] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0131] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described health monitoring methods.
[0132] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the health monitoring methods described above.
[0133] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0134] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0135] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0136] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A method for health monitoring of electronic devices, characterized in that, include: After the operating system of the electronic device starts, it is determined based on a timer whether the current time has reached the trigger time of the system management interrupt. If it has, the system management interrupt routine is called. The timer is created by the BIOS based on a preset trigger cycle during the operating system startup process; The system management interrupt routine performs interrupt handling, including: scanning each monitored device to obtain its current status information; comparing the current status information with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result; outputting an alarm and ending the system management interrupt routine if an anomaly has occurred; and ending the system management interrupt routine if no anomaly has occurred. The normal status information of each monitored device is acquired and stored during the operating system startup process of the electronic device.
2. The health monitoring method according to claim 1, characterized in that, The device to be monitored includes one or more of the following: PCIe devices, memory devices, USB devices, and SATA devices; When the device to be monitored includes a PCIe device, a memory device, a USB device, or a SATA device. The step of scanning each device to be monitored and obtaining the current status information of each device to be monitored includes: obtaining the current in-situ status information of PCIe devices, memory devices, USB devices, or SATA devices. The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result, includes: if the current presence status information of the PCIe device, memory device, USB device, or SATA device indicates that the PCIe device, memory device, USB device, or SATA device is not present, then it is determined that the PCIe device, memory device, USB device, or SATA device has an anomaly.
3. The health monitoring method according to claim 2, characterized in that, The device to be monitored also includes: a CPU; The step of scanning each device to be monitored and obtaining the current status information of each device to be monitored further includes: obtaining the number of CPU cores and the operating frequency of the currently running CPU. The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result, further includes: If the number of CPU cores currently running is less than the number of CPU cores installed in the electronic device, or if the difference between the current operating frequency and the normal operating frequency is greater than a preset operating frequency difference threshold, then the CPU is determined to be abnormal.
4. The health monitoring method according to claim 2, characterized in that, When the monitored devices include PCIe devices, the step of scanning each monitored device to obtain the current status information of each monitored device further includes: obtaining the current bandwidth information and rate information of the PCIe devices. The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result, further includes: If the difference between the current bandwidth and the normal bandwidth is greater than the preset bandwidth difference threshold, or the difference between the current rate and the normal rate is greater than the preset rate difference threshold, then the PCIe device is determined to be abnormal.
5. The health monitoring method according to claim 2, characterized in that, When the device to be monitored includes a memory device, the step of scanning each device to be monitored to obtain the current status information of each device to be monitored further includes: obtaining the current power management information of the memory device by reading the power management register; The step of comparing the current status information of each monitored device with the normal status information of each monitored device, and determining whether an abnormality has occurred based on the comparison result, further includes: if the power management information of the memory device indicates that the memory device has an overcurrent or overvoltage condition, then the memory device is determined to be abnormal.
6. The health monitoring method according to claim 2, characterized in that, Upon receiving a fault signal from any device under monitoring, the CPU of the electronic device triggers a system management interrupt and executes the system management interrupt program.
7. The health monitoring method according to claim 1, characterized in that, During the operating system startup process, the monitoring configuration information of the baseboard management controller, which determines whether periodic monitoring is performed, is further read; the monitoring configuration information is set by the user through the control interface. If the monitoring configuration information indicates that periodic monitoring is to be performed, the following steps are executed: after the operating system of the electronic device starts, it is determined whether the current time has reached the trigger time of the system management interrupt based on the preset trigger period, and if so, the system management interrupt program is invoked.
8. A health monitoring device for an electronic device, characterized in that, include: The interrupt cycle trigger module is used to determine, based on a timer, whether the current time has reached the trigger time of the system management interrupt after the operating system of the electronic device starts. If it has, the system management interrupt program is called. The timer is created by the BIOS based on a preset trigger cycle during the operating system startup process; The interrupt handling module is used for interrupt handling during the execution of the system management interrupt program. This includes: scanning each monitored device to obtain its current status information; comparing the current status information with the normal status information of each monitored device, and determining whether an anomaly has occurred based on the comparison result; outputting an alarm and terminating the system management interrupt program if an anomaly occurs; and terminating the system management interrupt program if no anomaly occurs. The normal status information of each monitored device is acquired and stored during the operating system startup process of the electronic device.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.