SNMP and IPMI long connection heartbeat detection system

The SNMP and IPMI long connection heartbeat system addresses resource and port occupancy issues in high-thread concurrency by managing connections and providing real-time device monitoring with alerting.

CN120321153APending Publication Date: 2025-07-15CHINA SHIPBUILDING RES INST (SEVENTH RES INST OF CHINA STATE SHIPBUILDING CORP)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510458912.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In the case of multi-threaded concurrency, the frequent creation and destruction of SNMP and IPMI connections in the prior art leads to large resource consumption, port occupation and connection waiting states, which cannot guarantee the continuity and timeliness of data acquisition, and cannot monitor the operating status of the equipment in real time.

Method used

The SNMP and IPMI long connection heartbeat detection system is adopted, including the initial connection module, the device information update module, the heartbeat detection and alarm module of the SNMP and IPMI long connections. Through heartbeat detection, the long connection is automatically updated and maintained to ensure the effectiveness of the connection.

Benefits of technology

It effectively solves the problems of resource consumption and port occupation, realizes continuous data acquisition and real-time monitoring, provides alarm notifications, and ensures timely updates and management of device information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120321153A_ABST
    Figure CN120321153A_ABST
Patent Text Reader

Abstract

The invention discloses an SNMP (Simple Network Management Protocol) and IPMI (Intelligent Platform Management Interface) long connection heartbeat detection system, and belongs to the field of computer communication. According to the method, the unique identifier of each device and the SNMP and IPMI connection corresponding to the unique identifier are stored, and whether the long connection survives and is valid is detected, and the mode is called long link heartbeat detection. When data is acquired through SNMP and IPMI connection every time, the data can be directly acquired in the long connection storage, the problem of resource consumption caused by frequent establishment and release of long connection can be solved, meanwhile, the problem of connection occupation caused by limited server equipment connection number is solved, the method is more friendly to acquisition of equipment dynamic data, and the efficiency of data acquisition is improved. And high-value and high-persistence dynamic data is presented for clients.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer communication technologies, and particularly relates to an SNMP and IPMI long connection heartbeat detection system. Background Art

[0002] As Figure 1 shown, it is a schematic diagram of frequent creation of connections in multi-threaded concurrency. In a computer system that needs to interact with, monitor, and manage a server, it is essential to obtain dynamic data of devices through the SNMP protocol and the IPMI protocol. When obtaining dynamic data of devices through the SNMP protocol and the IPMI protocol, each data acquisition needs to go through the processes of creating a connection, sending a message, returning a result, and releasing connection resources. This way of obtaining data through short connections consumes resources. When the number of requests to access server devices is small, the consumption of device resources, connection occupation, and the impact on data acquisition can be almost ignored. However, in the case of multi-threaded high concurrency, the problems of frequent creation and release of connection resources and the connection occupation problem caused by the limited number of connections of server devices have become urgent problems for developers to solve. Summary of the Invention

[0003] In the prior art, the existing SNMP technical solution mainly creates an SNMP connection according to information such as device IP and SNMP version, obtains data according to the OID node corresponding to the function, and releases the SNMP connection resources after obtaining the data.

[0004] The existing IPMI technical solution mainly creates an IPMI connector, an IPMI message processor, and CS identity authentication according to the IP of the BMC and the BMC account and password for IPMI communication with the device, and according to the port occupation situation, reads data or changes the configuration of the device by passing in corresponding parameters according to the task to be executed, and releases the IPMI connection resources after obtaining the data.

[0005] The port for the SNMP connection to obtain device information is unique (fixed as 161). Although the port for the IPMI connection is not unique, the connection channels of the device are few. When accessing devices concurrently in multi-threads to obtain data, frequent creation of SNMP and IPMI connections will cause abnormal situations such as poor continuity of data acquisition and occupation of connection ports. The general solution is to use SNMP and IPMI long connections. There is no clear solution for whether the SNMP and IPMI long connections are effective and whether they can automatically update the SNMP and IPMI long connections when the device access information changes.

[0006] Disadvantages of the prior art solutions:

[0007] The existing technical solutions mainly obtain data in real time through the frequent creation and destruction of SNMP and IPMI connections, that is, the short connection method. This solution has problems such as a large amount of resource consumption caused by the frequent creation and destruction of connections, the occupation of ports, and the connection being in a waiting state. Therefore, this solution cannot ensure that the desired data can be obtained every time a connection is made, and cannot present effective, continuous, and timely device information to customers, resulting in the inability to monitor the device operation status in real time.

[0008] The present invention provides a long connection heartbeat detection system for SNMP and IPMI to solve the above problems in the prior art.

[0009] To solve the above technical problems, the present invention adopts the following technical solutions:

[0010] The present invention provides a long connection heartbeat detection system for SNMP and IPMI, including: an SNMP and IPMI connection module for initializing devices, a module for creating or releasing SNMP and IPMI long connections when device information is updated, an SNMP long connection heartbeat detection and alarm module, and an IPMI long connection heartbeat detection and alarm module;

[0011] The SNMP and IPMI connection initialization module is used to create SNMP and IPMI connections when the program starts, ensuring that all functions for obtaining device information are not affected when the program just starts;

[0012] The module for creating and releasing SNMP and IPMI long connections when updating device information is used to update the new long connection information to the connection pool when adding, modifying, or deleting devices during the program operation;

[0013] The SNMP long connection heartbeat detection and alarm module is used for the heartbeat detection of SNMP long connections. When it is found that the SNMP long connection fails, the SNMP long connection of the device is recreated. If the newly created long connection is valid, it is updated to the connection pool. If the newly created long connection is still invalid, an alarm message is sent to the device administrator;

[0014] The IPMI long connection heartbeat detection and alarm module is used for the heartbeat detection of IPMI long connections. When it is found that the current IPMI long connection fails, the IPMI long connection of the device is recreated. If the newly created long connection is valid, it is updated to the connection pool. If the newly created long connection is still invalid, an alarm message is sent to the device administrator.

[0015] On this basis, the present invention can also be improved as follows: The SNMP and IPMI connection initialization module is specifically used for:

[0016] Create connections: Obtain all devices in the database, and create IPMI connection information including IPMI-Connector, IPMI-Handle, and IPMI-CS based on the BMC IP, BMC username, and BMC password of the devices; create an SNMP connection based on the SNMP IP of the devices. Among them, when the SNMP version is v2, read / write community strings need to be configured; when the SNMP version is v3, a username, encryption method, and authentication method need to be configured.

[0017] Store connections: Use the ID of the device as the unique identifier, which corresponds uniquely to the SNMP connection, and store it in multiple ConcurrentHashMaps to improve the security of multi-threading.

[0018] On this basis, the present invention can also be improved as follows: The module for creating and releasing the SNMP and IPMI long connections when updating device information is specifically used for:

[0019] When adding a new device, create new SNMP and IPMI long connections for the device and store them in the connection pool; when modifying device information, update the SNMP and IPMI long connection information for the device to the connection pool; when deleting a device, release the SNMP and IPMI long connection resources corresponding to the device.

[0020] On this basis, the present invention can also be improved as follows: The SNMP long connection heartbeat detection and alarm module is specifically used for:

[0021] a) Enable SNMP long connection heartbeat detection, which is supported to be configured on the Web page. Users can configure the heartbeat detection time interval of the SNMP connection according to specific circumstances, and select whether to enable SNMP long connection heartbeat detection.

[0022] b) IP detection of the SNMP connector. When initializing the SNMP connector, store the SNMP-IP in the SNMP connector, and perform a NULL determination on the IP of the SNMP connector. If it is NULL, it indicates that the SNMP-IP of the device is NULL, and directly perform SNMP alarm processing.

[0023] c) PING detection of SNMP-IP. In addition to detecting that SNMP-IP is NULL, also perform PING detection on SNMP-IP to first determine whether the SNMP connection failure is caused by the device disconnecting the connection; if the PING detection of SNMP-IP fails, alarm processing will be performed.

[0024] d) SNMP heartbeat detection: Obtain the corresponding SNMP connector in the SNMP - ConcurrentHashMap and send the system OID information that each device must have. Judge whether the returned data is NULL, and judge the Columns information returned by the OID to determine whether the current SNMP connector is valid. If the SNMP connector fails to obtain data, reconstruct the SNMP - Connector according to the SNMP information of the device and perform X1 heartbeat detections on it, with a time interval of Y1 seconds each time, and the total time is Z1 seconds, where Z1 = X1 * Y1. If the reconstructed SNMP - Connector obtains data within Z1 seconds, release or replace the SNMP - Connector of this device stored in the SNMP - ConcurrentHashMap. On the contrary, if data cannot be obtained within one minute, it indicates that there is a problem with the information of the current device or the device is disconnected, and an alarm process is performed. At the same time, after the user changes the SNMP information of a device, the SNMP heartbeat detection can automatically update the SNMP - Connector of the corresponding device and perform SNMP - Connector alarm processing in a timely manner.

[0025] On this basis, the present invention can also be improved as follows: The IPMI long - connection heartbeat detection and alarm module is specifically used for:

[0026] a) Start the IPMI long - connection heartbeat detection. Configured on the Web page, the user can configure the heartbeat detection time interval of the IPMI connection according to the specific situation, and whether to select to start the IPMI long - connection heartbeat detection task.

[0027] b) Judge whether the IPMI - Connector is NULL to determine whether the IPMI - Connector is successfully initialized during initialization.

[0028] c) When the IPMI - Connector is NULL, perform a PING detection on the IP of the IPMI connector. If the PING detection fails, perform an alarm process for the failed PING detection. If the PING detection is successful, reconstruct the IPMI - Connector, IPMI - Handle, and IPMI - CS for the current device and perform heartbeat detection on them. When the IPMI - Connector is not NULL, directly perform IPMI heartbeat detection.

[0029] d) IPMI heartbeat detection. Send IPMI commands to the device through IPMI-Connector, IPMI-Handle, and IPMI-CS to obtain the power status of the current device. Perform NULL judgment and error detection on the returned result. When the returned result is NULL or an error occurs in obtaining the power status, it indicates that the IPMI-Connector has failed. First, perform a PING detection on the BMC-IP of the current device. If the PING detection fails, it means the device is disconnected, and an alarm will be processed. If the PING detection is successful, then reconstruct the IPMI-Connector, IPMI-Handle, and IPMI-CS identity authentication for the current device, and perform X2 heartbeat detections. The time interval for each detection is Y2 seconds, and the duration is Z2 seconds, where Z2 = X2 * Y2. If data is successfully obtained within Z2 seconds, it indicates that the IPMI long connection information of the current device has changed, or there is a situation where the device is disconnected for a short time. Then, release and replace the IPMI-Connector, IPMI-Handle, and IPMI-CS in the IPMI-ConcurrentHashMap of the current device, so as to achieve the effect of automatic update of the IPMI long connection. If data cannot be obtained within one minute, it means the device has crashed or there are other unknown errors, and an alarm will be processed for the device.

[0030] On this basis, the present invention can also be improved as follows: Performing X1 heartbeat detections includes performing 3 heartbeat detections; the time interval of Y1 seconds is 20 seconds.

[0031] On this basis, the present invention can also be improved as follows: Performing X2 heartbeat detections includes performing 3 heartbeat detections; the time interval of Y2 seconds is 20 seconds.

[0032] The beneficial effects provided by the present invention are:

[0033] Based on the detection of SNMP and IPMI connections, the present invention initializes and creates the SNMP and IPMI long connections and performs heartbeat detections, which can effectively solve the problems of resource consumption, IPMI connection waiting errors, and port occupation and other data acquisition problems caused by frequent creation and destruction of SNMP and IPMI connections by multiple threads, solve the problem of data acquisition persistence, realize the automatic update of SNMP and IPMI long connections, ensure the integrity of data acquisition, monitor the information and connection status of the device in real time, and provide alarm notifications, providing a new solution for device administrators to monitor devices in real time.

[0034] The advantages of the additional aspects of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a schematic diagram of frequent creation of connections in multi-threaded concurrency.

[0036] Figure 2 This is a schematic diagram of the heartbeat detection architecture according to an embodiment of the present invention.

[0037] Figure 3 This is a schematic diagram of SNMP heartbeat detection according to an embodiment of the present invention.

[0038] Figure 4 This is a schematic diagram of IPMI heartbeat detection according to an embodiment of the present invention. Detailed implementation manners

[0039] Next, in combination with the accompanying drawings in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0040] As Figure 2 shown, this is a schematic diagram of the heartbeat detection architecture according to an embodiment of the present invention.

[0041] 1) Initialize the SNMP and IPMI connection modules

[0042] This module is divided into the following steps:

[0043] a) Create a connection: Obtain all devices in the database, and create IPMI connection information such as IPMI-Connector, IPMI-Handle, and IPMI-CS according to the BMC IP, BMC username, and BMC password of the device; according to the SNMP IP of the device, when the SNMP version is v2, it is necessary to configure read / write community strings; when the SNMP version is v3, it is necessary to configure information such as username, encryption method, and authentication method to create an SNMP connection.

[0044] b) Storage connection: The device ID is used as the unique identifier and is uniquely corresponding to the SNMP connection, which is stored in the ConcurrentHashMap. Since multiple threads will obtain the SNMP connector and, due to the SNMP heartbeat detection mechanism, the SNMP connector will definitely be modified, there will be multi-thread safety issues. This is why ConcurrentHashMap is chosen instead of the ordinary HashMap. The IPMI connection cannot be stored in a separate ConcurrentHashMap because the IPMI message sending requires IPMI-Connector, IPMI-Handle, and IPMI-CS. Therefore, the device ID is used as the unique identifier, corresponding to three ConcurrentHashMaps at the same time.

[0045] 2) The module for creating and releasing the long connections of SNMP and IPMI when updating device information

[0046] This module is responsible for updating the new long connection information to the connection pool during the program operation, whether adding, modifying, or deleting devices. When adding a new device, new SNMP and IPMI long connections are created for the device and stored in the connection pool; when modifying the device information, the SNMP and IPMI long connection information for the device is updated to the connection pool; when deleting a device, the SNMP and IPMI long connection resources corresponding to the device are released.

[0047] 3) The SNMP long connection heartbeat detection and alarm module

[0048] As Figure 3 shown, it is the schematic diagram of the SNMP heartbeat detection in the embodiment of the present invention.

[0049] This module mainly includes steps such as enabling the SNMP long connection heartbeat detection, IP detection of the SNMP connector, PING detection of SNMP-IP, and SNMP heartbeat detection.

[0050] a) Enabling the SNMP long connection heartbeat detection is supported to be configured on the Web page. Users can, according to the specific situation, configure the heartbeat detection time interval of the SNMP connection and choose whether to enable the SNMP long connection heartbeat detection.

[0051] b) IP detection of the SNMP connector: When initializing the SNMP connector, the SNMP-IP is stored in the SNMP connector. The NULL determination is performed on the IP of the SNMP connector. If it is NULL, it indicates that the SNMP-IP of the device is NULL, and the SNMP alarm processing is directly performed.

[0052] c) PING detection of SNMP-IP. In addition to the above detection of SNMP-IP being NULL, PING detection of SNMP-IP is also required. This can first determine whether the SNMP connection failure is caused by the device being disconnected. If the PING detection of SNMP-IP fails, alarm processing is performed.

[0053] d) SNMP heartbeat detection. SNMP heartbeat detection is to obtain the corresponding SNMP connector in SNMP-ConcurrentHashMap and send the system OID information that each device must have. Then, a NULL judgment is made on the returned data, and the Columns information returned by this OID is judged to determine whether the current SNMP connector is valid. If no data is obtained for the SNMP connector, an SNMP-Connector is reconstructed according to the SNMP information of the device, and three heartbeat detections are performed on it, with an interval of 20 seconds each time and a total time of 1 minute. If data can be obtained for the reconstructed SNMP-Connector within one minute, the SNMP-Connector of this device stored in SNMP-ConcurrentHashMap is released or replaced. On the contrary, if data cannot be obtained within one minute, it may indicate that there is a problem with the information of the current device or that the device is disconnected. Alarm processing for this situation can effectively remind device managers to check the device in a timely manner. At the same time, after the user changes the SNMP information of a device, SNMP heartbeat detection can also automatically update the SNMP-Connector of the corresponding device and perform SNMP-Connector alarm processing in a timely manner.

[0054] 4) IPMI long connection heartbeat detection and alarm module

[0055] As Figure 4 shown, it is a schematic diagram of IPMI heartbeat detection according to an embodiment of the present invention.

[0056] This module mainly includes steps such as enabling IPMI long connection heartbeat detection, performing a NULL judgment on the IPMI-Connector, performing PING detection on the IPMI-IP, and performing IPMI heartbeat detection.

[0057] a) Enabling IPMI long connection heartbeat detection is supported to be configured on the Web page. Users can configure the heartbeat detection time interval of the IPMI connection according to specific circumstances, as well as whether to select to enable the IPMI long connection heartbeat detection task.

[0058] b) The IPMI-Connector is checked for NULL. Since the IPMI connector may be NULL when the IPMI long connection creation fails, checking the IPMI-Connector for NULL can indicate whether the IPMI-Connector was successfully initialized.

[0059] c) When the IPMI-Connector is NULL, the IP of the IPMI connector is PING tested. If the PING test fails, an alarm is raised for the failed PING test; if the PING test is successful, it indicates that the current device can be connected, and the IPMI-Connector, IPMI-Handle, and IPMI-CS for the current device need to be re-constructed and their heartbeats detected. When the IPMI-Connector is not NULL, the IPMI heartbeat detection is performed directly.

[0060] d) IPMI heartbeat detection. IPMI heartbeat detection is to send IPMI commands to the device through the IPMI-Connector, IPMI-Handle, and IPMI-CS to obtain the power status of the current device, and to check for NULL in the returned result and error reporting. When the returned result is NULL or an error occurs in obtaining the power status, it indicates that the IPMI-Connector has failed. First, the BMC-IP of the current device is PING tested. If the PING test fails, it indicates that the device is disconnected, and an alarm is raised; if the PING test is successful, the IPMI-Connector, IPMI-Handle, and IPMI-CS authentication for the current device are re-constructed, and three heartbeat detections are performed, with a time interval of 20 seconds each and a duration of 1 minute. If data is successfully obtained within one minute, it indicates that the IPMI long connection information of the current device has changed, or there is a situation where the device is disconnected for a short time, and the IPMI-Connector, IPMI-Handle, and IPMI-CS in the IPMI-ConcurrentHashMap for the current device need to be released and replaced to achieve the effect of automatic update of the IPMI long connection; if data cannot be obtained within one minute, it indicates that the device has crashed or there are other unknown errors, and an alarm is raised for the device to effectively remind the device management personnel to check the device in a timely manner. The solution provided by the present invention has the following effects:

[0061] Based on the detection of SNMP and IPMI connections, the present invention initializes and creates SNMP and IPMI long connections and performs heartbeat detection, which can effectively solve the problems of resource consumption, IPMI connection waiting errors, and port occupation that occur when multiple threads frequently create and destroy SNMP and IPMI connections, solve the problem of data acquisition persistence, realize automatic update of SNMP and IPMI long connections, ensure the integrity of data acquisition, monitor the information and connection status of devices in real time, and provide alarm notifications, providing a new solution for device administrators to monitor devices in real time.

[0062] Optionally, in some possible implementation manners, it may include all or part of the above various implementation manners.

[0063] It should be understood that in the description of this specification, the reference to terms such as "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the partial features of different embodiments or examples.

[0064] Certainly, without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and deformations according to the present invention, but these changes and deformations should all fall within the protection scope of the claims of the present invention.

Claims

1. An SNMP and IPMI long connection heartbeat detection system, characterized in that, Including: The SNMP and IPMI connection modules for initializing the device, the module for creating or releasing the SNMP and IPMI long connections when the device information is updated, the SNMP long connection heartbeat detection and alarm module, and the IPMI long connection heartbeat detection and alarm module; The SNMP and IPMI connection initialization module is used to create SNMP and IPMI connections when the program starts, ensuring that all functions for obtaining device information are not affected when the program just starts; The module for creating and releasing the SNMP and IPMI long connections when updating device information is used to update the new long connection information to the connection pool whether a device is added, modified or deleted during the program operation; The SNMP long connection heartbeat detection and alarm module is used for the heartbeat detection of the SNMP long connection. When it is found that the SNMP long connection fails, the SNMP long connection of the device is re-created. If the newly created long connection is valid, it is updated to the connection pool. If the newly created long connection is still invalid, an alarm message is sent to the device administrator; The IPMI long connection heartbeat detection and alarm module is used for the heartbeat detection of the IPMI long connection. When it is found that the current IPMI long connection fails, the IPMI long connection of the device is re-created. If the newly created long connection is valid, it is updated to the connection pool. If the newly created long connection is still invalid, an alarm message is sent to the device administrator.

2. The SNMP and IPMI long connection heartbeat detection system according to claim 1, wherein The SNMP and IPMI connection initialization module specifically is used for: Creating connections: Obtain all devices in the database, and create IPMI connection information including IPMI-Connector, IPMI-Handle, and IPMI-CS according to the BMC IP, BMC username, and BMC password of the device; create an SNMP connection according to the SNMP IP of the device. Among them, when the SNMP version is v2, the read-write community string needs to be configured; when the SNMP version is v3, the username, encryption method, and authentication method need to be configured; Storing connections: Use the ID of the device as the unique identifier, which uniquely corresponds to the SNMP connection, and store it in multiple ConcurrentHashMaps to improve the security of multi-threading.

3. The SNMP and IPMI long connection heartbeat detection system according to claim 2, characterized in that, The module for creating and releasing the SNMP and IPMI long connections when updating device information specifically is used for: When adding a new device, create new SNMP and IPMI long connections for the device and store them in the connection pool; when modifying device information, update the SNMP and IPMI long connection information of the device to the connection pool; when deleting a device, release the SNMP and IPMI long connection resources corresponding to the device.

4. The SNMP and IPMI long connection heartbeat detection system according to claim 3, wherein The SNMP long connection heartbeat detection and alarm module specifically is used for: a) Enable the SNMP long connection heartbeat detection, which is supported to be configured on the Web page. The user can configure the heartbeat detection time interval of the SNMP connection according to the specific situation, and select whether to enable the SNMP long connection heartbeat detection; b) IP detection of the SNMP connector. When initializing the SNMP connector, store the SNMP-IP in the SNMP connector. Perform a NULL determination on the SNMP-IP of the SNMP connector. If it is NULL, it indicates that the SNMP-IP of the device is NULL, and directly perform the SNMP alarm processing; c) PING detection of the SNMP-IP. In addition to detecting that the SNMP-IP is NULL, also perform PING detection on the SNMP-IP to first determine whether the SNMP connection failure is caused by the device disconnecting the connection; if the PING detection of the SNMP-IP fails, perform the alarm processing; d) SNMP heartbeat detection. Obtain the corresponding SNMP connector in the SNMP-ConcurrentHashMap and send the system OID information that each device must have. Perform a NULL judgment on the returned data, and judge the Columns information returned by the OID to determine whether the current SNMP connector is valid; if the SNMP connector fails to obtain data, reconstruct the SNMP-Connector according to the SNMP information of the device and perform X1 heartbeat detections on it, with a time interval of Y1 seconds each time, and the total time is Z1 seconds, where Z1 = X1 * Y1; if the SNMP-Connector reconstructed within Z1 seconds obtains data, release or replace the SNMP-Connector of the device stored in the SNMP-ConcurrentHashMap; on the contrary, if data cannot be obtained within one minute, it indicates that there is a problem with the information of the current device or there is a situation where the device is disconnected, and perform the alarm processing; at the same time, after the user changes the SNMP information of a device, the SNMP heartbeat detection can automatically update the SNMP-Connector of the corresponding device and perform the SNMP-Connector alarm processing in a timely manner.

5. The SNMP and IPMI long connection heartbeat detection system according to claim 3, wherein The IPMI long connection heartbeat detection and alarm module is specifically used for: a) Enable the IPMI long connection heartbeat detection. Configured on the Web page, the user configures the heartbeat detection time interval of the IPMI connection according to the specific situation, and whether to select to enable the IPMI long connection heartbeat detection task; b) Perform a NULL judgment on the IPMI-Connector to judge whether the IPMI-Connector is successfully initialized during initialization; c) When the IPMI-Connector is NULL, perform a PING detection on the IP of the IPMI connector. If the PING detection fails, perform the alarm processing for the failed PING detection; If the PING detection is successful, reconstruct the IPMI-Connector, IPMI-Handle, and IPMI-CS for the current device and perform heartbeat detection on them; When the IPMI-Connector is not NULL, directly perform the IPMI heartbeat detection; d) IPMI heartbeat detection. Send IPMI commands to the device through IPMI-Connector, IPMI-Handle, and IPMI-CS to obtain the power status of the current device. Perform NULL judgment and error detection on the returned result. When the returned result is NULL or an error occurs in obtaining the power status, it indicates that the IPMI-Connector has failed. First, perform a PING test on the BMC-IP of the current device. If the PING test fails, it indicates that the device has been disconnected, and then an alarm is processed. If the PING test is successful, re-construct the IPMI-Connector, IPMI-Handle, and IPMI-CS identity authentication for the current device, and perform X2 heartbeat detections. The time interval for each detection is Y2 seconds, and the duration is Z2 seconds, where Z2 = X2 * Y2. If data is successfully obtained within Z2 seconds, it indicates that the IPMI long connection information of the current device has changed, or there is a situation where the device is disconnected for a short time. Then, release and replace the IPMI-Connector, IPMI-Handle, and IPMI-CS in the IPMI-ConcurrentHashMap of the current device, so as to achieve the effect of automatic update of the IPMI long connection. If data cannot be obtained within one minute, it indicates that the device has crashed or there are other unknown errors, and then an alarm is processed for the device.

6. The SNMP and IPMI long connection heartbeat detection system according to claim 4, characterized in that, Performing X1 heartbeat detections includes performing 3 heartbeat detections; the time interval Y1 seconds is 20 seconds.

7. The SNMP and IPMI long connection heartbeat detection system according to claim 5, characterized in that, Performing X2 heartbeat detections includes performing 3 heartbeat detections; the time interval Y2 seconds is 20 seconds.