Device monitoring method, apparatus, device, storage medium and computer program product
Through the predefined device information table and unified resource locator path, the problem of obtaining GPU device information from different manufacturers on the AI server is solved, the device information and operating status are obtained in a timely manner, and the stable operation of the server is guaranteed.
Patent Information
- Application Number
- CN202410686534.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-05-30
AI Technical Summary
It is difficult for the existing technology to be uniformly compatible and manage GPU devices produced by different manufacturers, resulting in the inability to obtain device information and operating status on the AI server in a timely manner, affecting the stable operation of the server.
Through the predefined device information table, the target device is periodically monitored according to the device data acquisition channel and type, and the device data is acquired and stored in the preset database. The client accesses the required data through the unified resource locator path.
It realizes compatible management of different types of devices, ensuring that the information and operating status on the AI server can be obtained in a timely manner to facilitate the stable operation of the server.
Smart Images

Figure CN118277208B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a device monitoring method, apparatus, equipment, storage medium and computer program product. Background Art
[0002] In recent years, artificial intelligence has developed faster and faster. Various countries are developing their own artificial intelligence equipment and training their own large artificial intelligence models, such as ChatGPT, Alibaba's Tongyi Qianwen, Baidu's Wenxin Yiyan, etc. The training of these large artificial intelligence models requires a large number of GPUs to support it, and the demand for building AI servers with multiple GPUs is also increasing.
[0003] In the related technology, due to the different ways of obtaining information, it is impossible to simultaneously obtain information of devices produced by all manufacturers through a unified method for different types of devices, resulting in a large number of GPU devices being unable to be uniformly and compatibly managed, and the device information and operating status on the AI server cannot be obtained in a timely manner, and the stable operation of the server cannot be guaranteed. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a device monitoring method, apparatus, device, storage medium and computer program product. The specific technical solutions are as follows:
[0005] In a first aspect of the present invention, a device monitoring method is provided, the method comprising:
[0006] Monitoring the target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type;
[0007] The target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the preset database through the target uniform resource locator path.
[0008] Optionally, the predefined device information table includes at least one of a bus information table, a bus interface information table, a system management interface information table, and a management component transmission protocol information table;
[0009] The table information types corresponding to the predefined device information table include attribute name, attribute type, command corresponding to the device data acquisition channel, parameter corresponding to the device data acquisition channel, monitoring type, data length, data mask, database key value, and at least one of flag information.
[0010] Optionally, the attribute name, the attribute type, the attribute value, and the attribute state constitute an attribute table;
[0011] The attribute type includes any one of integer, floating point, and string types.
[0012] Optionally, before the step of monitoring the target device according to a preset period according to the predefined device information table, the method includes:
[0013] Initialize the predefined device information table.
[0014] Optionally, the initializing the predefined device information table includes:
[0015] Initializing the bus information table;
[0016] Initializing the bus interface information table;
[0017] Initializing the system management interface information table;
[0018] Initialize the management component transmission protocol information table.
[0019] Optionally, the initializing the bus information table includes:
[0020] Read all first target data in the bus information table respectively;
[0021] Calling a corresponding function according to the attribute type in the first target data to register the attribute into the attribute table;
[0022] Register the key value of the first target data in a preset database.
[0023] Optionally, monitoring the target device according to a preset period according to a predefined device information table includes:
[0024] Monitoring the target device according to the bus information table according to a preset period;
[0025] Monitoring the target device according to the bus interface information table according to a preset period;
[0026] Monitoring the target device according to a preset period according to the system management interface information table;
[0027] The target device is monitored according to the management component transmission protocol at a preset period.
[0028] Optionally, monitoring the target device according to the bus information table according to a preset period includes:
[0029] Read the second target data in the bus information table;
[0030] Determine the type of monitoring;
[0031] The target device is monitored according to the monitoring type and the second target data at a preset period.
[0032] Optionally, monitoring the target device according to the monitoring type and the second target data according to a preset period includes:
[0033] If the monitoring type is a non-read type, reading device data from an attribute table according to the attribute type corresponding to the second target data;
[0034] If the monitoring type is a continuous read type, accessing the target device according to any one of a bus, a device address, a register to be read, and a command corresponding to the target device;
[0035] Reading device data of the target device according to the data length in the second target data;
[0036] Determining to monitor the target device according to a preset period according to the attribute type corresponding to the device data;
[0037] If the monitoring type is a first read type, determining to monitor the target device according to a preset period according to the flag bit information in the second target data;
[0038] The device data acquisition channel includes a bus device data acquisition channel, a bus interface device data acquisition channel, a system management interface device data acquisition channel, and a management component transmission protocol device data acquisition channel;
[0039] After the step of determining the monitoring type, the method comprises:
[0040] If the monitoring type is a non-read type, a bus module is established for the bus device data acquisition channel;
[0041] Establishing a bus interface module for the data acquisition channel of the bus interface device;
[0042] Establishing a system management interface module for the system management interface device data acquisition channel;
[0043] Establishing management component transmission protocol modules respectively for the management component transmission protocol device data acquisition channels;
[0044] So that the bus module monitors the target device according to the preset period according to the bus device data acquisition channel, the bus interface module system monitors the target device according to the preset period according to the bus interface device data acquisition channel, the management interface module monitors the target device according to the preset period according to the management interface device data acquisition channel, and the management component transmission protocol module monitors the target device according to the preset period according to the management component transmission protocol device data acquisition channel.
[0045] Optionally, storing the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the preset database through the target uniform resource locator path includes:
[0046] The target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path from the preset database through the target uniform resource locator path.
[0047] Optionally, storing the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path from the preset database through the target uniform resource locator path includes:
[0048] The target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal enters the target uniform resource locator path in the address bar on the preset interface. If the target uniform resource locator path exists, the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path is accessed from the preset database.
[0049] In a second aspect of the present invention, there is also provided a device monitoring apparatus, which is applied to a storage control chip in a device monitoring system, wherein the storage control chip is equipped with an on-chip cache pool, and the apparatus comprises:
[0050] A monitoring module, used to monitor the target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type;
[0051] The access module is used to store the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path.
[0052] In a third aspect of the implementation of the present invention, there is also provided a communication device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor;
[0053] The processor is used to read the program in the memory to implement the device monitoring method as described in any one of the first aspects.
[0054] In a fourth aspect of the implementation of the present invention, a computer-readable storage medium is further provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer implements the device monitoring method as described in any one of the first aspects.
[0055] In a fourth aspect of the implementation of the present invention, a computer program product is also provided, including a computer program / instruction, which, when executed by a processor, implements the device monitoring method as described in any one of the first aspects.
[0056] The device monitoring method provided by the embodiment of the present invention comprises: monitoring the target device according to a preset period according to a predefined device information table, and obtaining the target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on the device data acquisition channel and the device type; storing the target monitoring data in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path. In the embodiment of the present invention, the devices are classified according to the acquisition methods of different devices, and an information table is established respectively, and then data is periodically collected according to the data acquisition methods of different types of devices, and the data is stored in the preset database, and the user obtains the required data through the target uniform resource locator path. Through the embodiment of the present invention, different types of devices can be compatible together, no matter through which channel to obtain information, whether it is only obtained once or needs to be obtained periodically, it can be compatible; and this method can obtain all the information on the AI server, which is convenient for obtaining the device information and operation status of the AI server at any time, and is convenient for related processing according to the operation status of the server, ensuring the stable operation of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0058] Figure 1 A process flow of a device monitoring method provided by an embodiment of the present invention Figure 1 ;
[0059] Figure 2 This is a step flow of a device monitoring method provided by an embodiment of the present invention. Figure 2 ;
[0060] Figure 3 This is a step flow of a device monitoring method provided by an embodiment of the present invention. Figure 2 The step flow chart of step 201 in FIG.
[0061] Figure 4 This is a step flow of a device monitoring method provided by an embodiment of the present invention. Figure 2 The step flow chart of step 203;
[0062] Figure 5 is a device block diagram of a device monitoring device provided by an embodiment of the present invention;
[0063] Figure 6 is a schematic diagram of a communication device provided by an embodiment of the present invention;
[0064] Figure 7 is a schematic diagram of an exemplary device information table provided in an embodiment of the present invention Figure 1 ;
[0065] Figure 8 is a schematic diagram of an exemplary device information table provided in an embodiment of the present invention Figure 2 ;
[0066] Fig. 9 is a schematic diagram of an exemplary device information table provided in an embodiment of the present invention Figure 3 ;
[0067] Fig.10 is a schematic diagram of an exemplary device information table provided in an embodiment of the present invention Figure 4 ;
[0068] Fig.11 This is a schematic diagram of a device monitoring and collection process provided by an embodiment of the present invention;
[0069] Fig.12 It is a schematic diagram of a device monitoring independent module thread provided by an embodiment of the present invention;
[0070] Fig.13 It is another schematic diagram of a device monitoring and collection process provided by an embodiment of the present invention;
[0071] Fig.14 is another schematic diagram of a device information reading process provided by an embodiment of the present invention;
[0072] Fig.15 This is a schematic diagram of an application scenario provided by an embodiment of the present invention;
[0073] Fig.16 The present invention provides a schematic diagram of a user accessing a database process. DETAILED DESCRIPTION
[0074] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0075] It should be noted that in the embodiments of the present application, it is difficult to provide a unified method to simultaneously obtain information about devices produced by all manufacturers because of the different ways of obtaining information for different types of devices. Moreover, there are still different types of information for the devices that need to be obtained. Some information only needs to be obtained once when the system starts, such as serial number, manufacturer, etc., which cannot be changed dynamically. However, some data that changes at any time, such as temperature, power consumption, status, etc., need to be obtained in real time; and different data types and different data lengths will affect the data collection method. Therefore, there is an urgent need for a unified information collection method that is compatible with different types of devices and different types of data.
[0076] Reference Figure 1 , showing the steps of the device monitoring method provided by the embodiment of the present invention Figure 1 , the method may include:
[0077] Step 101, monitoring a target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type;
[0078] Furthermore, the predefined device information table includes at least one of a bus information table, a bus interface information table, a system management interface information table, and a management component transmission protocol information table; the table information types corresponding to the predefined device information table include attribute name, attribute type, command corresponding to the device data acquisition channel, parameter corresponding to the device data acquisition channel, monitoring type, data length, data mask, database key value, and at least one of flag information.
[0079] It should be noted that in the embodiment of the present application, when monitoring data obtained from different channels, first, it is necessary to construct a device information table, that is, a predefined device information table in the embodiment of the present application.
[0080] Fig.15 It is a schematic diagram of an application scenario provided by an embodiment of the present invention. In the embodiment of the present application, the target device may be a large number of GPU devices in an artificial intelligence algorithm server.
[0081] There are various channels to obtain device-related information, such as I2C / SMBUS, SMBPBI, Redfsih, MCTP, etc. Among them, I2C / SMBUS (Inter-Integrated Circuit / System Management Bus), I2C and SMBUS are serial communication protocols used to transmit data between different components inside a computer system. They are usually used for communication between low-speed devices, such as sensors, temperature monitors, etc. Through these interfaces, you can obtain real-time status information of the device, such as temperature, voltage, fan speed, etc.
[0082] SMBPBI (System Management Bus Peripheral Bus Interface), SMBPBI is an interface that allows peripheral devices to communicate with the host system through the SMBus. It is commonly used in servers and embedded systems to connect and manage various system management devices, such as power management, environmental monitoring, etc.
[0083] Redfish is an open standard system management interface that provides a modern, RESTful interface to manage server and data center resources. It supports data access through HTTP / HTTPS protocols and can be used to obtain device hardware configuration, health status, firmware version and other information.
[0084] MCTP (Management Component Transport Protocol), MCTP is a protocol used to control and manage intelligent platform hardware in a system management environment. It can run on different physical layers (such as SMBus, PCIe, I2C, etc.) to implement device management functions such as firmware updates, sensor data collection, etc.
[0085] For example, for devices that require real-time monitoring, I2C / SMBUS or MCTP might be chosen, while for devices that require remote management, Redfish might be chosen.
[0086] Therefore, for different channels for obtaining device information, the command parameter format required by each channel is different. Therefore, an information table is defined for each acquisition channel, including a bus information table, a bus interface information table, a system management interface information table, and a management component transmission protocol information table.
[0087] Among them, the bus information table is the I2C / SMBUS table, the bus interface information table is the SMBPBI table, the system management interface information table is the Redfsih table, and the management component transmission protocol information table is the MCTP table. For specific information, please refer to Figure 7 , Figure 8 , Fig. 9 , Fig.10 , respectively showing the device information tables defined in different channels.
[0088] Furthermore, for Figure 7-10 The table information included in the table, for attributes, attributes are used for data interaction between modules, similar to a data table, called an attribute table, each record in the attribute table is called an attribute, and the attributes include attribute name, attribute value, attribute state, and attribute type. Different modules can read and write data in the table to interact. The attribute types are integer, floating point, and string. Different attributes have different attribute types. For example, when the attribute name, that is, the device information, is temperature, power consumption, etc., the attribute type is integer. When the attribute name, that is, the device information, is voltage, etc., expressed in decimals, the attribute type is floating point. When the attribute name, that is, the device information, is serial number, manufacturer, etc., the attribute type is string. It is essentially designed based on the characteristics of device information.
[0089] There are three attribute states: "normal", "read failed", and "not in place". After a module successfully reads the hardware device information through a certain channel, the attribute state can be set to "normal" when updating the attribute in the attribute table. If the reading fails due to network or hardware link instability or device failure, the attribute state can be set to "read failed". If the device is not plugged in, such as the GPU is not plugged in on the board, the attribute state corresponding to the GPU can be set to "not in place".
[0090] As for commands and parameters, different types of devices have different acquisition channels, and the corresponding commands and parameters are also different. Devices that obtain data through I2C / SMBUS must specify the bus where the device is located, the device's address, and the register or command; devices that obtain data through SMBPBI must specify the commands and parameters required by the device. Similarly, devices that obtain data through Redfish and MCTP must specify the commands and parameters required by Redfish and MCTP.
[0091] As for the monitoring type, there are three types of monitoring types, "no reading", "first reading" and "continuous reading". It should be noted that in the embodiment of the present application, the reading here refers to accessing the hardware device through various channels to read data. For some data that changes at any time, such as temperature, power consumption, status, etc., the monitoring type is "continuous reading". For data that does not change over time, such as serial numbers, manufacturers, etc., which only need to be read once when the system starts, the monitoring type is "first reading". There is also a type that has accessed the hardware device in other modules to obtain data and set it to the attribute table, then its monitoring type is "no reading", because there is no need to read the hardware device again here, just read it from the attribute table.
[0092] As for data length, different information may be represented by data of different lengths. The length of the data must be specified here.
[0093] For data masks, for some integer data, different bits may represent different information, and we need to obtain the required data on specific bits based on the data mask.
[0094] For Redis Key, the data storage format of the Redis database is Key: Value. Each piece of device information must be temporarily stored in the Redis database, and each piece must correspond to a Key value.
[0095] As for whether the flag has been read, the flag is the flag information, and for the data of "first read", it is used to identify whether it has been read. The default value is 0, indicating that it has not been read.
[0096] Therefore, after defining the device information table, it is necessary to periodically monitor and collect data on the target device according to the table information of the device information table, so as to obtain the target monitoring data corresponding to the target device.
[0097] Step 102: store the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path.
[0098] Further, storing the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the preset database through the target uniform resource locator path includes:
[0099] The target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path from the preset database through the target uniform resource locator path.
[0100] It should be noted that in step 102, all the information that needs to be collected on the AI server has been stored in a preset database, wherein the preset database may be a Redis database, and then the user end or user side obtains the data stored in the Redis database.
[0101] It should be noted that the data stored in the Redis database will correspond to a URL path, so users can obtain data by accessing the URL path.
[0102] Furthermore, the target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal enters the target uniform resource locator path in the address bar on the preset interface. If the target uniform resource locator path exists, the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path is accessed from the preset database.
[0103] Specifically, refer to Fig.16 , the user enters the corresponding URL path in the address bar on the WEB interface or executes the command corresponding to the URL in the terminal, or accesses the URL path through the corresponding tool;
[0104] When the system detects that the URL path is accessed, it first determines whether the path exists;
[0105] If the path does not exist, an error message is returned directly;
[0106] If the path exists, the target monitoring data in a preset format consisting of a key value corresponding to the target uniform resource locator path and a target value corresponding to the key value is accessed from a preset database according to the path.
[0107] It should be noted that in an embodiment of the present application, the preset database can be a Redis database. Therefore, if the path exists, the data stored in the Redis database is accessed from the Redis database according to the path to obtain all Value values, and all Value values and their corresponding Key values are composed of JSON data format and returned to the user.
[0108] The data in the Redis database is stored in key-value format, and all keys are strings. The data types of values include String, List, Hash, Set, and ZSet.
[0109] It should be noted that in the embodiments of the present application, the preset database Redis and the preset data format JSON are not limited.
[0110] The device monitoring method provided by the embodiment of the present invention comprises: monitoring the target device according to a preset period according to a predefined device information table, and obtaining the target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on the device data acquisition channel and the device type; storing the target monitoring data in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path. In the embodiment of the present invention, the devices are classified according to the acquisition methods of different devices, and an information table is established respectively, and then data is periodically collected according to the data acquisition methods of different types of devices, and the data is stored in the preset database, and the user obtains the required data through the target uniform resource locator path. Through the embodiment of the present invention, different types of devices can be compatible together, no matter through which channel to obtain information, whether it is only obtained once or needs to be obtained periodically, it can be compatible; and this method can obtain all the information on the AI server, which is convenient for obtaining the device information and operation status of the AI server at any time, and is convenient for related processing according to the operation status of the server, ensuring the stable operation of the server.
[0111] Reference Figure 2 , showing the steps of the device monitoring method provided by the embodiment of the present invention Figure 2 , the method may include:
[0112] Step 201: Initialize the predefined device information table.
[0113] It should be noted that in the embodiment of the present application, each device information table must be initialized, and the initialization can be performed in the order of initializing the I2C / SBBUS information table, initializing the SMBPBI information table, initializing the Redfish information table, and initializing the MCTP information table.
[0114] Furthermore, the table information types corresponding to the predefined device information table include attribute name, attribute type, command corresponding to the device data acquisition channel, parameter corresponding to the device data acquisition channel, monitoring type, data length, data mask, database key value, and at least one of flag information.
[0115] Further, refer to Figure 3 , the initializing the predefined device information table comprises:
[0116] Step 301, initializing the bus information table;
[0117] Further, step 301 may include: reading all first target data in the bus information table respectively; calling corresponding functions according to attribute types in the first target data to register attributes into the attribute table; and registering key values of the first target data into a preset database.
[0118] It should be noted that in the embodiment of the present application, the specific I2C / SMBUS information table initialization method, first, read the first data in the I2C / SMBUS information table. Then call different functions according to the type of attribute to register the attribute in the attribute table. For integer data, set the default value to 0, the default value for floating-point data is set to 0.0, and the default value for string data is set to "", and the attribute status is uniformly set to "normal" during initialization. After registering the attributes, register the data in the Redis database again, with the Key value being the Key specified in the information table, and the Value value being "" by default. Continue to read the next data in the I2C / SMBUS information table, and repeat the above steps until all data is registered in the attribute table and the Redis database.
[0119] Step 302, initializing the bus interface information table;
[0120] Step 303, initializing the system management interface information table;
[0121] Step 304: Initialize the management component transmission protocol information table.
[0122] It should be noted that for the SMBPBI, Redfish, and MCTP information table initialization methods, refer to the above-mentioned I2C / SMBPBI method and will not be repeated here.
[0123] Step 202, monitoring the target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type;
[0124] Further, refer to Figure 4 , the monitoring of the target device according to a preset period according to the predefined device information table includes:
[0125] Step 401, monitoring the target device according to the bus information table according to a preset period;
[0126] It should be noted that in the embodiment of the present application, the information in each information table must be monitored periodically, and the periodic monitoring can be performed in the following order: monitoring the information in the I2C / SMBUS information table, monitoring the information in the SMBPBI information table, monitoring the information in the Redfish information table, and monitoring the information in the MCTP information table.
[0127] Further, step 401 may include: reading the second target data in the bus information table; determining the monitoring type; and monitoring the target device according to a preset period according to the monitoring type and the second target data.
[0128] Further, the monitoring the target device according to the monitoring type and the second target data according to a preset period includes:
[0129] If the monitoring type is a non-read type, the device data is read from the attribute table according to the attribute type corresponding to the second target data.
[0130] Further, the monitoring the target device according to the monitoring type and the second target data according to a preset period includes:
[0131] If the monitoring type is a continuous read type, accessing the target device according to any one of a bus, a device address, a register to be read, and a command corresponding to the target device;
[0132] Reading device data of the target device according to the data length in the second target data;
[0133] Determine, based on the attribute type corresponding to the device data, whether to monitor the target device according to a preset period.
[0134] Further, the monitoring the target device according to the monitoring type and the second target data according to a preset period includes:
[0135] If the monitoring type is a first read type, it is determined that the target device is monitored according to a preset period according to the flag information in the second target data.
[0136] It should be noted that in the embodiments of the present application, reference Fig.11 Monitoring the target device according to the preset period according to the bus information table may include the following contents:
[0137] (1) First read the first data in the I2C / SMBUS information table and determine the monitoring type;
[0138] It should be noted that the first record is read from the predefined device information table, and the monitoring type is determined based on the read data, which may be "no reading", "first reading" or "continuous reading".
[0139] (2) If the monitoring type is "not read", it means that the information of the hardware device has been read through some channel in other modules and set into the attribute table. For example, the temperature monitoring module will periodically read the temperature of the hardware device and set it into the attribute table. Here, you only need to call different functions according to the attribute type to read the relevant data from the attribute table and update it into the Redis database. Then jump to (10);
[0140] (3) If the monitoring type is "first read", it is necessary to continue to determine whether the "read flag" is 1. If it is 1, it means that it has been read, and jump to (10). If it is 0, it means that it has not been read, and jump to (5);
[0141] (4) If the monitoring type is "continuous reading", execute (5);
[0142] (5) Access the hardware device based on the I2C bus where the device is located, the device address, the register or command to be read, and read the "data length" data;
[0143] (6) After reading the data, make a judgment based on the type of attribute corresponding to the data;
[0144] (7) If the attribute type is an integer, then different bits in the data may represent different meanings. Perform a bitwise AND operation on the read data and the "data mask" to obtain the corresponding information, and then call the integer-related function to update the value of the attribute in the attribute table;
[0145] (8) If the attribute type is not an integer, such as a floating point or string type, the read data is directly called to update the value in the attribute table using the relevant function;
[0146] (9) Use the read data as the Value value to update the Key value in the Redis database, and then set the "Whether it has been read flag" to 1;
[0147] (10) Continue to read the next data in the I2C / SMBUS information table and repeat the above steps until all the data in the information table has been traversed.
[0148] It should be noted that in the above steps, the device information is read from the I2C / SMBUS interface, and processed according to different monitoring requirements and data types, and finally the data is stored in the Redis database. This method is very useful in scenarios where a large amount of device data needs to be monitored and managed in real time.
[0149] After the step of determining the monitoring type, the method comprises:
[0150] If the monitoring type is a non-read type, a bus module is established for the bus device data acquisition channel;
[0151] Establishing a bus interface module for the data acquisition channel of the bus interface device;
[0152] Establishing a system management interface module for the system management interface device data acquisition channel;
[0153] Establishing management component transmission protocol modules respectively for the management component transmission protocol device data acquisition channels;
[0154] So that the bus module monitors the target device according to the preset period according to the bus device data acquisition channel, the bus interface module system monitors the target device according to the preset period according to the bus interface device data acquisition channel, the management interface module monitors the target device according to the preset period according to the management interface device data acquisition channel, and the management component transmission protocol module monitors the target device according to the preset period according to the management component transmission protocol device data acquisition channel.
[0155] In another embodiment, after determining the monitoring type, it can be known that there is a type of monitoring type called "no read", that is, the monitoring type is a no read type. The no read type means that the information corresponding to the device has been accessed in other modules and set in the attribute table. When monitoring, you only need to read and update the Redis database from the attribute table.
[0156] There are various channels for accessing devices, and the access methods of different channels vary greatly. Therefore, in addition to periodically monitoring the target device according to the content in the information table, you can also establish an independent module for access channels such as I2C / SMBUS, SMBPBI, Redfish, MCTP, etc. Each module accesses the hardware device through its own channel to obtain data and update the corresponding attributes.
[0157] For details, please refer to Fig.12 ,by Fig.12 Take the bus module in as an example, other modules can refer to the bus module.
[0158] In the embodiment of the present application, the difference from the previous embodiment is that there is no monitoring type of "no reading", and the preset database is not updated here. Fig.13 , Fig.14 , different modules have set the corresponding device information into the attribute table.
[0159] Specifically, Fig.14 In the process, the first data in the I2C / SMBUS bus information table is read first, and then the corresponding attribute is read from the attribute table according to the attribute type and updated to the preset database, that is, the Redis database. Continue to read the next data, and if the last data is read, continue to read from the first data.
[0160] Step 402, monitoring the target device according to the bus interface information table according to a preset period;
[0161] Step 403, monitoring the target device according to the system management interface information table according to a preset period;
[0162] Step 404: monitor the target device according to the management component transmission protocol at a preset period.
[0163] It should be noted that in the embodiment of the present application, the monitoring method for devices in the SMBPBI, Redfish, and MCTP information tables is similar to that of the I2C / SMBUS information table. It only needs to be repeated in the above manner, and no further details will be given here.
[0164] Step 203: store the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path.
[0165] It should be noted that the above step 203 is referred to the previous discussion and will not be repeated here.
[0166] The device monitoring method provided by the embodiment of the present invention comprises: monitoring the target device according to a preset period according to a predefined device information table, and obtaining the target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on the device data acquisition channel and the device type; storing the target monitoring data in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path. In the embodiment of the present invention, the devices are classified according to the acquisition methods of different devices, and an information table is established respectively, and then data is periodically collected according to the data acquisition methods of different types of devices, and the data is stored in the preset database, and the user obtains the required data through the target uniform resource locator path. Through the embodiment of the present invention, different types of devices can be compatible together, no matter through which channel to obtain information, whether it is only obtained once or needs to be obtained periodically, it can be compatible; and this method can obtain all the information on the AI server, which is convenient for obtaining the device information and operation status of the AI server at any time, and is convenient for related processing according to the operation status of the server, ensuring the stable operation of the server.
[0167] In an embodiment of the present application, an independent thread can be established separately for the data corresponding to the target device whose monitoring type is a non-read type. The independent thread can directly perform the read and update process. Therefore, each independent thread module can read and update the corresponding attributes through its own device data acquisition channel.
[0168] Reference Figure 5 , shows a device block diagram of a device monitoring device provided by an embodiment of the present invention, which is applied to a storage control chip in a device monitoring system, and the storage control chip is equipped with an on-chip cache pool. The device includes:
[0169] The monitoring module 501 is used to monitor the target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type;
[0170] The access module 502 is used to store the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path.
[0171] In the embodiment of the present invention, the devices are classified according to the acquisition methods of different devices, and an information table is established for each device. Then, data is periodically collected according to the data acquisition methods of different types of devices, and the data is stored in a preset database. The user obtains the required data through the target uniform resource locator path. Through the embodiment of the present invention, different types of devices can be compatible together, regardless of the channel used to obtain information, whether it is only obtained once or needs to be obtained periodically; and this method can obtain all the information on the AI server, which is convenient for obtaining the device information and operating status of the AI server at any time, and is convenient for related processing according to the operating status of the server, ensuring the stable operation of the server.
[0172] The embodiment of the present invention also provides a communication device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0173] Memory 603, used for storing computer programs;
[0174] The processor 601, when used to execute the program stored in the memory 603, can implement the following steps:
[0175] Monitoring the target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type;
[0176] The target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the preset database through the target uniform resource locator path.
[0177] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits together, which are all well known in the art, so this article will not further describe them. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor can be transmitted on a wired medium or on a wireless medium through an antenna. Further, the antenna also receives data and transmits the data to the processor. The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory can be used to store data used by the processor when performing operations.
[0178] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0179] The communication interface is used for communication between the above terminal and other devices.
[0180] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0181] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0182] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the device monitoring method described in any one of the above embodiments.
[0183] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the device monitoring method described in any one of the above embodiments.
[0184] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of 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, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0185] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0186] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0187] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A device monitoring method, It is characterized in that The method comprises: Monitoring the target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type; Storing the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path; The table information types corresponding to the predefined device information table include attribute name, attribute type, command corresponding to the device data acquisition channel, parameter corresponding to the device data acquisition channel, monitoring type, data length, data mask, database key value, and at least one of flag information. The attribute name, attribute type, attribute value, and attribute status constitute an attribute table. The attribute status includes normal status, read failure status, and not in place status. The predefined device information table includes at least one of a bus information table, a bus interface information table, a system management interface information table, and a management component transmission protocol information table; The monitoring of the target device according to the predefined device information table according to the preset period includes: Read the second target data in the bus information table; Determine the type of monitoring; Monitoring the target device according to the monitoring type and the second target data at a preset period; The monitoring of the target device according to the monitoring type and the second target data according to a preset period includes: If the monitoring type is a non-read type, reading device data from an attribute table according to the attribute type corresponding to the second target data; Wherein, an independent thread is provided corresponding to the target device corresponding to the monitoring type of not reading the type, and the independent thread reads and updates the corresponding attribute table through the device data acquisition channel corresponding to the target device.
2. The method according to claim 1, It is characterized in that The attribute type includes any one of integer, floating point, and string types.
3. The method according to claim 1, It is characterized in that Before the step of monitoring the target device according to a preset period according to the predefined device information table, the method includes: Initialize the predefined device information table.
4. The method according to claim 3, It is characterized in that Initializing the predefined device information table includes: Initializing the bus information table; Initializing the bus interface information table; Initializing the system management interface information table; Initialize the management component transmission protocol information table.
5. The method according to claim 3, It is characterized in that The initializing the bus information table comprises: Read all first target data in the bus information table respectively; Calling a corresponding function according to the attribute type in the first target data to register the attribute into the attribute table; Register the key value of the first target data in a preset database.
6. The method according to claim 1, It is characterized in that The monitoring of the target device according to the predefined device information table according to the preset period includes: Monitoring the target device according to the bus information table according to a preset period; Monitoring the target device according to the bus interface information table according to a preset period; Monitoring the target device according to a preset period according to the system management interface information table; The target device is monitored according to the management component transmission protocol at a preset period.
7. The method according to claim 1, It is characterized in that The monitoring of the target device according to the monitoring type and the second target data according to a preset period includes: If the monitoring type is a continuous read type, accessing the target device according to any one of a bus, a device address, a register to be read, and a command corresponding to the target device; Reading device data of the target device according to the data length in the second target data; Determining to monitor the target device according to a preset period according to the attribute type corresponding to the device data; If the monitoring type is a first read type, determining to monitor the target device according to a preset period according to the flag bit information in the second target data; The device data acquisition channel includes a bus device data acquisition channel, a bus interface device data acquisition channel, a system management interface device data acquisition channel, and a management component transmission protocol device data acquisition channel; After the step of determining the monitoring type, the method comprises: If the monitoring type is a non-read type, a bus module is established for the bus device data acquisition channel; Establishing a bus interface module for the data acquisition channel of the bus interface device; Establishing a system management interface module for the system management interface device data acquisition channel; Establishing management component transmission protocol modules respectively for the management component transmission protocol device data acquisition channels; So that the bus module monitors the target device according to the preset period according to the bus device data acquisition channel, the bus interface module system monitors the target device according to the preset period according to the bus interface device data acquisition channel, the management interface module monitors the target device according to the preset period according to the management interface device data acquisition channel, and the management component transmission protocol module monitors the target device according to the preset period according to the management component transmission protocol device data acquisition channel.
8. The method according to claim 1, It is characterized in that The storing the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the preset database through the target uniform resource locator path, comprises: The target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path from the preset database through the target uniform resource locator path.
9. The method according to claim 8, It is characterized in that The storing of the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal accesses the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path from the preset database through the target uniform resource locator path, comprises: The target monitoring data is stored in a preset database, and the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal enters the target uniform resource locator path in the address bar on the preset interface. If the target uniform resource locator path exists, the target monitoring data in a preset format composed of key values corresponding to the target uniform resource locator path is accessed from the preset database.
10. An equipment monitoring device, It is characterized in that The device comprises: A monitoring module, used to monitor the target device according to a preset period according to a predefined device information table to obtain target monitoring data corresponding to the target device, wherein the predefined device information table is determined based on a device data acquisition channel and a device type; An access module, used for storing the target monitoring data in a preset database, wherein the target monitoring data corresponds to a target uniform resource locator path, so that the user terminal can access the preset database through the target uniform resource locator path; The table information types corresponding to the predefined device information table include attribute name, attribute type, command corresponding to the device data acquisition channel, parameter corresponding to the device data acquisition channel, monitoring type, data length, data mask, database key value, and at least one of flag information. The attribute name, attribute type, attribute value, and attribute status constitute an attribute table. The attribute status includes a normal state, a read failure state, and an out-of-position state. The predefined device information table includes at least one of a bus information table, a bus interface information table, a system management interface information table, and a management component transmission protocol information table. The monitoring of the target device according to the predefined device information table according to the preset period includes: Read the second target data in the bus information table; Determine the type of monitoring; Monitoring the target device according to the monitoring type and the second target data at a preset period; The monitoring of the target device according to the monitoring type and the second target data according to a preset period includes: If the monitoring type is a non-read type, reading device data from an attribute table according to the attribute type corresponding to the second target data; Wherein, an independent thread is provided corresponding to the target device corresponding to the monitoring type of not reading the type, and the independent thread reads and updates the corresponding attribute table through the device data acquisition channel corresponding to the target device.
11. A communication device, It is characterized in that include: A transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; The processor is used to read the program in the memory to implement the device monitoring method as described in any one of claims 1-9.
12. A readable storage medium for storing a program, It is characterized in that When the program is executed by a processor, the device monitoring method as described in any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the device monitoring method as described in any one of claims 1 to 9 is implemented.
