Dispatching automation system operation status information collection method, storage medium and device
By collecting disk, network card, host, process and IPMI information, using the message queue mechanism and configuration file updates, the problems of data collection delay and simple content in the existing technology are solved, and efficient and fast status information collection and The wide monitoring scope improves the operation and maintenance capabilities of the automation system.
Patent Information
- Application Number
- CN202011178336.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2024-10-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing methods for collecting operating status information of dispatch automation systems have problems such as delay, slow speed, and simple monitoring content, and cannot meet the increasingly high requirements for data accuracy and sampling period.
Adopt the collection method of disk information, network card information, host information, information of the top 10 processes occupying system resources, scheduling automation system agent information, and intelligent platform management interface IPMI firmware alarm information, and improve the performance of the system through periodic updates of the message queue mechanism and configuration files. Data real-time and collection efficiency.
It has improved the real-time and speed of data collection, expanded the monitoring content, improved the intelligent operation and maintenance level and fault analysis and processing capabilities of the automation system, and supported the safe, stable operation and rapid fault location of the system.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system dispatching automation, and in particular to a method, storage medium and equipment for collecting running status information of a dispatching automation system. Background Art
[0002] The operating status information of the dispatching automation system refers to the information required for power grid dispatching production collected by the automation equipment or other equipment of the plant and station. It directly reflects the actual operating conditions of the power grid and is an indispensable and important basis for power grid safety, economy, energy conservation and environmental protection dispatching.
[0003] As an electric power dispatching automation device, it should have functions such as data collection, data analysis and data processing, and be able to issue indicators and execute commands in a timely manner. From the perspective of the analysis data of the power system, the accuracy of the data is getting higher and higher, and the sampling cycle is getting shorter and shorter. The current data collection method can no longer meet the growing needs. There are currently two ways of data collection. The first way is to collect the system resources and node status of the monitored object by installing the collection engine agent on the monitored object, executing the background collection service and the collection script. The monitored objects include: server equipment, workstation equipment, etc. The operating status (disk information, network card information, host information) of storage devices, security equipment, network communication equipment, power environment equipment, etc. and the dispatching automation system agent (message bus, service bus, real-time database, application status and process information on the server) are collected. The second way uses the simple network management protocol SNMP (V1 / V2 / V3 version) network protocol to remotely obtain the monitored object data.
[0004] The collected data cannot be aggregated and analyzed in a unified manner due to network security zone restrictions. Therefore, the acquisition agents in different network security zones first aggregate the data in their own security zones and send them to the overall data aggregation service, which then sends them to the message bus for data analysis and processing. This results in a certain delay in the communication between the control system and the remote management program, and the module information that needs to be collected cannot be sent to the acquisition agent program immediately.
[0005] In addition, the existing dispatching automation system's operating status can be monitored in a small range and with simple content. Summary of the invention
[0006] To address the deficiencies in the prior art, the present invention provides a method, storage medium and device for collecting operating status information of a dispatching automation system, which solve the problems of delay, slow speed and simple monitoring content in the existing method for collecting operating status information of a dispatching automation system.
[0007] In order to achieve the above objectives, the present invention adopts the following technical solution: a method for collecting operation status information of a dispatching automation system, comprising:
[0008] A method for collecting disk information, network card information, host information, process information of a set number of bits before occupying system resources, scheduling automation system agent information, and intelligent platform management interface IPMI firmware alarm information.
[0009] Furthermore, the disk information collection method includes:
[0010] 1) Determine whether the data upload configuration file and the disk collection and distribution configuration file exist at the same time. If not, wait for a certain period of time and then determine again until the configuration file exists;
[0011] The data sending configuration file includes: the data sending server IP and port;
[0012] The disk collection and distribution configuration file includes: the disk information to be collected, the table ID of the disk data stored in the database of the data upload server, the flag of whether monitoring is required, the ID of the current server for which information needs to be collected, and the disk information to be monitored;
[0013] 2) Parse the configuration file content. If the monitoring flag indicates that monitoring is not required, periodically obtain the disk information that needs to be collected from the current server and send it to the table corresponding to the database table ID in the data upload server, and update the disk information that needs to be collected in the disk collection and distribution configuration file according to the disk information in the database;
[0014] 3) If the monitoring flag is required to be monitored, the disk information that needs to be collected in the disk collection and distribution configuration file is periodically obtained, and compared with the actual disk information of the current server. If there is a change with the actual disk information, the latest disk information of the current server is composed of an XML message and sent to the data upload server through the message queue, and the content in the database is updated. At the same time, the disk information that needs to be monitored is obtained from the disk collection and distribution configuration file, and the corresponding disk is filtered out from the current server. The disk device metadata that needs to be monitored, the device ID and sub-device ID of the disk in the operating system are obtained, and the number of read and write times of the disk to the sector is obtained through the system file to calculate the read and write speed of the disk, and the data is composed of an XML message and sent to the data upload server through the message queue.
[0015] Furthermore, the network card information collection method includes:
[0016] 1) Determine whether the data upload configuration file and the network card collection and distribution configuration file exist at the same time. If not, wait for a certain period of time and then determine again until the configuration file exists;
[0017] The configuration file for network card collection and distribution includes: the network card information to be collected, the table ID where the network card data is stored in the database, the flag whether monitoring is required, the ID of the current server, and the network card information to be monitored;
[0018] 2) Parse the configuration file content. If the monitoring flag indicates that monitoring is not required, periodically obtain the network card information that needs to be collected from the current server and send it to the table corresponding to the database table ID in the network card data uploading server, and update the network card information that needs to be collected in the network card collection and distribution configuration file according to the data in the database;
[0019] 3) If the monitoring flag is required to be monitored, the network card information that needs to be collected in the distributed configuration file is periodically obtained and compared with the actual network card information of the current server. If there is a change with the actual network card information, the latest network card information of the current server is assembled into an XML message and sent through the message queue to the network card data upload server, and the content in the database is updated; at the same time, the network card information that needs to be monitored is obtained from the network card collection and distributed configuration file, and the static information and dynamic traffic of the network card are obtained by implementing system commands and reading system files, and the data is assembled into an XML message and sent through the message queue to the data upload server.
[0020] Furthermore, the host information collection method includes: obtaining CPU information, disk information, and memory information through system files, obtaining disk utilization through system commands, obtaining the number of processes through the content in the system's / proc / directory, obtaining the number of occupied socket connections through system files, obtaining the physical memory usage occupied by the swap partition and shared memory through system commands, obtaining shared memory usage through system files, and organizing messages to be sent to the data upload server through a message queue.
[0021] Furthermore, the method for collecting process information of a set number of bits occupying system resources includes: obtaining process information through system files, the process information including: disk read and write speeds, CPU usage, memory usage, sorting the obtained process information, obtaining the corresponding four groups of process information of a set number of bits, and organizing the messages to be sent to the data upload server through the message queue.
[0022] Furthermore, the dispatching automation system agent information collection method includes:
[0023] Register the exit signal processing function, load the host information, read the proxy distribution configuration file to obtain the proxy information that needs to be monitored, read the data upload configuration file to obtain the IP and port of the data upload server. If the contents of the read proxy distribution configuration file and the data upload configuration file are correct, call the corresponding interface to collect the service name, system ID, port number, load balancing, and number of connections of the service bus; collect the message bus name, state name, application name, number of message accumulation, and number of sent and received messages of the message bus; collect the real-time database name, table record usage rate, and number of real-time library process accesses of the real-time database; collect the application name, current state, refresh state, and switching state of the application; collect the process object ID, process importance level, process running time, process start time, number of file descriptors occupied by the process, number of threads owned, and number of process core dump files; organize the message to be sent to the upload server through the message queue.
[0024] Furthermore, the IPMI firmware alarm information collection method includes: loading the modprobe ipmi_devintf and modprobe ipmi_si modules of IPMI, determining whether the loading is successful, and directly exiting if the loading fails; if successful, loading the data upload configuration file, obtaining the IP and port of the upload server, and initializing the alarm information in the data upload server; obtaining the system log through the system command, storing it in the cache, making a judgment based on the obtained log content, and sending the alarm data or alarm recovery data in the log to the upload server.
[0025] A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the aforementioned methods for collecting operating status information of a dispatching automation system.
[0026] A computing device comprising:
[0027] One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods for collecting operating status information of a scheduling automation system described above.
[0028] The beneficial effects achieved by the present invention are as follows: the message queue mechanism is adopted to improve the real-time performance of data; the collection method has small delay and high speed; the method of issuing configuration files is adopted to improve the flexibility of collection; partial content can be collected to improve efficiency; disk information, network card information, host information, information of the top 10 processes occupying system resources, dispatching automation system agent information and intelligent platform management interface (IPMI) firmware alarm information can be collected; the monitoring content is rich and the monitoring range is wide; the present invention strengthens the intelligent level of dispatching automation system operation and maintenance, improves the fault analysis and processing capabilities of the existing automation system, supports the safe and stable operation of the automation system, and realizes the integrated operation monitoring and command of the dispatching automation system and the rapid positioning of faults and the overall status evaluation based on the in-depth analysis of current business needs. DETAILED DESCRIPTION
[0029] The present invention is further described below. The following examples are only used to more clearly illustrate the technical solution of the present invention, and are not intended to limit the protection scope of the present invention.
[0030] Embodiment 1:
[0031] A method for collecting operation status information of a dispatching automation system, comprising:
[0032] A method for collecting disk information, network card information, host information, information on the top 10 processes occupying system resources, scheduling automation system agent information, and intelligent platform management interface (IPMI) firmware alarm information.
[0033] The specific steps of disk information collection include:
[0034] 1) Determine whether the data upload configuration file and the disk acquisition and distribution configuration file exist at the same time. If not, wait for a certain period of time and then determine again until the configuration file exists;
[0035] The data upload configuration file includes: the data upload server IP and port;
[0036] The configuration file sent for disk collection includes: the disk information to be collected (number of disks, disk name, mount point, total disk size), the table ID where the disk data is stored in the database of the server where the data is uploaded, the flag for whether monitoring is required (0 means no monitoring is required, 1 means monitoring is required), the ID of the current server whose information needs to be collected, and the disk information to be monitored.
[0037] The data upload configuration file and the collection and distribution configuration file are configured through the client; the content in the configuration file is obtained regularly at the set time interval;
[0038] 2) Parse the configuration file content. If the monitoring flag is 0, periodically obtain the disk information (number of hard disks, disk name, mount point, total disk size) that needs to be collected on the current server and send it to the table corresponding to the database table ID in the disk data upload server, and update the disk information that needs to be collected in the disk collection and distribution configuration file according to the disk information in the database;
[0039] 3) If the monitoring flag is 1, periodically obtain the disk information that needs to be collected in the configuration file sent by the disk collection, and compare it with the actual disk information of the current server. If it is found that there is a change with the actual disk information, the latest disk information of the current server is composed of an XML message and sent to the disk data upload server through the message queue, and the content in the database is updated. The client selectively updates the disk information that needs to be monitored in the configuration file. At the same time, the disk information that needs to be monitored is obtained from the configuration file sent by the disk collection, and the corresponding disk is screened from the current server to obtain the disk device metadata that needs to be monitored, the device ID of the disk in the operating system, and the secondary device ID. The read and write speed of the disk is calculated by obtaining the number of reads and writes of the disk to the sector through the system file, and these data are composed of an XML message and sent to the disk data upload server through the message queue. The message queue mechanism is used for data transmission, which solves the problems of delay and slow speed of the collection method.
[0040] The process of collecting network card information is as follows:
[0041] 1) Determine whether the data upload configuration file (including the server IP and port required for data upload) and the network card collection and delivery configuration file exist at the same time. If not, wait for a certain period of time and then determine again until the configuration file exists;
[0042] The network card collection and distribution configuration file includes the network card information that needs to be collected (network card quantity, network card name, IP address, MAC address), the table ID where the network card data is stored in the database, the flag for whether monitoring is required (0 means no monitoring is required, 1 means monitoring is required), the ID of the current server, and the network card information that needs to be monitored.
[0043] The network card data upload configuration file and the network card collection and distribution configuration file are configured through the client; the content in the configuration file is obtained regularly at the set time interval;
[0044] 2) Parse the configuration file content. If the monitoring flag is 0, periodically obtain the network card information (number of network cards, network card name, IP address, MAC address) that needs to be collected from the current server and send it to the table corresponding to the database table ID in the network card data upload server, and update the network card information that needs to be collected in the network card collection and distribution configuration file according to the data in the database;
[0045] 3) If the monitoring flag is 1, periodically obtain the network card information that needs to be collected in the distributed file, and compare it with the actual network card information of the current server (number of network cards, network card name, IP address, MAC address). If it is found that there is a change with the actual network card information, the latest network card information of the current server is composed of an XML message and sent to the network card data upload server through the message queue, and the content in the database is updated. The client selectively updates the network card information that needs to be monitored in the network card collection and distribution configuration file. At the same time, the network card information that needs to be monitored is obtained from the network card collection and distribution configuration file, and the static information and dynamic traffic of these network cards are obtained by implementing system commands and reading system files. These data are composed of XML messages and sent to the network card data upload server through the message queue. The message queue mechanism is used for data transmission, which solves the problem of delay and slow speed of the collection method.
[0046] The process of collecting host information and information about the top 10 processes that occupy system resources (referred to as Top 10 process information) specifically includes the following steps:
[0047] Get the IP and port of the data upload server from the data upload configuration file;
[0048] Host information collection method: obtain CPU information, disk information, and memory information through system files, obtain disk utilization through system commands, obtain the number of processes through the content in the system's / proc / directory, obtain the number of occupied socket connections through system files, obtain the physical memory usage occupied by the swap partition and shared memory through system commands, obtain shared memory usage through system files, and organize messages to be sent to the data upload server through the message queue.
[0049] Top10 process information collection method: obtain process information (including disk read and write speed, CPU usage, memory usage) through system files, sort the obtained process information through write speed comparison function, read speed comparison function, CPU usage comparison function, and memory usage comparison function, obtain the corresponding four groups of top 10 process information, organize the message and send it to the data upload server through the message queue.
[0050] The process of dispatching automation system agent collection is as follows:
[0051] Register the exit signal processing function (a library function that can ensure the normal exit of the program, provided by the operating system), load the host information, read the proxy distribution configuration file to obtain the proxy information that needs to be monitored, read the data upload configuration file to obtain the IP and port of the data upload server, and if the contents of the read proxy distribution configuration file and the data upload configuration file are correct, call the corresponding interface to collect the service name, system ID, port number, load balancing, and number of connections of the service bus. Collect the message bus name, state name, application name, number of message accumulation, and number of sent and received messages of the message bus. Collect the real-time database name, table record usage rate, and number of real-time library process accesses of the real-time database. Collect the application name, current state, refresh state, and switching state of the application. Collect the process object ID, process importance level, process running time, process start time, number of file descriptors occupied by the process, number of threads owned, and number of process core dump files. And organize the message to be sent to the upload server through the message queue, and periodically obtain the content information that needs to be collected from the proxy distribution configuration file and selectively collect the collection indicators.
[0052] The process of IPMI (Intelligent Platform Management Interface) firmware alarm is as follows: This step mainly collects server hardware alarm information.
[0053] This method needs to be executed by the super user of the system, load the modprobe ipmi_devintf and modprobe ipmi_si modules of IPMI (existing modules in IPMI), determine whether the loading is successful, and exit directly if the loading fails. If successful, load the data upload configuration file, obtain the IP and port of the upload server, and initialize the alarm information in the upload server; obtain the system log through the system command, store it in the cache, make a judgment based on the obtained log content, and send the alarm data or alarm recovery data in the log to the upload server. If the log in the cache is greater than 500, execute a command to clear the log.
[0054] Embodiment 2:
[0055] A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes the aforementioned method for collecting operating status information of a dispatching automation system.
[0056] A computing device includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include the aforementioned instructions for executing the method for collecting operating status information of a scheduling automation system.
[0057] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0058] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0059] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0060] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0061] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for collecting operation status information of a dispatching automation system, characterized in that: include: Methods for collecting disk information, network card information, host information, process information of the number of bits set before occupying system resources, dispatch automation system agent information, and intelligent platform management interface IPMI firmware alarm information; Wherein, the disk information collection method comprises: 1) Determine whether the data upload configuration file and the disk collection and distribution configuration file exist at the same time. If not, wait for a certain period of time and then determine again until the configuration file exists; The data sending configuration file includes: the data sending server IP and port; The disk collection and distribution configuration file includes: the disk information to be collected, the table ID of the disk data stored in the database of the data upload server, the flag of whether monitoring is required, the ID of the current server for which information needs to be collected, and the disk information to be monitored; 2) Parse the configuration file content. If the monitoring flag indicates that monitoring is not required, periodically obtain the disk information that needs to be collected from the current server and send it to the table corresponding to the database table ID in the data upload server, and update the disk information that needs to be collected in the disk collection and distribution configuration file according to the disk information in the database; 3) If the monitoring flag is that monitoring is required, the disk information that needs to be collected in the disk collection and distribution configuration file is periodically obtained, and compared with the actual disk information of the current server. If there is a change with the actual disk information, the latest disk information of the current server is composed of an XML message and sent to the data upload server through the message queue, and the content in the database is updated. At the same time, the disk information that needs to be monitored is obtained from the disk collection and distribution configuration file, and the corresponding disk is filtered out from the current server. The disk device metadata that needs to be monitored, the device ID and sub-device ID of the disk in the operating system are obtained, and the number of read and write times of the disk to the sector is obtained through the system file to calculate the read and write speed of the disk, and the data is composed of an XML message and sent to the data upload server through the message queue.
2. A method for collecting operating status information of a dispatching automation system according to claim 1, characterized in that: The network card information collection method comprises: 1) Determine whether the data upload configuration file and the network card collection and distribution configuration file exist at the same time. If not, wait for a certain period of time and then determine again until the configuration file exists; The configuration file for network card collection and distribution includes: the network card information to be collected, the table ID where the network card data is stored in the database, the flag whether monitoring is required, the ID of the current server, and the network card information to be monitored; 2) Parse the configuration file content. If the monitoring flag indicates that monitoring is not required, periodically obtain the network card information that needs to be collected from the current server and send it to the table corresponding to the database table ID in the network card data upload server, and update the network card information that needs to be collected in the network card collection and distribution configuration file according to the data in the database; 3) If the monitoring flag is required to be monitored, the network card information that needs to be collected in the distributed configuration file is periodically obtained and compared with the actual network card information of the current server. If there is a change with the actual network card information, the latest network card information of the current server is assembled into an XML message and sent through the message queue to the network card data upload server, and the content in the database is updated; at the same time, the network card information that needs to be monitored is obtained from the network card collection and distributed configuration file, and the static information and dynamic traffic of the network card are obtained by implementing system commands and reading system files, and the data is assembled into an XML message and sent through the message queue to the data upload server.
3. The method for collecting operation status information of a dispatching automation system according to claim 1 is characterized in that: The host information collection method includes: obtaining CPU information, disk information, and memory information through system files, obtaining disk utilization through system commands, obtaining the number of processes through the content in the system's / proc / directory, obtaining the number of occupied socket connections through system files, obtaining the physical memory usage occupied by swap partitions and shared memory through system commands, obtaining shared memory usage through system files, and organizing messages to be sent to a data upload server through a message queue.
4. The method for collecting operation status information of a dispatching automation system according to claim 1 is characterized in that: The method for collecting process information of a set number of bits before occupying system resources includes: obtaining process information through system files, the process information including: disk read and write speeds, CPU usage, and memory usage, sorting the obtained process information, obtaining four corresponding groups of process information of a set number of bits before occupying system resources, and organizing messages to be sent to a data upload server through a message queue.
5. The method for collecting operation status information of a dispatching automation system according to claim 1 is characterized in that: The dispatching automation system agent information collection method comprises: Register the exit signal processing function, load the host information, read the proxy distribution configuration file to obtain the proxy information that needs to be monitored, read the data upload configuration file to obtain the IP and port of the data upload server. If the contents of the read proxy distribution configuration file and the data upload configuration file are correct, call the corresponding interface to collect the service name, system ID, port number, load balancing, and number of connections of the service bus; collect the message bus name, state name, application name, number of message accumulation, and number of sent and received messages of the message bus; collect the real-time database name, table record usage rate, and number of real-time library process accesses of the real-time database; collect the application name, current state, refresh state, and switching state of the application; collect the process object ID, process importance level, process running time, process start time, number of file descriptors occupied by the process, number of threads owned, and number of process core dump files; organize the message to be sent to the upload server through the message queue.
6. The method for collecting operation status information of a dispatching automation system according to claim 1, characterized in that: The IPMI firmware alarm information collection method comprises: loading the modprobe ipmi_devintf and modprobeipmi_si modules of IPMI, judging whether the loading is successful, directly exiting if the loading fails, and if successful, loading a data uploading configuration file, obtaining an uploading server IP and port, and initializing the alarm information in the data uploading server; obtaining a system log through a system command, storing it in a cache, making a judgment based on the obtained log content, and sending the alarm data or alarm recovery data in the log to the uploading server.
7. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the methods for collecting operating status information of a dispatching automation system according to claims 1 to 6.
8. A computing device, characterized in that: include, One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods for collecting operating status information of a scheduling automation system as described in claims 1 to 6.
Citation Information
Patent Citations
Configurable monitoring system and monitoring method for distributed type mainframe performance testing data
CN103326902A
Data monitoring method, device and cloud platform server
CN109587264A
