Method and system for collecting CPU (Central Processing Unit) overhigh information of application program of DCS (Distributed Control System) upper computer

By configuring CPU quotas and dynamically adjusting resource quotas in the DCS host computer, abnormal CPU usage can be automatically identified and system information can be collected, solving the problem of lack of automatic identification and information collection in the existing technology, and improving the reliability and maintenance efficiency of the system.

CN120973620APending Publication Date: 2025-11-18YANCHI ZHONGYING CHUANGNENG NEW ENERGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies lack an automatic identification and information collection mechanism for sudden high CPU usage in DCS host computer applications, making it difficult to locate problems and affecting system reliability and maintenance efficiency.

Method used

By configuring the CPU quota of processes, resource quotas can be dynamically adjusted, and when CPU usage is abnormal, an information collection script with system administrator privileges can be triggered to record system resource usage and generate a detailed report.

Benefits of technology

It enables automatic identification and information collection of processes with excessive CPU usage, provides comprehensive system status data, helps to quickly locate the root cause of problems, and improves the maintainability and stability of the DCS host computer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973620A_ABST
    Figure CN120973620A_ABST
Patent Text Reader

Abstract

The invention discloses a DCS upper computer application program CPU overhigh information collection method and system, and belongs to the technical field of distributed control systems. The method comprises the steps that the CPU resource requirement of each upper computer process is determined according to the actual operation condition; configuring a corresponding CPU quota for each process to form a quota configuration file; dynamically adjusting quota configuration according to the CPU, the memory, the hard disk and the business volume of the upper computer; and storing and loading the quota configuration file to an upper computer. The upper computer configures a resource monitoring process, periodically scans the CPU occupation condition of each process, when the CPU occupation of any process continuously exceeds the quota setting time, automatically triggers an information collection script, records the system resource use condition, including the CPU, the memory, the hard disk, the IO resource and other information, and executes resource statistics and packages a log after the abnormal process returns to normal. According to the method, the CPU resource occupation condition of the application program of the DCS upper computer can be effectively monitored, abnormal information is collected in time, and a basis is provided for system optimization and fault analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed control systems (DCS), specifically to a method and system for collecting high CPU usage information in DCS host computer applications. Background Technology Distributed control systems (DCS) are widely used control systems in the field of industrial automation. The host computer, as the core component of the system, undertakes important functions such as data acquisition, processing, storage, and human-machine interaction. With the continuous improvement of industrial automation, the stability of the DCS host computer has a crucial impact on the safety and efficiency of the entire production process.

[0002] During the operation of a DCS system, the CPU utilization rate of the host computer application is a crucial indicator of system performance and stability. A sudden spike in CPU utilization in a particular application can lead to sluggish system response, operational delays, and even system crashes, negatively impacting the production process. Therefore, monitoring and collecting information on the CPU utilization of DCS host computer applications is of paramount importance.

[0003] Currently, technologies for system resource management and monitoring have seen some development. For example, CN118535327A discloses a method and apparatus for dynamically limiting offline task resources in offline mixed deployment. This method continuously monitors the cgroup kernel interface, captures resource update events in real time, and dynamically adjusts the resource quotas of offline tasks, setting individual CPU and memory resource limits for each offline task to form hard resource constraints. CN116578384A proposes a method for dynamically adjusting resource quotas, which dynamically adjusts the CGroups resource quotas of system Pods through a CGroups dynamic controller to meet operational requirements.

[0004] Regarding CPU resource allocation, CN114153612B discloses a dynamic CPU resource allocation method to improve the overall system throughput. This method can measure the CPU resource requirements of processes in real time, quantify the CPU resource consumption of processes during runtime, and perform reasonable CPU resource allocation within and between process groups based on the different CPU requirements of ready processes in the system. This method can ensure that processes with higher CPU requirements receive higher priority processing, thereby improving the overall system throughput while ensuring real-time performance.

[0005] For monitoring DCS host computers, CN119248610A proposes a method and system for monitoring CPU and memory usage in DCS host computers. This method obtains real-time information on CPU and memory usage by running the `top` command and saves the information to a log file in a specified path. Then, a visualization program is used to display the CPU and memory usage trend graphs of the processes. CN109542603B proposes a multi-dimensional resource isolation system to improve the isolation between tasks of different priorities. This system includes a multi-dimensional resource occupancy modeling module, a real-time resource usage prediction module, and a multi-dimensional resource isolation control module, which can adjust the isolation quotas for tasks of different priorities.

[0006] However, existing technologies have the following shortcomings: First, most monitoring methods focus primarily on real-time monitoring and display, lacking mechanisms for automatic identification and information collection of anomalies; second, existing resource quota management methods are typically static configurations or dynamic adjustments based on simple rules, failing to fully consider the specific business needs of DCS systems; third, when abnormal CPU usage occurs, existing technologies lack comprehensive system information collection capabilities, failing to provide sufficient data support for subsequent problem analysis; and finally, most existing technologies require manual intervention to collect and analyze system information, failing to automatically trigger information collection when problems occur, potentially leading to the loss of critical information.

[0007] Especially during the operation of a DCS system, when the host computer application experiences a sudden surge in CPU usage, operators often lack the necessary tools to collect system information. This makes it difficult to accurately pinpoint the root cause of the problem, and to determine whether it is an operator error, a program issue, an operating system problem, or a hardware issue. In such cases, reproducing and resolving the problem becomes extremely difficult, severely impacting system reliability and maintenance efficiency.

[0008] Therefore, there is an urgent need for a method that can automatically monitor the CPU usage of applications during the operation of the DCS host computer and automatically collect comprehensive system information when an anomaly occurs, so as to provide sufficient data support for subsequent problem analysis, while ensuring that the information collection process itself does not impose an additional burden on the system operation. Summary of the Invention

[0009] The purpose of this invention is to overcome the above-mentioned shortcomings and provide a method and system for collecting information on excessive CPU usage in DCS host computer applications.

[0010] To achieve the above objectives, the present invention adopts the following technical solution: The first method, provided by this invention, is a method for collecting high CPU information in a DCS host computer application, characterized by comprising the following steps: Determine the CPU resource requirements of each host computer process; Configure corresponding CPU quotas for each process to form a quota configuration file; The quota configuration is dynamically adjusted based on the hardware resources and workload of the host computer. When the CPU usage of any process exceeds the preset quota for an extended period of time, an information collection script is triggered with system administrator privileges. The information collection script periodically records the system resource usage. After the CPU utilization of the abnormal process has been continuously lower than the preset recovery time of the quota, information collection is stopped, resource statistics are performed, and all logs are packaged and saved.

[0011] A further technical solution of the present invention is as follows: The specific method for determining the CPU resource requirements of each host computer process is as follows: Obtain the CPU resource usage of each process in each host computer; Different weights are assigned to each process in each higher-level set based on the importance of CPU resource usage, real-time requirements, and overall system resource status. Based on the assigned weights, the CPU resource requirements of each host computer process are obtained.

[0012] A further technical solution of the present invention is as follows: The specific method for dynamically adjusting the quota configuration based on the hardware resources and traffic volume of the host computer is as follows: Obtain historical CPU, memory, and hard disk usage data from the host computer, as well as current trends in DCS system workload. Predict CPU, memory, and hard disk usage based on current DCS system traffic trends; Based on the forecast results and combined with historical CPU, memory, and hard drive usage, the quota configuration is adjusted according to the CPU, memory, and hard drive usage.

[0013] A further technical solution of the present invention is: the information collection script records the basic information of the host computer every second, including basic information such as CPU, hard disk, memory, and operating system, and writes the current basic information of the host computer into info.log.

[0014] A further technical solution of the present invention is: an information collection script is used to identify and record other processes that have an interaction relationship with the abnormal process, and to analyze resource competition or collaborative messages based on the interaction relationship.

[0015] Secondly, the present invention provides a DCS host computer application CPU high-frequency information collection system, characterized in that it includes: The resource requirements analysis module is used to determine the CPU resource requirements of each host computer process; The CPU quota configuration module is used to configure the corresponding CPU quota for each process and form a quota configuration file. The quota dynamic adjustment module is used to dynamically adjust the quota configuration based on the hardware resources and business volume of the host computer. The information collection script trigger module is used to trigger the information collection script with system administrator privileges when the CPU usage of any process exceeds the quota preset time for a continuous period of time. The information collection script periodically records the system resource usage. The log generation module is used to stop information collection, perform resource statistics, package and save all logs after the CPU utilization of an abnormal process has been continuously lower than the preset recovery time of the quota.

[0016] A further technical solution of the present invention is that the function of the resource demand analysis module is implemented through the following method: Obtain the CPU resource usage of each process in each host computer; Different weights are assigned to each process in each higher-level set based on the importance of CPU resource usage, real-time requirements, and overall system resource status. Based on the assigned weights, the CPU resource requirements of each host computer process are obtained.

[0017] A further technical solution of the present invention is that the function of the quota dynamic adjustment module is implemented through the following method: Obtain historical CPU, memory, and hard disk usage data from the host computer, as well as current trends in DCS system workload. Predict CPU, memory, and hard disk usage based on current DCS system traffic trends; Based on the forecast results and combined with historical CPU, memory, and hard drive usage, the quota configuration is adjusted according to the CPU, memory, and hard drive usage.

[0018] A further technical solution of the present invention is: in the information collection script triggering module, the information collection script is used to identify and record other processes that have an interaction relationship with the abnormal process, and analyze resource competition or cooperation messages based on the interaction relationship.

[0019] Thirdly, the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a method for collecting high CPU information in a DCS host computer application.

[0020] Thirdly, the present invention provides a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of a method for collecting high CPU information in a DCS host computer application.

[0021] The technical solution of this invention has the following beneficial effects: This invention configures CPU quotas for each process on the host computer and monitors the resource usage of processes exceeding the quotas in real time. This allows for real-time monitoring of CPU usage across all processes on the host computer while consuming minimal system resources. It automatically identifies processes with excessive CPU usage and promptly initiates information collection scripts. It comprehensively collects system operating status information, including multi-dimensional data such as CPU, memory, I / O, disk, and network. It generates detailed resource usage reports for maintenance personnel to analyze, helping to quickly pinpoint the root cause of problems. It solves the problem of difficulty in identifying the responsible party, clearly distinguishing between operator errors and issues with the program, operating system, or hardware. It improves the maintainability and stability of the DCS host computer system and reduces the impact of system anomalies caused by excessive CPU usage on the normal operation of the unit. Attached Figure Description

[0022] Figure 1 This is a flowchart of the present invention; Figure 2 This is a system diagram of the present invention. Detailed Implementation

[0023] To further understand the content of this invention, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments are merely illustrative and not limiting of the invention.

[0024] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0025] See Figure 1 The method for collecting high CPU usage information in a DCS host computer application includes the following steps: S1 determines the CPU resource requirements of each host computer process.

[0026] S2 configures the corresponding CPU quota for each process, forming a quota configuration file.

[0027] S3 dynamically adjusts the quota configuration based on the host computer's hardware resources and workload.

[0028] S4: When the CPU usage of any process exceeds the preset quota for an extended period of time, the information collection script is triggered with system administrator privileges. The information collection script periodically records the system resource usage.

[0029] S5 stops information collection and performs resource statistics after the CPU utilization of the abnormal process has been continuously lower than the preset recovery time of the quota. It also packages and saves all logs.

[0030] See Figure 2 The DCS host computer application CPU high-frequency information collection system includes: The resource requirements analysis module is used to determine the CPU resource requirements of each host computer process.

[0031] The CPU quota configuration module is used to configure the corresponding CPU quota for each process, forming a quota configuration file.

[0032] The quota dynamic adjustment module is used to dynamically adjust the quota configuration based on the hardware resources and business volume of the host computer.

[0033] The information collection script trigger module is used to trigger the information collection script with system administrator privileges when the CPU usage of any process exceeds the quota preset time for a continuous period of time. The information collection script periodically records the system resource usage.

[0034] The log generation module is used to stop information collection, perform resource statistics, package and save all logs after the CPU utilization of an abnormal process has been continuously lower than the preset recovery time of the quota.

[0035] Example 1: The method for collecting high CPU information in DCS host computer applications includes the following steps: Step 1: Determine the CPU resource requirements of each host computer process based on the actual operating conditions; Specifically, in a DCS system, the host computer runs multiple application processes, including but not limited to operator station processes, engineer station processes, historical station processes, alarm management processes, and data acquisition processes. By monitoring and analyzing the operation of these processes under different operating conditions, the CPU resources required for each process under normal operating conditions can be determined.

[0036] The monitoring methods include: during the normal operation of the DCS system, using the system's built-in performance monitoring tools, such as the Performance Monitor in Windows or the top command in Linux, to continuously monitor the CPU usage of processes for at least 7 days, recording the average, peak, and fluctuation range of CPU usage for each process. Simultaneously, considering the business characteristics of the DCS system, the differences in CPU resource requirements of each process under different time periods (e.g., day shift, night shift) and different operating conditions (e.g., running, stopped, normal operation) are analyzed.

[0037] For critical processes, such as real-time data processing processes and control algorithm execution processes, more detailed analysis is required to ensure that sufficient CPU resources are allocated to them in order to guarantee the real-time performance and stability of the system.

[0038] Step 2: Configure corresponding CPU quotas for each process to create a quota configuration file; Based on the CPU resource requirements of each process determined in Step 1, configure a corresponding CPU quota for each process. Quota settings should consider the importance of the process, real-time requirements, and the overall system resource status.

[0039] The quota configuration file is in XML format and contains the following key information: Process Name: Identifies the process that requires CPU quota management. Process ID: Used to uniquely identify a process in the system. CPU quota limit: Sets the maximum percentage of CPU that a process can use. Warning threshold: A warning is issued when the CPU utilization of a process reaches this threshold. Abnormal Duration: The time threshold during which a process's CPU utilization continuously exceeds the quota will trigger information collection. Recovery threshold: When the CPU usage of an abnormal process drops below this threshold, the process is considered to have recovered. Recovery duration: The time during which the process's CPU utilization remains below the recovery threshold; information collection will cease after this time.

[0040] Step 3: Dynamically adjust the quota configuration based on the host computer's CPU, memory, hard disk, and workload; Quota configurations are not static and need to be dynamically adjusted based on the hardware resources of the host computer and the workload. The specific adjustment method is as follows: CPU resource adjustment: Regularly check the overall CPU utilization of the host computer. When the system CPU utilization remains high for a long time (e.g., averaging over 80%), it is necessary to reassess the CPU quota for each process, appropriately reduce the quota for non-critical processes, and ensure that critical processes have sufficient CPU resources.

[0041] Impact of memory resources: Monitor system memory usage. When available memory is insufficient (e.g., below 20% of total memory), it may lead to frequent memory page swapping, affecting CPU performance. In this case, it is necessary to appropriately reduce the CPU quota for memory-intensive processes to reduce the system load.

[0042] Impact of hard disk resources: Monitor the hard disk I / O utilization and remaining space of the system. When the hard disk I / O load is too high or the remaining space is insufficient, it may affect the performance of processes that rely on disk operations, and the CPU quota of these processes needs to be adjusted accordingly.

[0043] Traffic volume adjustment: Based on changes in the DCS system's traffic volume (such as an increase in the number of control points, growth in historical data storage, changes in alarm frequency, etc.), dynamically adjust the CPU quotas of relevant processes. For example, after system expansion, more CPU resources need to be allocated to the data acquisition process.

[0044] Adjustment frequency: Under normal circumstances, quotas are assessed and adjusted monthly; when system hardware is upgraded, software version is updated, or business volume changes significantly, assessment and adjustment should be carried out immediately.

[0045] Step 4: Save and load the above quota configuration file to the host computer.

[0046] Save the quota configuration files generated and adjusted in steps two and three to a designated directory on the host computer, and ensure that these configurations are automatically loaded when the system starts. The specific implementation method is as follows: Configuration file saving: Save the quota configuration file in XML format to a fixed path on the host computer, such as " / etc / dcs / cpuquota / " or "C:\Program Files\DCS\Config\", and name the file "CPUQuotaConfig.xml". Also, to prevent the configuration file from being lost, save a copy in the system backup directory.

[0047] Configuration file loading: When the host computer operating system starts, the quota configuration file is automatically loaded via a startup script or system service. In Windows systems, this can be done by creating a system service; in Linux systems, it can be added to the systemd service or the rc.local startup script.

[0048] Configuration file verification: Before loading the quota configuration file, verify the file integrity and format correctness to ensure that the configuration file has not been corrupted or tampered with. If verification fails, load the backup configuration file; if the backup file also cannot be loaded, use the default configuration.

[0049] Access control: Ensure that only system administrators or users with the appropriate permissions can modify the quota configuration file to prevent unauthorized modifications from causing system instability.

[0050] Configuration update mechanism: When the quota configuration file is modified, a mechanism is provided to make the new configuration take effect without restarting the system, such as triggering configuration reloading by sending a specific signal to the resource monitoring process.

[0051] The host computer configures a resource monitoring process, which, upon startup, loads the quota configuration file and periodically scans the CPU usage of each process. This resource monitoring process is a resident background service responsible for real-time monitoring of resource usage, particularly CPU utilization, across all processes in the system. This process starts automatically when the host computer boots up and loads the quota configuration file generated in the previous steps.

[0052] The main functions of the resource monitoring process include: Configuration loading: At startup, the quota configuration file is read and parsed, and the CPU quota information of each process is loaded into memory.

[0053] Periodic scan: Scans the CPU usage of all processes in the system at preset time intervals (default is 5 seconds). The scan can be performed by calling system APIs or parsing the / proc filesystem (Linux) or performance counters (Windows).

[0054] Data logging: The CPU usage data of the scanned processes is recorded in a memory buffer and written to a log file periodically (e.g., hourly) for subsequent analysis.

[0055] Threshold comparison: The CPU utilization of the scanned processes is compared with the threshold set in the quota configuration to determine whether there are any abnormal situations.

[0056] If any process's CPU usage exceeds the quota setting for an extended period, a data collection script will be automatically triggered with system administrator privileges. The specific implementation method is as follows: Anomaly Detection: When the resource monitoring process detects that the CPU utilization of a process exceeds the warning threshold set in its quota, it begins recording the duration of the anomaly. If the CPU utilization continuously exceeds the quota limit for an anomaly duration set in the configuration file (e.g., 300 seconds), it is determined to be an anomaly.

[0057] Privilege escalation: The resource monitoring process escalates to system administrator privileges through mechanisms provided by the operating system (such as sudo, UAC, etc.) to ensure access to all system resource information.

[0058] Script Trigger: Automatically triggers the information collection script with system administrator privileges. The script can be a Shell script (Linux) or PowerShell script (Windows) and is stored in a predefined system path.

[0059] Trigger Record: When the information collection script is triggered, the trigger time, trigger reason (which process exceeded the CPU quota) and a summary of the system status at that time are recorded to facilitate subsequent analysis.

[0060] The information collection script periodically records basic information about the host computer's CPU, hard disk, memory, and operating system. Once triggered, the script begins periodically (every 30 seconds by default) collecting information on the host computer's system resource usage, specifically including: CPU information collection: Records overall CPU utilization, utilization of each core, distribution of system / user / IO wait time, run queue length, etc.

[0061] Hard disk information collection: Records the space usage of each partition, I / O read / write speed, average response time, current I / O queue length, etc.

[0062] Memory information collection: Records physical memory usage, available memory size, page swapping frequency, cache usage, etc.

[0063] Operating system basic information: Records operating system version, kernel version, boot time, average system load, number of running processes, etc.

[0064] This information is recorded in a dedicated log file, with the filename including the trigger time and the name of the abnormal process, facilitating subsequent searching and analysis.

[0065] The script periodically records the CPU and memory usage of abnormal processes. In addition to recording overall system resource usage, the information collection script also focuses on the process that triggered the anomaly, periodically recording its detailed resource usage. CPU utilization monitoring: Records the real-time CPU utilization, historical trends, and CPU core distribution of abnormal processes.

[0066] Memory usage monitoring: Records the real-time memory usage of abnormal processes, memory allocation trends, and analyzes the possibility of memory leaks.

[0067] Process status monitoring: Records information such as the running status, number of threads, number of handles, and priority of abnormal processes.

[0068] Dependency analysis: Record other processes that interact with the abnormal process to analyze possible resource contention or deadlock situations.

[0069] This information is recorded in a structured format, making it easier to analyze later using automated tools to identify the causes of anomalies.

[0070] The script periodically records the top ten processes consuming the most I / O resources, their read / write speeds, disk usage, and real-time network interface traffic. To gain a comprehensive understanding of system resource usage, the script also collects the following information: IO resource monitoring: At regular intervals (e.g., every 60 seconds), identify the top ten processes in the current system that consume the most IO resources, and record their process ID, name, read / write rate (KB / s), IO wait time, etc.

[0071] Disk usage: Records information such as the usage rate, remaining space, file system type, and mount point of each disk partition in the system, as well as disk read and write performance indicators such as IOPS, throughput, and response time.

[0072] Network interface monitoring: Records real-time traffic, packet transmission rate, number of error packets, packet loss rate, and other information of each network interface of the system, as well as the network connection status related to communication with the DCS system.

[0073] This information helps determine whether abnormal CPU utilization is caused by I / O resource contention or network communication problems.

[0074] When the CPU utilization of an abnormal process continuously falls below the quota-set recovery time, the system resource statistics command `sar` is automatically executed to analyze the usage of CPU, memory, and I / O resources, and all logs are packaged, compressed, and stored in a preset path. The specific implementation is as follows: Recovery judgment: The information collection script continuously monitors the CPU usage of abnormal processes. When the CPU usage is continuously lower than the recovery threshold set in the configuration file (e.g., 20%) for a recovery duration (e.g., 600 seconds), the process is judged to have recovered to normal.

[0075] The `sar` command automatically executes after determining that a process has recovered, collecting detailed statistics on system resource usage from the start of the anomaly to recovery. In Linux systems, the `sar` command is used directly; in Windows systems, a similar performance monitoring tool can be used.

[0076] Statistical scope: The sar command provides statistics on various aspects of system resource usage, including CPU utilization, memory usage, disk I / O activity, network activity, and process activity, offering comprehensive performance analysis data.

[0077] Log packaging: Package and compress all log files collected during the entire anomaly monitoring period, including process CPU usage records, system resource usage records, sar statistics results, etc., into a single file (such as zip or tar.gz format).

[0078] Storage path: Store the packaged log files in a preset path, such as " / var / log / dcs / cpumonitor / " or "C:\Program Files\DCS\Logs\CPUMonitor\", with the filename including the date and time of the exception and the name of the exception process, for easy retrieval and analysis later.

[0079] Notification mechanism: After the logs are packaged and stored, the system administrator is notified through a preset notification mechanism (such as email, SMS, system notification, etc.), providing an exception summary and the location of the log files.

[0080] Example 2: A DCS host computer application CPU over-high information collection system includes: a resource demand analysis module, used to determine the CPU resource demand of each host computer process based on actual operating conditions; a CPU quota configuration module, used to configure corresponding CPU quotas for each process to form a quota configuration file; a quota dynamic adjustment module, used to dynamically adjust the quota configuration based on the host computer's CPU, memory, hard disk and workload; and a quota loading module, used to save and load the above quota configuration file to the host computer.

[0081] The resource requirements analysis module is a standalone software component responsible for analyzing the CPU resource requirements of each process on the DCS host computer. It operates as follows: Data Acquisition Function: This module can automatically collect CPU usage data for each process in the DCS host computer system. The acquisition cycle is configurable, with a default of once every 5 seconds. The collected data includes process ID, process name, CPU utilization, memory usage, etc.

[0082] Historical data storage: The collected data is stored in a local database, retaining at least 30 days of historical data for long-term trend analysis.

[0083] Statistical analysis function: Performs statistical analysis on the collected historical data and calculates statistical indicators such as the average, maximum, minimum, and standard deviation of CPU utilization for each process at different time periods.

[0084] Operating condition correlation analysis: Correlation analysis is performed between the CPU usage of processes and the operating conditions of the DCS system (such as start-up, shutdown, normal operation, etc.) to identify the resource demand characteristics of each process under different operating conditions.

[0085] Resource demand modeling: Based on the results of statistical analysis and working condition correlation analysis, a CPU resource demand model for each process is established to predict resource demand under different conditions.

[0086] Report generation function: Generates detailed resource demand analysis reports, including resource usage characteristics of each process, anomaly analysis, resource demand forecasts, etc.

[0087] The CPU quota configuration module is responsible for configuring appropriate CPU quotas for each process based on resource demand analysis results. Specific functions include: Quota calculation function: Based on data provided by the resource demand analysis module, calculates the reasonable CPU quota for each process. The calculation takes into account factors such as process importance, real-time requirements, and overall system resources.

[0088] Quota verification function: Verifies the calculated quota to ensure that the quota setting does not lead to excessive allocation of system resources or insufficient resources for critical processes.

[0089] Configuration file generation: Generates a standard-format configuration file from the calculated and verified quota information, supporting multiple formats such as XML and JSON.

[0090] Configuration Template Management: Provides a variety of preset quota configuration templates suitable for DCS systems of different sizes and types. Users can choose a suitable template as a basis for customization.

[0091] User interface: Provides a graphical interface that allows system administrators to view and manually adjust the CPU quota settings for each process.

[0092] The specific implementation of the quota dynamic adjustment module: This module is responsible for dynamically adjusting the CPU quota configuration based on the system's operating status. Specific functions include: Real-time monitoring function: Continuously monitors the CPU, memory, and hard disk usage of the host computer, as well as changes in the workload of the DCS system.

[0093] Resource assessment function: Periodically (e.g., hourly) assesses the system's resource usage to determine whether the current quota settings are reasonable.

[0094] Automatic adjustment algorithm: Automatically calculates new quota settings based on preset rules and thresholds. For example, when the overall system CPU utilization exceeds 90% for 30 minutes, the quota for non-critical processes is reduced.

[0095] Manual adjustment interface: Provides an interface that allows system administrators to manually trigger quota adjustments under special circumstances.

[0096] Adjustment history: Records all quota adjustment history, including adjustment time, adjustment reason, quota value before and after adjustment, etc.

[0097] Rollback mechanism: When quota adjustments cause a decrease in system performance, the system can automatically roll back to the previous quota settings.

[0098] The quota loading module is responsible for saving and loading the quota configuration file into the host computer system. Its specific functions include: Save the quota configuration file: Save the quota configuration file to the specified path and maintain backups of multiple versions of the configuration file.

[0099] Configuration file loading: The quota configuration file is loaded into memory when the system starts up or when the configuration is updated.

[0100] Access control: Ensure that only authorized users can modify and load quota configuration files.

[0101] Configuration verification: Before loading the configuration file, verify the integrity and correct format of the file.

[0102] Hot reloading support: Supports reloading updated quota configurations without restarting the system.

[0103] Configuration synchronization: In a multi-server environment, quota configurations can be synchronized to all relevant servers.

[0104] System Integration: The system's four modules are tightly integrated to form a complete closed-loop management system. The resource requirements analysis module provides the data foundation, the CPU quota configuration module generates the initial configuration, the quota dynamic adjustment module optimizes the configuration based on operational conditions, and the quota loading module ensures the configuration takes effect. The entire system is controlled through a unified management interface, providing comprehensive logging and reporting functions to help system administrators understand and optimize resource usage on the DCS host computer.

[0105] It should be noted that both Embodiment 1 and Embodiment 2 are methods for collecting high CPU information in DCS host computer applications.

[0106] Example 3: The present invention also provides an electronic device 100 for collecting information on excessive CPU usage in a DCS host computer application; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.

[0107] The memory 101 can be used to store the computer program 103. The processor 102 implements the steps of the DCS host computer application CPU high information collection method described in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.

[0108] The at least one processor 102 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor. The processor 102 is the control center of the electronic device 100, connecting various parts of the electronic device 100 via various interfaces and lines.

[0109] The memory 101 in the electronic device 100 stores multiple instructions to implement a method for collecting high CPU information in a DCS host computer application, and the processor 102 can execute the multiple instructions to achieve the following: Determine the CPU resource requirements of each host computer process; Configure corresponding CPU quotas for each process to form a quota configuration file; The quota configuration is dynamically adjusted based on the hardware resources and workload of the host computer. When the CPU usage of any process exceeds the preset quota for an extended period of time, an information collection script is triggered with system administrator privileges. The information collection script periodically records the system resource usage. After the CPU utilization of the abnormal process has been continuously lower than the preset recovery time of the quota, information collection is stopped, resource statistics are performed, and all logs are packaged and saved.

[0110] Example 4: If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0111] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0112] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0113] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0114] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for collecting CPU high information of a DCS host computer application program, characterized in that, The method comprises the following steps: determining CPU resource requirement of each host process; configuring corresponding CPU quota for each process to form a quota configuration file; dynamically adjusting the quota configuration according to hardware resources and business volume of the host computer; when CPU occupancy of any process continuously exceeds the quota for a preset time, triggering an information collection script with system administrator authority, and the information collection script periodically records system resource usage; when CPU occupancy rate of the abnormal process continuously falls below the quota for a preset recovery time, stopping information collection and performing resource statistics, and packaging and saving all logs.

2. The DCS host application CPU overheat information collection method of claim 1, wherein, The specific method for determining the CPU resource requirement of each host process is as follows: obtaining CPU resource usage of each process in each host computer; according to importance, real-time requirement and overall system resource status of CPU resource usage of each process in each host computer, different weights are given; according to the given weights, the CPU resource requirement of each host process is obtained.

3. The DCS host application CPU overheat information collection method of claim 1, wherein, The specific method for dynamically adjusting the quota configuration according to hardware resources and business volume of the host computer is as follows: obtaining historical CPU, memory and hard disk usage of the host computer and current DCS system business volume change trend; according to the current DCS system business volume change trend, predicting the CPU, memory and hard disk usage; according to the prediction result, combining the historical CPU, memory and hard disk usage, adjusting the quota configuration of the CPU, memory and hard disk usage.

4. The DCS host application CPU overheat information collection method of claim 1, wherein, The information collection script is used to identify and record other processes having interaction relationship with the abnormal process, and analyze resource competition or cooperation messages according to the interaction relationship.

5. A DCS host computer application program CPU high information collection system, characterized in that, It comprises: a resource requirement analysis module for determining the CPU resource requirement of each host process; a CPU quota configuration module for configuring corresponding CPU quota for each process to form a quota configuration file; a quota dynamic adjustment module for dynamically adjusting the quota configuration according to hardware resources and business volume of the host computer; an information collection script triggering module for triggering the information collection script with system administrator authority when CPU occupancy of any process continuously exceeds the quota for a preset time, and the information collection script periodically records system resource usage; a log generation module for stopping information collection and performing resource statistics, packaging and saving all logs when CPU occupancy rate of the abnormal process continuously falls below the quota for a preset recovery time.

6. The DCS host application CPU over-ride information collection system of claim 5 wherein, The function of the resource requirement analysis module is realized by the following method: obtaining CPU resource usage of each process in each host computer; according to importance, real-time requirement and overall system resource status of CPU resource usage of each process in each host computer, different weights are given; according to the given weights, the CPU resource requirement of each host process is obtained.

7. The DCS host application CPU over-ride message collection system of claim 5 wherein, The function of the quota dynamic adjustment module is realized by the following method: obtaining historical CPU, memory and hard disk usage of the host computer and current DCS system business volume change trend; according to the current DCS system business volume change trend, predicting the CPU, memory and hard disk usage; according to the prediction result, combining the historical CPU, memory and hard disk usage, adjusting the quota configuration of the CPU, memory and hard disk usage.

8. The DCS host application CPU over-ride message collection system of claim 5 wherein, In the information collection script triggering module, the information collection script is used to identify and record other processes having interaction with the abnormal process, and analyze resource competition or coordination messages according to the interaction. 9.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The processor executes the computer program to realize the steps of the DCS host computer application CPU overhigh information collection method in any one of claims 1 to 7.

10. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to realize the steps of the DCS host computer application CPU overhigh information collection method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • A multi-dimensional resource isolation system to improve isolation between tasks of different priorities

    CN109542603B

  • Resource quota dynamic adjustment method and device, equipment and storage medium

    CN116578384A