Server state monitoring method and device and server cluster system
Through the method of periodic scanning and comparison of benchmark files, server status monitoring logs are generated, which solves the problem of low efficiency and timeliness of server hardware equipment status monitoring, and realizes more efficient equipment status monitoring and timely troubleshooting.
Patent Information
- Application Number
- CN202411864368.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the server hardware equipment status monitoring efficiency and timeliness are low, resulting in equipment failures or performance degradation may be delayed and affected system stability and performance.
Provide a server status monitoring method, by obtaining the benchmark file of the server to be tested, regularly scan the current status information of the hardware device, generate the current status file, compare the differences between the benchmark file and the current status file, obtain the status change information, and generate the status monitoring log.
It improves the efficiency and timeliness of server hardware equipment status monitoring, ensures that equipment failures or performance degradation can be detected and dealt with in a timely manner, and improves the stability and performance of the system.
Smart Images

Figure CN119806960A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a server status monitoring method, device and server cluster system. Background Art
[0002] With the continuous development of information technology, servers have been widely used in various application scenarios. The performance and reliability of servers have become key indicators of various application scenarios. Among them, the stability of server hardware often directly affects the performance of the server. Therefore, how to monitor the status of server hardware equipment has become a key research content.
[0003] In the related art, manual detection is usually used to detect the status indicators of various hardware devices deployed on the server. However, the manual detection process is relatively cumbersome, which reduces the efficiency and timeliness of status detection. Summary of the invention
[0004] The present application provides a server status monitoring method, device and server cluster system to solve the defects of related technologies such as reduced efficiency and timeliness of server status monitoring.
[0005] The first aspect of the present application provides a server status monitoring method, comprising:
[0006] Get the benchmark file of the server to be tested;
[0007] Periodically scanning the hardware devices in the server to be tested to obtain current status information of each of the hardware devices;
[0008] Generate a current status file of the server to be tested according to the current status information of each of the hardware devices;
[0009] Comparing the difference between the benchmark file and the current state file of the server to be tested to obtain the state change information of the server to be tested;
[0010] Generate a status monitoring log of the server to be tested according to the status change information of the server to be tested.
[0011] In an optional embodiment, the method further includes:
[0012] The current status file of the server to be tested is used as a new reference file to update the reference file according to the actual status of the server to be tested, and return to the step of regularly scanning the hardware devices in the server to be tested to obtain the current status information of each hardware device.
[0013] In an optional embodiment, the method further includes:
[0014] Obtaining a hardware device list of the server to be tested; the hardware device list includes all identified hardware device information of the server to be tested;
[0015] Traversing the hardware device list to check the hardware device information in the hardware device list one by one, and obtaining the hot-swap characteristic check result of each hardware device in the server to be tested;
[0016] Screening target hardware devices in the server to be tested according to the hot-swap characteristic inspection results of each hardware device in the server to be tested;
[0017] For any of the target hardware devices, determining a target interface matching the target hardware device according to the device type and device model of the target hardware device;
[0018] Based on a target interface matching the target hardware device, collecting current target state information of the target hardware device;
[0019] Alternatively, collecting current target state information of the target hardware device from a state register of the target hardware device;
[0020] Integrate the current target state information of the target hardware device with the current state file of the server to be tested according to the data format of the current state file of the server to be tested, so as to improve the current state file of the server to be tested;
[0021] The target hardware device includes a hardware device that does not support hot plugging.
[0022] In an optional implementation, the current status information of each of the hardware devices includes: device type, device model, device location and device performance parameters.
[0023] In an optional implementation, generating a status monitoring log of the server to be tested according to the status change information of the server to be tested includes:
[0024] Classifying the hardware changes of the server to be tested according to the state change information of the server to be tested, and obtaining a classification result of the hardware changes of the server to be tested;
[0025] Generate a status monitoring log of the server to be tested according to the classification result of the hardware changes of the server to be tested;
[0026] The hardware change categories of the server to be tested are divided into at least three types: device abnormality, device loss and device performance degradation.
[0027] In an optional embodiment, the method further includes:
[0028] Determining a hardware maintenance strategy for the server to be tested based on the status monitoring log of the server to be tested;
[0029] The hardware maintenance strategy of the server to be tested at least includes an alarm strategy and a repair strategy.
[0030] A second aspect of the present application provides a server status monitoring device, comprising:
[0031] An acquisition module is used to obtain the benchmark file of the server to be tested;
[0032] A scanning module, used for periodically scanning the hardware devices in the server to be tested to obtain the current status information of each of the hardware devices;
[0033] A generating module, used to generate a current status file of the server to be tested according to the current status information of each of the hardware devices;
[0034] A comparison module, used for comparing the difference between the benchmark file and the current state file of the server to be tested, and obtaining the state change information of the server to be tested;
[0035] The monitoring module is used to generate a status monitoring log of the server to be tested according to the status change information of the server to be tested.
[0036] A third aspect of the present application provides a server cluster system, comprising: a reference server and a plurality of servers to be tested;
[0037] The reference server performs status monitoring on each of the servers to be tested based on the method described in the first aspect and various possible designs of the first aspect;
[0038] A fourth aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0039] The memory stores computer-executable instructions;
[0040] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0041] A fifth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0042] The sixth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.
[0043] The technical solution of this application has the following advantages:
[0044] The present application provides a server status monitoring method, device and server cluster system, the method comprising: obtaining a benchmark file of the server to be tested; periodically scanning the hardware devices in the server to be tested to obtain the current status information of each hardware device; generating the current status file of the server to be tested based on the current status information of each hardware device; comparing the difference between the benchmark file and the current status file of the server to be tested to obtain the status change information of the server to be tested; generating the status monitoring log of the server to be tested based on the status change information of the server to be tested. The method provided by the above scheme improves the efficiency and timeliness of server status monitoring by automatically scanning the hardware device status information of the server to be tested regularly and determining the status monitoring result of the server to be tested by comparing the benchmark file. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0046] Figure 1 This is a schematic diagram of the structure of the server status monitoring system based on the embodiment of the present application;
[0047] Figure 2 A flow chart of a server status monitoring method provided in an embodiment of the present application;
[0048] Figure 3 A schematic diagram of the overall process of the server status monitoring method provided in an embodiment of the present application;
[0049] Figure 4 A schematic diagram of the structure of a server status monitoring device provided in an embodiment of the present application;
[0050] Figure 5 A schematic diagram of the structure of a server cluster system provided in an embodiment of the present application;
[0051] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0052] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0055] In the modern information society, servers play a vital role in all walks of life, providing multiple functions such as data storage, processing and transmission. With the advancement of technology, the performance and reliability of servers have become key indicators for various application scenarios. In different stages such as R&D, testing and product shipment, it is particularly important to ensure the stability of server hardware, especially PCIe devices. PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion bus standard widely used in today's computer systems. It is widely used in the connection of devices such as graphics cards, network interface cards (NICs), storage controllers and solid-state drives (SSDs).
[0056] During the R&D phase of a server, engineers usually need to repeatedly perform hardware configuration and software debugging to ensure the stability and performance of the system under various workloads. However, due to various reasons, such as hardware failure, poor connection, or firmware problems, PCIe devices in the server may be lost, slowed down, or have lanes dropped. These problems not only affect the overall performance of the system, but may also cause serious business interruptions after the server is put into use. Therefore, strict monitoring of the server is required during the R&D phase to promptly detect and resolve potential problems.
[0057] The testing phase is another key link in the product life cycle. During this phase, the server will undergo various stress tests, compatibility tests, and functional tests to verify its performance in actual applications. At this time, it is particularly important to ensure the stability of the PCIe device, especially in high-load and long-running tests, where the status changes of the PCIe device may affect the accuracy of the test results. Traditional testing methods rely on manual inspection and analysis of system logs, which is not only time-consuming and labor-intensive, but may also result in some subtle device changes not being discovered in time.
[0058] During the product shipment phase, the server has usually passed various rigorous tests and is ready to be delivered to customers. However, even so, the final inspection before shipment is still crucial. The server may be subjected to physical shock or environmental changes during transportation and delivery, all of which may affect the PCIe device. The final inspection before shipment ensures that the product received by the customer is fully qualified. However, the same problem is that if the status changes of the PCIe device are not monitored and recorded in real time, they may not be discovered until the product is delivered to the customer, reducing customer satisfaction with the product.
[0059] Currently, the system log of the server operating system does not automatically record the status changes of all PCIe devices. Engineers can only find out if the device is missing or the performance does not meet expectations by actively checking. This passive monitoring method has obvious shortcomings, especially in scenarios where real-time understanding of the device status is required. Timely understanding and handling of PCIe device failures can not only improve server reliability, but also significantly reduce maintenance and downtime, thereby improving overall operational efficiency.
[0060] In short, how to achieve real-time monitoring of PCIe devices on servers in various stages such as R&D, testing, and shipment, and promptly discover and record changes in device status to ensure that the device is not lost or the speed and lane are not reduced has become an important issue that needs to be urgently resolved in the current technical field.
[0061] In response to the above problems, an embodiment of the present application provides a server status monitoring method, device and server cluster system, the method comprising: obtaining a benchmark file of the server to be tested; periodically scanning the hardware devices in the server to be tested to obtain the current status information of each hardware device; generating a current status file of the server to be tested based on the current status information of each hardware device; comparing the difference between the benchmark file and the current status file of the server to be tested to obtain the status change information of the server to be tested; generating a status monitoring log of the server to be tested based on the status change information of the server to be tested. The method provided by the above scheme improves the efficiency and timeliness of server status monitoring by automatically scanning the hardware device status information of the server to be tested regularly and determining the status monitoring result of the server to be tested by comparing the benchmark file.
[0062] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0063] First, the structure of the server status monitoring system on which this application is based is described:
[0064] The server status monitoring method, device and server cluster system provided in the embodiments of the present application are suitable for monitoring the status of servers in the stages of server development, testing, shipment and application. Figure 1 As shown, it is a structural diagram of the server status monitoring system based on the embodiment of the present application, which mainly includes a data acquisition device, a server status monitoring device and a server to be tested. Among them, the server to be tested is equipped with multiple hardware devices, and the data acquisition device is used to regularly scan the hardware devices on the server to be tested, and send the status information obtained by the scan to the server status monitoring device, so as to generate a status monitoring log of the server to be tested based on the server status monitoring device.
[0065] The embodiment of the present application provides a server status monitoring method for monitoring the status of a server during the stages of server development, testing, shipment and application. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer and other electronic devices that can be used to monitor the status of a server to be tested.
[0066] like Figure 2 FIG. 1 is a flow chart of a server status monitoring method provided in an embodiment of the present application, the method comprising:
[0067] Step 201: Obtain a benchmark file of the server to be tested.
[0068] The benchmark file includes detailed information about the hardware devices, such as the device type, device model, device location, and device performance parameters of each hardware device in the server to be tested, for use as a reference standard.
[0069] Step 202: periodically scan the hardware devices in the server to be tested to obtain the current status information of each hardware device.
[0070] Specifically, according to the system requirements of the server to be tested and the importance of equipment monitoring, the status monitoring period of the server to be tested (such as every hour or every day) can be determined, and the corresponding scanning frequency can be set to achieve regular scanning of the hardware devices in the server to be tested based on the set scanning frequency, and real-time scanning can also be implemented to achieve continuous monitoring of the status information of the server to be tested.
[0071] Step 203: Generate a current status file of the server to be tested according to the current status information of each hardware device.
[0072] The current status information of each hardware device includes: device type, device model, device location and device performance parameters. The device type is used to mark the type of hardware device, such as solid-state hard disk and network card, the device model is used to mark the model and version information of the hardware device, the device location is used to mark the physical location of the hardware device in the server to be tested, such as slot number, port number, etc., and the device performance parameters include the bandwidth, rate and bit error rate of the hardware device.
[0073] Specifically, the current status file of the server to be tested may be generated according to the file format of the reference file, and the current status file may be stored in a designated location for subsequent comparison and analysis of the difference between the two files.
[0074] Step 204 : Compare the difference between the benchmark file and the current status file of the server to be tested to obtain status change information of the server to be tested.
[0075] Specifically, based on a preset comparison algorithm or tool, the difference between the baseline file and the current status file of the server to be tested is compared, and the comparison result will show any changes in the status of the device, including addition, loss, or changes in device parameters, etc. Specifically, it can be determined whether the device type, device model, device location and device performance parameters of each hardware device in the server to be tested have changed, so as to obtain the status change information of the server to be tested. The status change information of the server to be tested includes the changes of each hardware device on the server to be tested.
[0076] Step 205: Generate a status monitoring log of the server to be tested according to the status change information of the server to be tested.
[0077] Specifically, the scanning time of the current status information of the hardware device can be used as a timestamp, and the status monitoring log of the server to be tested can be generated according to the status change information of the server to be tested. The status detection log is used to record the hardware status changes of the server to be tested during the status monitoring process.
[0078] Based on the above embodiment, as an implementable manner, in one embodiment, the method further includes:
[0079] Step 301, using the current status file of the server under test as a new reference file to update the reference file according to the actual status of the server under test, and returning to the step of periodically scanning the hardware devices in the server under test to obtain the current status information of each hardware device.
[0080] It should be noted that the benchmark file used for the initial status change information comparison is the project product specification of the server to be tested. After that, the latest current status file is used as the new benchmark file to continuously update the benchmark file of the server to be tested, ensuring that the benchmark file used for the difference comparison matches the actual status of the server to be tested, and avoiding repeated reporting of hardware device change information, such as avoiding repeated error reports after a hardware device is lost, thereby improving the accuracy and efficiency of status monitoring. When the hardware device status of the server to be tested changes, the current status file will record the new hardware device status and replace the old benchmark file, and save the current status file to the benchmark file storage location as a new benchmark key to ensure that the benchmark file for the next test is the latest.
[0081] Based on the above embodiment, as an implementable manner, in one embodiment, the method further includes:
[0082] Step 401, obtaining a hardware device list of the server to be tested; the hardware device list includes information of all identified hardware devices in the server to be tested;
[0083] Step 402, traverse the hardware device list to check the hardware device information in the hardware device list one by one, and obtain the hot plug feature check result of each hardware device in the server to be tested;
[0084] Step 403, screening target hardware devices in the server to be tested according to the hot-swap characteristic inspection results of each hardware device in the server to be tested;
[0085] Step 404, for any target hardware device, determine a target interface matching the target hardware device according to the device type and device model of the target hardware device;
[0086] Step 405, based on the target interface matching the target hardware device, collecting the current target state information of the target hardware device; or, collecting the current target state information of the target hardware device from the state register of the target hardware device;
[0087] Step 406 , according to the data format of the current state file of the server to be tested, the current target state information of the target hardware device is integrated with the current state file of the server to be tested to improve the current state file of the server to be tested.
[0088] The target hardware devices include hardware devices that do not support hot plugging. After screening, a list of devices in the server that do not support hot plugging is determined to add a special inspection function for these devices that do not support hot plugging.
[0089] It should be noted that the hardware devices in the embodiments of the present application mainly refer to PCIe hardware devices. The embodiments of the present application scan the status information of each hardware device in the server to be tested based on the universal interface of the server system to be tested (such as the system management BIOS / UEFI interface). However, for hardware devices that do not support hot plugging, during the operation of the system, the function of obtaining device status information through the system universal interface is limited, that is, the status information of the target hardware device cannot be collected through the system universal interface, and even if the status information is collected, the reliability of the collected status information cannot be guaranteed.
[0090] Specifically, you can first obtain the hardware device list of the server to be tested, which contains all the identified hardware device information in the server. Specifically, you can communicate with the server hardware management interface, read and parse the data returned by it, and thus get a complete list of hardware devices. Then traverse the hardware device list, check the characteristics and attribute information of each hardware device one by one, and identify and check those that do not support hot-swap features. Finally, according to the hot-swap feature check results of each hardware device in the server to be tested, filter the target hardware device in the server to be tested.
[0091] Specifically, after the hardware status information of the server to be tested is scanned through the system universal interface, the target hardware device is screened in the server to be tested, and then the current target status information of the target hardware device is collected based on the target interface (lower-level system interface) that matches the target hardware device to ensure the accuracy and reliability of the current target status information obtained. Finally, according to the data format of the current status file of the server to be tested, the current target status information of the target hardware device is integrated with the current status file of the server to be tested, that is, according to the data format of the current status file, the current target status information missing in the current status file is filled into the corresponding record position in the current status file or a new record entry is created to improve the current status file of the server to be tested obtained by scanning before, so as to ensure the reliability of the current status file finally compared with the benchmark file.
[0092] The target interface matching the target hardware device at least includes a direct access PCIe bus interface, and the current target status information of the target hardware device can also be collected from the status register (hardware monitoring chip) of the target hardware device. The target interface of the target hardware device can be determined according to the device type and model of the target hardware device. For example, for a PCIe device, a direct access PCIe bus interface is preferably selected as its target interface.
[0093] It should be further explained that by directly accessing the PCIe bus interface to collect the current target status information of the target hardware device, it is possible to bypass the interference of cache or abstraction layers that may exist in some advanced operating systems and directly read the actual status of the device, thereby improving the reliability of the current target status information collection results of the target hardware device.
[0094] Specifically, Figure 3 As shown, it is a schematic diagram of the overall process of the server status monitoring method provided in the embodiment of the present application, such as Figure 3 The method shown is as follows Figure 2 An exemplary implementation of the method shown, the implementation principles of the two are the same and will not be repeated here. The embodiment of the present application realizes efficient monitoring of various hardware devices of the server, especially PCIe devices, through real-time scanning and benchmark file comparison, and improves the accuracy and timeliness of device status detection. First of all, the real-time scanning and benchmark file comparison mechanism greatly improves the accuracy and timeliness of device status detection, ensuring that any abnormal conditions can be discovered at the first time. The method of dynamically updating the benchmark file avoids the problem of repeated error reports after the device is lost, and improves the accuracy and efficiency of the monitoring system. By adding a secondary inspection mechanism for the target hardware device, especially the review of devices that do not support hot plugging, the reliability of device status monitoring is further improved.
[0095] Based on the above embodiment, as an implementable manner, in one embodiment, a state monitoring log of the server to be tested is generated according to the state change information of the server to be tested, including:
[0096] Step 2051, classifying the hardware changes of the server to be tested according to the state change information of the server to be tested, and obtaining the classification result of the hardware changes of the server to be tested;
[0097] Step 2052: Generate a status monitoring log of the server to be tested according to the classification result of the hardware change of the server to be tested.
[0098] The hardware change categories of the server to be tested are divided into at least three types: device abnormality, device loss, and device performance degradation.
[0099] Specifically, the hardware changes of the server under test can be classified according to the status performance of the server under test represented by the status change information of the server under test. Among them, device abnormality mainly refers to abnormal fluctuations in performance parameters, such as abnormal bandwidth fluctuations, large rate reductions, and severe increases in bit error rates. Device loss is mainly manifested as physical connection loss, such as loose slots and disconnected cables. Device loss may also be manifested as device hardware failures. Device performance degradation is manifested as small fluctuations in performance indicators.
[0100] Specifically, for each hardware change event recorded in the status monitoring log, a detailed description can be made based on the hardware change classification results. For example, if it is a bandwidth fluctuation problem in the device abnormality type, record the specific device name (such as the network card model), the bandwidth value before the change, the bandwidth value after the change, the change time, and the possible cause analysis. If it is a device loss type, record the lost device name, physical location (such as slot number or port number), loss time, and possible cause of loss. For the device performance degradation type, also record the device name, specific indicators of performance degradation (such as the CPU processing speed drop, hard disk read and write speed changes, etc.), change time, and cause analysis in detail.
[0101] Furthermore, in one embodiment, the hardware maintenance strategy of the server to be tested may be determined according to the status monitoring log of the server to be tested.
[0102] The hardware maintenance strategy of the server to be tested at least includes an alarm strategy and a repair strategy.
[0103] Specifically, for the alarm strategy, when the status monitoring log indicates that the server under test has a device abnormality or a device is lost, a corresponding alarm message can be generated according to the device abnormality event or device loss event recorded in the status monitoring log. The device abnormality alarm message at least includes the name of the abnormal device, the abnormal factor of the abnormal device (such as the bandwidth factor), and the time when the abnormality occurred (such as the bandwidth change time). The device loss alarm message at least includes the name of the lost device, the location information of the lost device, and the time of loss.
[0104] Specifically, with regard to the repair strategy, when the status monitoring log indicates that the server under test has a storage performance degradation defect, the hard disk repair strategy of the server under test can be determined. Specifically, the disk can be defragmented and optimized, and unnecessary files can be deleted to free up storage space. If the hard disk is seriously aged, you can consider replacing it with a new one or using a solid-state drive (SSD) to improve storage performance. For scenarios with high requirements for storage performance, such as database servers, you can consider using RAID arrays or distributed storage systems to improve read and write speeds and data reliability. If the status monitoring log indicates that the memory access speed of the server under test has decreased, you can check the memory usage and close unnecessary programs to free up memory.
[0105] The embodiment of the present application provides a server status monitoring method, which obtains the benchmark file of the server to be tested; periodically scans the hardware devices in the server to be tested to obtain the current status information of each hardware device; generates the current status file of the server to be tested according to the current status information of each hardware device; compares the difference between the benchmark file and the current status file of the server to be tested to obtain the status change information of the server to be tested; and generates the status monitoring log of the server to be tested according to the status change information of the server to be tested. The method provided by the above scheme improves the efficiency and timeliness of the server status monitoring by automatically scanning the hardware device status information of the server to be tested regularly and determining the status monitoring result of the server to be tested by comparing the benchmark file. In addition, by updating the benchmark file, the accuracy of the server status monitoring result is improved to avoid repeated errors. In addition, by performing a secondary check on the target hardware device to ensure that the abnormal situation of the lost or faulty device can be accurately captured and processed, the reliability of the server status monitoring result is further improved.
[0106] An embodiment of the present application provides a server status monitoring device, which is used to execute the server status monitoring method provided in the above embodiment.
[0107] like Figure 4, which is a schematic diagram of the structure of a server status monitoring device provided in an embodiment of the present application. The server status monitoring device 40 comprises: an acquisition module 401 , a scanning module 402 , a generation module 403 , a comparison module 404 and a monitoring module 405 .
[0108] Among them, the acquisition module is used to obtain the benchmark file of the server to be tested; the scanning module is used to regularly scan the hardware devices in the server to be tested to obtain the current status information of each hardware device; the generation module is used to generate the current status file of the server to be tested according to the current status information of each hardware device; the comparison module is used to compare the differences between the benchmark file and the current status file of the server to be tested to obtain the status change information of the server to be tested; the monitoring module is used to generate the status monitoring log of the server to be tested according to the status change information of the server to be tested.
[0109] Regarding the server status monitoring device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0110] The server status monitoring device provided in the embodiment of the present application is used to execute the server status monitoring method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0111] An embodiment of the present application provides a server cluster system for executing the server status monitoring method provided in the above embodiment.
[0112] like Figure 5 FIG. 1 is a schematic diagram of the structure of a server cluster system provided in an embodiment of the present application. The system includes: a reference server and multiple servers to be tested.
[0113] The reference server performs status monitoring on each server to be tested based on the server status monitoring method provided in the above embodiment. The hardware configuration of each server in the server cluster is the same.
[0114] Specifically, you can select a representative server in the cluster system as the benchmark server. This server should contain typical hardware configurations of all servers in the cluster. Ensure that the hardware configuration of the benchmark server is stable and trouble-free as a standard for subsequent comparisons. Perform a comprehensive scan of the benchmark server to obtain detailed status information of all its hardware devices, including device type, model, location, performance parameters, etc. Generate a benchmark file with the scan results, ensure that the benchmark file is accurate and complete, and record the hardware configuration information of the benchmark server.
[0115] Specifically, the generated benchmark file can be distributed to other servers in the cluster. Ensure that each server can access the benchmark file for device status comparison. Deploy monitoring tools on other servers in the cluster and configure them to perform hardware device scans regularly or in real time to obtain the hardware status data of the current server.
[0116] In actual applications, the benchmark server can be rescanned regularly to ensure the timeliness and accuracy of the benchmark file. The benchmark file can be updated according to the actual situation and redistributed to other servers in the cluster to keep the benchmark file synchronized.
[0117] The server cluster system provided in the embodiment of the present application selects a server as a reference server and uses its device status as a standard to quickly compare the scanning results of other servers to detect device failures. In addition, the reference server uses the server status monitoring method provided in the above embodiment to monitor the status of each server to be tested, thereby simplifying the device monitoring process of the cluster system and improving detection efficiency and accuracy. This automated and accurate monitoring method greatly reduces manual intervention, improves operation and maintenance efficiency, significantly reduces system downtime caused by hardware failures, and improves overall operating efficiency.
[0118] An embodiment of the present application provides an electronic device for executing the server status monitoring method provided in the above embodiment.
[0119] like Figure 6 FIG. 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 60 includes: at least one processor 61 and a memory 62 .
[0120] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the server status monitoring method provided in the above embodiment.
[0121] The electronic device provided in the embodiment of the present application is used to execute the server status monitoring method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0122] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the server status monitoring method provided in any of the above embodiments is implemented.
[0123] The storage medium containing computer executable instructions provided in the embodiment of the present application can be used to store computer executable instructions of the server status monitoring method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.
[0124] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the server status monitoring method provided in the aforementioned embodiment.
[0125] The embodiment of the present application provides a computer program product that can be used to execute computer instructions of the server status monitoring method provided in the aforementioned embodiment. The implementation method and principle are the same and will not be repeated here.
[0126] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0129] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0130] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0131] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A server status monitoring method, characterized in that: include: Get the benchmark file of the server to be tested; Periodically scanning the hardware devices in the server to be tested to obtain current status information of each of the hardware devices; Generate a current status file of the server to be tested according to the current status information of each of the hardware devices; Comparing the difference between the benchmark file and the current state file of the server to be tested to obtain the state change information of the server to be tested; Generate a status monitoring log of the server to be tested according to the status change information of the server to be tested.
2. The method according to claim 1, characterized in that The method further comprises: The current status file of the server to be tested is used as a new reference file to update the reference file according to the actual status of the server to be tested, and return to the step of regularly scanning the hardware devices in the server to be tested to obtain the current status information of each hardware device.
3. The method according to claim 1, characterized in that The method further comprises: Obtaining a hardware device list of the server to be tested; the hardware device list includes all identified hardware device information of the server to be tested; Traversing the hardware device list to check the hardware device information in the hardware device list one by one, and obtaining the hot-swap characteristic check result of each hardware device in the server to be tested; Screening target hardware devices in the server to be tested according to the hot-swap characteristic inspection results of each hardware device in the server to be tested; For any of the target hardware devices, determining a target interface matching the target hardware device according to the device type and device model of the target hardware device; Based on a target interface matching the target hardware device, collecting current target state information of the target hardware device; Alternatively, collecting current target state information of the target hardware device from a state register of the target hardware device; Integrate the current target state information of the target hardware device with the current state file of the server to be tested according to the data format of the current state file of the server to be tested, so as to improve the current state file of the server to be tested; The target hardware device includes a hardware device that does not support hot plugging.
4. The method according to claim 1, characterized in that: The current status information of each of the hardware devices includes: device type, device model, device location and device performance parameters.
5. The method according to claim 1, characterized in that The step of generating a status monitoring log of the server to be tested according to the status change information of the server to be tested includes: Classifying the hardware changes of the server to be tested according to the state change information of the server to be tested, and obtaining a classification result of the hardware changes of the server to be tested; Generate a status monitoring log of the server to be tested according to the classification result of the hardware changes of the server to be tested; The hardware change categories of the server to be tested are divided into at least three types: device abnormality, device loss and device performance degradation.
6. The method according to claim 1, characterized in that The method further comprises: Determining a hardware maintenance strategy for the server to be tested based on the status monitoring log of the server to be tested; The hardware maintenance strategy of the server to be tested at least includes an alarm strategy and a repair strategy.
7. A server status monitoring device, characterized in that: include: An acquisition module is used to obtain the benchmark file of the server to be tested; A scanning module, used for periodically scanning the hardware devices in the server to be tested to obtain the current status information of each of the hardware devices; A generating module, used to generate a current status file of the server to be tested according to the current status information of each of the hardware devices; A comparison module, used for comparing the difference between the benchmark file and the current state file of the server to be tested, and obtaining the state change information of the server to be tested; The monitoring module is used to generate a status monitoring log of the server to be tested according to the status change information of the server to be tested.
8. A server cluster system, characterized in that: include: A benchmark server and multiple servers under test; The reference server performs status monitoring on each of the servers to be tested based on the method according to any one of claims 1 to 6.
9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Server monitoring method, substrate controller, medium and system
CN120492279A