CN112328446B - Program progress monitoring method and device and computer equipment - Google Patents

Program progress monitoring method and device and computer equipment Download PDF

Info

Publication number
CN112328446B
CN112328446B CN202011169733.XA CN202011169733A CN112328446B CN 112328446 B CN112328446 B CN 112328446B CN 202011169733 A CN202011169733 A CN 202011169733A CN 112328446 B CN112328446 B CN 112328446B
Authority
CN
China
Prior art keywords
program process
resource occupation
monitoring
target
statistical map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011169733.XA
Other languages
Chinese (zh)
Other versions
CN112328446A (en
Inventor
宋晓亮
田野
何世伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Anyixun Technology Co ltd
Original Assignee
Chengdu Anyixun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Anyixun Technology Co ltd filed Critical Chengdu Anyixun Technology Co ltd
Priority to CN202011169733.XA priority Critical patent/CN112328446B/en
Publication of CN112328446A publication Critical patent/CN112328446A/en
Application granted granted Critical
Publication of CN112328446B publication Critical patent/CN112328446B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a program process monitoring method, a program process monitoring device and computer equipment, relates to computer equipment, and can solve the problems that the current program process monitoring method is low in intelligentization, poor in flexibility and incapable of meeting the increasing monitoring demands. The method comprises the following steps: determining a target program process to be monitored and a target monitoring mode; acquiring parameter information corresponding to the target program process; and generating a program process monitoring result according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period. The method and the device are suitable for monitoring the program process.

Description

Program progress monitoring method and device and computer equipment
Technical Field
The present application relates to computer devices, and in particular, to a method and apparatus for monitoring a program process, and a computer device.
Background
In order to ensure stable and orderly running of the application program, some means for monitoring and managing are needed to monitor the process resource occupation of the program so as to confirm whether the process resource occupation accords with the expectation, whether memory leakage exists or the problem of overhigh resource occupation exists.
At present, most of monitoring methods for program processes choose to use a task manager or procexp and other third-party tools of the system to monitor, but the tools cannot be unattended, and only current resource occupation data can be displayed, so that the monitoring process is low in intellectualization and poor in flexibility, and the increasingly-growing monitoring demands cannot be met.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus and a computer device for monitoring a program process, which are used for solving the problems that the current method for monitoring a program process has low intelligentization, poor flexibility and cannot meet the increasing monitoring demands.
According to one aspect of the present application, there is provided a method of monitoring a program process, the method comprising:
determining a target program process to be monitored and a target monitoring mode;
acquiring parameter information corresponding to the target program process;
and generating a program process monitoring result according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period.
Preferably, the determining the target program process to be monitored and the target monitoring mode specifically includes:
Receiving a program process monitoring request sent by a user;
Determining a target program process to be monitored according to the identification information carried in the program process monitoring request;
receiving a selection instruction of the user for a first monitoring mode or a second monitoring mode;
And determining a target monitoring mode according to the selection instruction.
Preferably, before the receiving the program process monitoring request sent by the user, the method specifically further includes:
Traversing the current process and determining a program process in a working state;
generating and outputting a program process list according to the program process in the working state, wherein the program process list comprises identification information of the program process;
the receiving the program process monitoring request sent by the user specifically comprises the following steps:
And receiving a program process monitoring request carrying identification information, which is sent by a user according to the program process list.
Preferably, if the target monitoring mode is a first monitoring mode, a program process monitoring result is generated according to the target monitoring mode and the parameter information, where the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period, and the method specifically includes:
generating and outputting a first resource occupation statistical map corresponding to the CPU parameter, a second resource occupation statistical map corresponding to the memory parameter, a third resource occupation statistical map corresponding to the handle parameter, a fourth resource occupation statistical map corresponding to the thread parameter, a fifth resource occupation statistical map corresponding to the GDI object parameter and a sixth resource occupation statistical map corresponding to the user object parameter in real time according to the acquisition time of the parameter information in a preset time period.
Preferably, if the target monitoring mode is the second monitoring mode, a program process monitoring result is generated according to the target monitoring mode and the parameter information, where the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period, and the method specifically includes:
According to the acquisition time of the parameter information, the parameter information is stored in a CSV file;
And when judging that the monitoring corresponding to the target program process is finished, generating and outputting a first resource occupation statistical map corresponding to CPU parameters, a second resource occupation statistical map corresponding to memory parameters, a third resource occupation statistical map corresponding to handle parameters, a fourth resource occupation statistical map corresponding to thread parameters, a fifth resource occupation statistical map corresponding to GDI object parameters and a sixth resource occupation statistical map corresponding to user object parameters according to the parameter information in the CSV file.
Preferably, the method further comprises:
And respectively evaluating and analyzing the target program process based on the first resource occupation statistical map, the second resource occupation statistical map, the third resource occupation statistical map, the fourth resource occupation statistical map, the fifth resource occupation statistical map and the sixth resource occupation statistical map.
Preferably, the evaluating and analyzing the target program process based on the first resource occupation statistical map, the second resource occupation statistical map, the third resource occupation statistical map, the fourth resource occupation statistical map, the fifth resource occupation statistical map and the sixth resource occupation statistical map respectively specifically includes:
determining whether the CPU occupancy rate of the program accords with a first preset standard according to the first resource occupancy statistical graph;
determining whether the memory occupation of the program accords with a second preset standard or not based on the second resource occupation statistical graph and judging whether memory leakage exists or not;
And judging whether the target program process has leakage or not according to the image development trend of the third resource occupation statistical graph and/or the fourth resource occupation statistical graph and/or the fifth resource occupation statistical graph and/or the sixth resource occupation statistical graph.
According to another aspect of the present application, there is provided a monitoring apparatus for a program progress, characterized by comprising:
the determining module is used for determining a target program process to be monitored and a target monitoring mode;
the acquisition module is used for acquiring parameter information corresponding to the target program process;
and the generation module is used for generating a program process monitoring result according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to the resource occupation statistical result of the target program process in a preset time period.
Preferably, the determining module is specifically configured to:
Receiving a program process monitoring request sent by a user;
Determining a target program process to be monitored according to the identification information carried in the program process monitoring request;
receiving a selection instruction of the user for a first monitoring mode or a second monitoring mode;
And determining a target monitoring mode according to the selection instruction.
Preferably, the determining module is specifically configured to:
Traversing the current process and determining a program process in a working state;
generating and outputting a program process list according to the program process in the working state, wherein the program process list comprises identification information of the program process;
And receiving a program process monitoring request carrying identification information, which is sent by a user according to the program process list.
Preferably, if the target monitoring mode is the first monitoring mode, the generating module is specifically configured to:
generating and outputting a first resource occupation statistical map corresponding to the CPU parameter, a second resource occupation statistical map corresponding to the memory parameter, a third resource occupation statistical map corresponding to the handle parameter, a fourth resource occupation statistical map corresponding to the thread parameter, a fifth resource occupation statistical map corresponding to the GDI object parameter and a sixth resource occupation statistical map corresponding to the user object parameter in real time according to the acquisition time of the parameter information in a preset time period.
Preferably, if the target monitoring mode is the second monitoring mode, the generating module is specifically configured to:
According to the acquisition time of the parameter information, the parameter information is stored in a CSV file;
And when judging that the monitoring corresponding to the target program process is finished, generating and outputting a first resource occupation statistical map corresponding to CPU parameters, a second resource occupation statistical map corresponding to memory parameters, a third resource occupation statistical map corresponding to handle parameters, a fourth resource occupation statistical map corresponding to thread parameters, a fifth resource occupation statistical map corresponding to GDI object parameters and a sixth resource occupation statistical map corresponding to user object parameters according to the parameter information in the CSV file.
Preferably, the apparatus further comprises: an analysis module;
And the analysis module is used for respectively carrying out evaluation analysis on the target program process based on the first resource occupation statistical map, the second resource occupation statistical map, the third resource occupation statistical map, the fourth resource occupation statistical map, the fifth resource occupation statistical map and the sixth resource occupation statistical map.
Preferably, the analysis module is specifically configured to:
determining whether the CPU occupancy rate of the program accords with a first preset standard according to the first resource occupancy statistical graph;
determining whether the memory occupation of the program accords with a second preset standard or not based on the second resource occupation statistical graph and judging whether memory leakage exists or not;
And judging whether the target program process has leakage or not according to the image development trend of the third resource occupation statistical graph and/or the fourth resource occupation statistical graph and/or the fifth resource occupation statistical graph and/or the sixth resource occupation statistical graph.
According to yet another aspect of the present application, there is provided a non-volatile readable storage medium having stored thereon a computer program which when executed by a processor implements the method of monitoring a program progress as described above.
According to still another aspect of the present application, there is provided a computer device including a non-volatile readable storage medium, a processor, and a computer program stored on the non-volatile readable storage medium and executable on the processor, the processor implementing the method of monitoring a program process as described above when executing the program.
By means of the technical scheme, compared with the current monitoring mode of the program process, the program process monitoring method, device and computer equipment provided by the application have the advantages that after the monitoring program is operated, the target program process to be monitored and the target monitoring mode are determined by traversing the current process, the parameter information corresponding to the target program process is obtained, and then the program process monitoring result is generated according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to the resource occupation statistical graph of the target program process in the preset time period. In the application, the trend of the resource occupation in the preset time period can be intuitively displayed by generating the resource occupation statistical graph, thereby being convenient for monitoring and analyzing the program process. And by providing two alternative monitoring modes, the flexibility of program process monitoring can be ensured, so that the program process monitoring device can better meet the monitoring requirements of users.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the present application. In the drawings:
fig. 1 is a schematic flow chart of a method for monitoring a program process according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another method for monitoring a program process according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an example of program process monitoring according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a program process monitoring method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a monitoring device for program progress according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another monitoring device for program progress according to an embodiment of the present application.
Detailed Description
The application will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
Aiming at the problems that the current monitoring method for the program process causes lower intelligentization, poorer flexibility and inability to meet the increasing monitoring demand of the monitoring process, the embodiment of the application provides the monitoring method for the program process, as shown in figure 1, which comprises the following steps:
101. and determining the target program process to be monitored and a target monitoring mode.
For this embodiment, in a specific application scenario, when performing resource monitoring on a program process, it is required to receive a target program process and a target monitoring mode selected by a user, so as to perform resource occupation monitoring on the target program process in the target monitoring mode.
The execution main body of the application can be a monitoring system for monitoring the resource occupation of the program process, in the monitoring system, the parameter information of the target application program can be obtained in real time, and in the target monitoring mode, the program process monitoring result of the target application program in a preset time period is generated based on the parameter information.
102. And acquiring parameter information corresponding to the target program process.
The parameter information corresponds to resource monitoring data of a plurality of performance indexes, and the performance indexes can comprise a CPU, a memory, a handle, a thread, a GDI object, a user object and the like.
For this embodiment, in a specific application scenario, parameter information of six dimensions, corresponding to a CPU, a memory, a handle, a thread, a GDI object, and a user object, of a target application program needs to be collected in real time, so that a resource occupation trend under each performance index is analyzed by using the parameter information later.
103. And generating a program process monitoring result according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period.
For the embodiment, in a specific application scenario, by generating the resource occupation interface diagram based on the parameter information, the resource occupation trend of each performance index in the preset time period can be intuitively displayed, so that the target application process can be effectively analyzed.
By the method for monitoring the program process in the embodiment, after the monitoring program is run, the current process is traversed, the target program process to be monitored and the target monitoring mode are determined, parameter information corresponding to the target program process is obtained, and then a program process monitoring result is generated according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to a resource occupation statistical graph of the target program process in a preset time period. In the application, the trend of the resource occupation in the preset time period can be intuitively displayed by generating the resource occupation statistical graph, thereby being convenient for monitoring and analyzing the program process. And by providing two alternative monitoring modes, the flexibility of program process monitoring can be ensured, so that the program process monitoring device can better meet the monitoring requirements of users.
Further, as a refinement and extension of the foregoing embodiment, in order to fully describe the implementation procedure in this embodiment, another method for monitoring a program process is provided, as shown in fig. 2, where the method includes:
201. And receiving a program process monitoring request sent by a user.
For this embodiment, in a specific application scenario, before receiving a program process monitoring request sent by a user, the method specifically further includes: traversing the current process and determining a program process in a working state; and generating and outputting a program process list according to the program process in the working state, wherein the program process list comprises identification information of the program process.
Specifically, in order to facilitate the selection of the target program process by the user, in a specific application scenario, the current process needs to be traversed first, all the program processes in a working state are determined, and then a program process list is generated, so that the user can select the target program process to be monitored in the program process list.
Accordingly, the embodiment step 201 may specifically include: and receiving a program process monitoring request carrying identification information, which is sent by a user according to the program process list.
For this embodiment, after receiving the program process list and selecting the target program process to be monitored, the user side may send a program process monitoring request carrying identification information of the corresponding target program process to the system, so that the system starts a subsequent monitoring process for the target program process.
202. And determining the target program process to be monitored according to the identification information carried in the program process monitoring request.
In a specific application scenario, since each program process is configured with unique identification information, after receiving the program process monitoring request, the system can accurately determine the target program process to be monitored according to the identification information carried in the program process monitoring request.
203. And receiving a selection instruction of a user for the first monitoring mode or the second monitoring mode.
In a specific application scenario, two monitoring modes, namely a first monitoring mode and a second monitoring mode, which can be selected by a user can be configured. The first monitoring mode corresponds to a real-time monitoring mode, namely, a real-time picture occupied by resources is generated according to the parameter information acquired in real time; the second monitoring mode corresponds to a background monitoring mode, namely, after the acquired parameter information, a resource occupation picture is not generated immediately, and when the monitoring is finished, the resource occupation picture in a preset time period is generated at one time according to the stored parameter information.
204. And determining a target monitoring mode according to the selection instruction.
In a specific application scene, the background monitoring mode is opposite to the real-time monitoring mode, so that the resource occupation of the program can be effectively reduced. After receiving the selection instruction of the user for the first monitoring mode or the second monitoring mode, the system can determine a target monitoring mode for monitoring the target application program according to the selection instruction.
205. And acquiring parameter information corresponding to the target program process.
For this embodiment, the system may collect, in real time, parameter information under performance indexes of the CPU, the memory, the handle, the thread, the GDI object, and the user object 6 corresponding to the target application program, so as to generate a resource occupation picture corresponding to each performance index, and analyze the resource occupation situation according to the resource occupation picture.
206A, if the target monitoring mode is the first monitoring mode, generating and outputting a first resource occupation statistical map corresponding to the CPU parameter, a second resource occupation statistical map corresponding to the memory parameter, a third resource occupation statistical map corresponding to the handle parameter, a fourth resource occupation statistical map corresponding to the thread parameter, a fifth resource occupation statistical map corresponding to the GDI object parameter, and a sixth resource occupation statistical map corresponding to the user object parameter in real time according to the acquisition time of the parameter information in the preset time period.
For this embodiment, when the User selects the first monitoring mode as the target monitoring mode, a real-time picture of the resource occupation can be generated according to the parameter information, specifically, as shown in fig. 3, the real-time picture includes a first resource occupation statistical map corresponding to a CPU parameter, a second resource occupation statistical map corresponding to a Memory parameter (Memory), a third resource occupation statistical map corresponding to a Handle parameter (Handle), a fourth resource occupation statistical map corresponding to a Thread parameter (Thread), a fifth resource occupation statistical map corresponding to a GDI Object parameter (GDI Object), and a sixth resource occupation statistical map corresponding to a User Object parameter (User Object).
In the embodiment step 206b corresponding to the embodiment step 206a, if the target monitoring mode is the second monitoring mode, the parameter information is stored in the CSV file according to the collection time of the parameter information.
For this embodiment, when the user selects the second monitoring mode as the target monitoring mode, the parameter information collected in real time may be written into the CSV file. Wherein the CSV file is an acronym for comma separated file (Comma Separated Values), a plain text format used to store data, commonly used in electronic form or database software. In a CSV file, the data "columns" are separated by commas, allowing the program to recreate the correct column structure for the data by reading the file, and to start a new column each time a comma is encountered.
207B, when the monitoring corresponding to the target program process is judged to be finished, generating and outputting a first resource occupation statistical map corresponding to the CPU parameter, a second resource occupation statistical map corresponding to the memory parameter, a third resource occupation statistical map corresponding to the handle parameter, a fourth resource occupation statistical map corresponding to the thread parameter, a fifth resource occupation statistical map corresponding to the GDI object parameter and a sixth resource occupation statistical map corresponding to the user object parameter according to the parameter information in the CSV file.
For the embodiment, when it is determined that the monitoring corresponding to the target program process is finished, a resource occupation statistical map may be generated according to parameter information in a preset time period stored in the CSV file, and specifically, as shown in fig. 3, the resource occupation statistical map includes a first resource occupation statistical map corresponding to a CPU parameter, a second resource occupation statistical map corresponding to a Memory parameter (Memory), a third resource occupation statistical map corresponding to a Handle parameter (Handle), a fourth resource occupation statistical map corresponding to a Thread parameter (Thread), a fifth resource occupation statistical map corresponding to a GDI Object parameter (GDI Object), and a sixth resource occupation statistical map corresponding to a User Object parameter (User Object).
208. And respectively evaluating and analyzing the target program process based on the first resource occupation statistical map, the second resource occupation statistical map, the third resource occupation statistical map, the fourth resource occupation statistical map, the fifth resource occupation statistical map and the sixth resource occupation statistical map.
For the present embodiment, in a specific application scenario, the embodiment step 208 may specifically include: determining whether the CPU occupancy rate of the target program process accords with a first preset standard according to the first resource occupancy statistical graph; determining whether the memory occupation of the target program process accords with a second preset standard or not based on the second resource occupation statistical graph and judging whether memory leakage exists or not; and judging whether the target program process has leakage or not according to the image development trend of the third resource occupation statistical image and/or the fourth resource occupation statistical image and/or the fifth resource occupation statistical image and/or the sixth resource occupation statistical image.
Specifically, since the occupied memory is larger than the preset threshold value, the computer is blocked, so that whether the CPU occupancy rate meets the first preset standard can be determined by setting the CPU occupancy threshold value, and whether the memory occupancy meets the second preset standard can be determined by setting the memory occupancy threshold value. When the CPU occupancy rate is continuously smaller than the CPU occupancy threshold value, the CPU occupancy rate of the target program process can be judged to accord with a first preset standard. Correspondingly, when the memory occupation is judged to be continuously smaller than the memory occupation threshold value, the memory occupation can be judged to accord with a second preset standard. In addition, whether leakage exists in the target program process can be judged through the image change trend in the resource occupation statistical graph, and specifically, when the regular rising trend is judged, the occurrence of leakage can be judged. In this embodiment, whether the target program process has memory leakage may be determined by analyzing the image change trend in the second resource occupation statistical chart; and judging whether the target program process has leakage of other parameters or not by analyzing the image development trend of the third resource occupation statistical graph and/or the fourth resource occupation statistical graph and/or the fifth resource occupation statistical graph and/or the sixth resource occupation statistical graph.
By the method for monitoring the program process, after the monitoring program is operated, the target program process and the target monitoring mode to be monitored are determined by traversing the current process, parameter information corresponding to the target program process is acquired, and then a program process monitoring result is generated according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to a resource occupation statistical graph of the target program process in a preset time period. In the application, the trend of the resource occupation in the preset time period can be intuitively displayed by generating the resource occupation statistical graph, thereby being convenient for monitoring and analyzing the program process. And by providing two alternative monitoring modes, the flexibility of program process monitoring can be ensured, so that the program process monitoring device can better meet the monitoring requirements of users.
In a specific application scenario, the method for monitoring a program process may specifically refer to a schematic diagram shown in fig. 4, after the monitoring program is run, the program process in a working state may be determined by continuously traversing the current process, and a program process list is generated for selection by a user, and then a target program process is determined according to a user selection instruction. And displaying the process resource occupation condition in real time according to the target monitoring mode selected by the user, or storing the process resource occupation data into a CSV file, and drawing a resource occupation statistical graph corresponding to each performance index once after the user finishes monitoring.
Further, as a specific embodiment of the method shown in fig. 1 and fig. 2, an embodiment of the present application provides a monitoring device for a program process, as shown in fig. 5, where the device includes: a determining module 31, an acquiring module 32, a generating module 33;
A determining module 31, configured to determine a target program process to be monitored and a target monitoring mode;
The acquiring module 32 may be configured to acquire parameter information corresponding to a target program process;
The generating module 33 may be configured to generate a program process monitoring result according to the target monitoring mode and the parameter information, where the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period.
In a specific application scenario, the determining module 31 is specifically configured to receive a program process monitoring request sent by a user; determining a target program process to be monitored according to the identification information carried in the program process monitoring request; receiving a selection instruction of a user for a first monitoring mode or a second monitoring mode; and determining a target monitoring mode according to the selection instruction.
Correspondingly, the determining module 31 is specifically configured to traverse the current process and determine a program process in a working state; generating and outputting a program process list according to the program process in the working state, wherein the program process list comprises identification information of the program process; and receiving a program process monitoring request carrying identification information, which is sent by a user according to the program process list.
In a specific application scenario, if the target monitoring mode is the first monitoring mode, the generating module 33 may specifically be configured to: generating and outputting a first resource occupation statistical map corresponding to the CPU parameter, a second resource occupation statistical map corresponding to the memory parameter, a third resource occupation statistical map corresponding to the handle parameter, a fourth resource occupation statistical map corresponding to the thread parameter, a fifth resource occupation statistical map corresponding to the GDI object parameter and a sixth resource occupation statistical map corresponding to the user object parameter in real time according to the acquisition time of the parameter information in the preset time period.
Accordingly, if the target monitoring mode is the second monitoring mode, the generating module 33 may be specifically configured to: according to the acquisition time of the parameter information, the parameter information is stored in a CSV file; and when the process of the target program is judged to be corresponding to the monitoring end, generating and outputting a first resource occupation statistical map corresponding to the CPU parameter, a second resource occupation statistical map corresponding to the memory parameter, a third resource occupation statistical map corresponding to the handle parameter, a fourth resource occupation statistical map corresponding to the thread parameter, a fifth resource occupation statistical map corresponding to the GDI object parameter and a sixth resource occupation statistical map corresponding to the user object parameter according to the parameter information in the CSV file.
In a specific application scenario, as shown in fig. 6, the present apparatus further includes: an analysis module 34.
The analysis module 34 may be configured to evaluate and analyze the target program process based on the first resource occupancy statistical map, the second resource occupancy statistical map, the third resource occupancy statistical map, the fourth resource occupancy statistical map, the fifth resource occupancy statistical map, and the sixth resource occupancy statistical map, respectively.
Correspondingly, the analysis module 34 is specifically configured to determine whether the CPU occupancy rate of the program meets a first preset standard according to the first resource occupancy statistical map; determining whether the memory occupation of the program accords with a second preset standard or not based on the second resource occupation statistical graph and judging whether memory leakage exists or not; and judging whether the target program process has leakage or not according to the image development trend of the third resource occupation statistical image and/or the fourth resource occupation statistical image and/or the fifth resource occupation statistical image and/or the sixth resource occupation statistical image.
It should be noted that, for other corresponding descriptions of each functional unit related to the monitoring device for a program process provided in this embodiment, reference may be made to corresponding descriptions in fig. 1 to fig. 2, and details are not repeated here.
Based on the above-mentioned methods shown in fig. 1 and 2, correspondingly, the embodiment of the present application further provides a storage medium, on which a computer program is stored, where the program is executed by a processor to implement the above-mentioned method for monitoring the program progress shown in fig. 1 and 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.), and includes several instructions for causing a computer device (may be a personal computer, a server, or a network device, etc.) to execute the method of each implementation scenario of the present application.
Based on the methods shown in fig. 1 and fig. 2 and the virtual device embodiments shown in fig. 5 and fig. 6, in order to achieve the above objects, the embodiments of the present application further provide a computer device, which may specifically be a personal computer, a server, a network device, etc., where the entity device includes a storage medium and a processor; a storage medium storing a computer program; a processor for executing a computer program to implement the above-described monitoring method of the program process as shown in fig. 1 and 2.
Optionally, the computer device may also include a user interface, a network interface, a camera, radio Frequency (RF) circuitry, sensors, audio circuitry, WI-FI modules, and the like. The user interface may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., bluetooth interface, WI-FI interface), etc
It will be appreciated by those skilled in the art that the computer device structure provided in this embodiment is not limited to this physical device, and may include more or fewer components, or may combine certain components, or may be arranged in different components.
The non-volatile readable storage medium may also include an operating system, a network communication module, etc. An operating system is a program of physical device hardware and software resources that handles tasks, supporting the execution of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the nonvolatile readable storage medium and communication with other hardware and software in the entity device.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present application may be implemented by means of software plus necessary general hardware platforms, or may be implemented by hardware. By applying the technical scheme of the application, compared with the prior art, after the monitoring program is operated, the method and the device can firstly determine the target program process to be monitored and the target monitoring mode by traversing the current process, acquire the parameter information corresponding to the target program process, and then generate the program process monitoring result according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to the resource occupation statistical graph of the target program process in the preset time period. In the application, the trend of the resource occupation in the preset time period can be intuitively displayed by generating the resource occupation statistical graph, thereby being convenient for monitoring and analyzing the program process. And by providing two alternative monitoring modes, the flexibility of program process monitoring can be ensured, so that the program process monitoring device can better meet the monitoring requirements of users.
Those skilled in the art will appreciate that the drawing is merely a schematic illustration of a preferred implementation scenario and that the modules or flows in the drawing are not necessarily required to practice the application. Those skilled in the art will appreciate that modules in an apparatus in an implementation scenario may be distributed in an apparatus in an implementation scenario according to an implementation scenario description, or that corresponding changes may be located in one or more apparatuses different from the implementation scenario. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned inventive sequence numbers are merely for description and do not represent advantages or disadvantages of the implementation scenario. The foregoing disclosure is merely illustrative of some embodiments of the application, and the application is not limited thereto, as modifications may be made by those skilled in the art without departing from the scope of the application.

Claims (6)

1. A method for monitoring a program process, comprising:
The method for determining the target program process to be monitored and the target monitoring mode specifically comprises the following steps:
Traversing the current process and determining a program process in a working state;
generating and outputting a program process list according to the program process in the working state, wherein the program process list comprises identification information of the program process;
The method for receiving the program process monitoring request sent by the user specifically comprises the following steps:
receiving a program process monitoring request carrying identification information sent by a user according to the program process list;
Determining a target program process to be monitored according to the identification information carried in the program process monitoring request;
receiving a selection instruction of the user for a first monitoring mode or a second monitoring mode;
Determining a target monitoring mode according to the selection instruction;
acquiring parameter information corresponding to the target program process;
if the target monitoring mode is a first monitoring mode, generating a program process monitoring result according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period, and the method specifically comprises the following steps:
Generating and outputting a first resource occupation statistical map corresponding to CPU parameters, a second resource occupation statistical map corresponding to memory parameters, a third resource occupation statistical map corresponding to handle parameters, a fourth resource occupation statistical map corresponding to thread parameters, a fifth resource occupation statistical map corresponding to GDI object parameters and a sixth resource occupation statistical map corresponding to user object parameters in real time according to the acquisition time of the parameter information in a preset time period;
If the target monitoring mode is a second monitoring mode, generating a program process monitoring result according to the target monitoring mode and the parameter information, wherein the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period, and specifically comprises the following steps:
According to the acquisition time of the parameter information, the parameter information is stored in a CSV file;
And when judging that the monitoring corresponding to the target program process is finished, generating and outputting a first resource occupation statistical map corresponding to CPU parameters, a second resource occupation statistical map corresponding to memory parameters, a third resource occupation statistical map corresponding to handle parameters, a fourth resource occupation statistical map corresponding to thread parameters, a fifth resource occupation statistical map corresponding to GDI object parameters and a sixth resource occupation statistical map corresponding to user object parameters according to the parameter information in the CSV file.
2. The method according to any one of claims 1, further comprising:
And respectively evaluating and analyzing the target program process based on the first resource occupation statistical map, the second resource occupation statistical map, the third resource occupation statistical map, the fourth resource occupation statistical map, the fifth resource occupation statistical map and the sixth resource occupation statistical map.
3. The method according to claim 2, wherein the evaluating and analyzing the target program process based on the first resource occupancy statistical map, the second resource occupancy statistical map, the third resource occupancy statistical map, the fourth resource occupancy statistical map, the fifth resource occupancy statistical map, and the sixth resource occupancy statistical map respectively specifically includes:
determining whether the CPU occupancy rate of the program accords with a first preset standard according to the first resource occupancy statistical graph;
determining whether the memory occupation of the program accords with a second preset standard or not based on the second resource occupation statistical graph and judging whether memory leakage exists or not;
And judging whether the target program process has leakage or not according to the image development trend of the third resource occupation statistical graph and/or the fourth resource occupation statistical graph and/or the fifth resource occupation statistical graph and/or the sixth resource occupation statistical graph.
4. A program progress monitoring apparatus, comprising:
the determining module is used for determining a target program process to be monitored and a target monitoring mode, and specifically comprises the following steps:
Traversing the current process and determining a program process in a working state;
generating and outputting a program process list according to the program process in the working state, wherein the program process list comprises identification information of the program process;
The method for receiving the program process monitoring request sent by the user specifically comprises the following steps:
receiving a program process monitoring request carrying identification information sent by a user according to the program process list;
Determining a target program process to be monitored according to the identification information carried in the program process monitoring request;
receiving a selection instruction of the user for a first monitoring mode or a second monitoring mode;
Determining a target monitoring mode according to the selection instruction;
the acquisition module is used for acquiring parameter information corresponding to the target program process;
The generating module is configured to generate a program process monitoring result according to the target monitoring mode and the parameter information if the target monitoring mode is a first monitoring mode, where the program process monitoring result corresponds to a resource occupation statistical result of the target program process in a preset time period, and specifically includes:
Generating and outputting a first resource occupation statistical map corresponding to CPU parameters, a second resource occupation statistical map corresponding to memory parameters, a third resource occupation statistical map corresponding to handle parameters, a fourth resource occupation statistical map corresponding to thread parameters, a fifth resource occupation statistical map corresponding to GDI object parameters and a sixth resource occupation statistical map corresponding to user object parameters in real time according to the acquisition time of the parameter information in a preset time period;
The generating module is further configured to generate a program process monitoring result according to the target monitoring mode and the parameter information if the target monitoring mode is a second monitoring mode, where the program process monitoring result corresponds to a resource occupation statistical result of the target program process within a preset time period, and specifically includes:
According to the acquisition time of the parameter information, the parameter information is stored in a CSV file;
And when judging that the monitoring corresponding to the target program process is finished, generating and outputting a first resource occupation statistical map corresponding to CPU parameters, a second resource occupation statistical map corresponding to memory parameters, a third resource occupation statistical map corresponding to handle parameters, a fourth resource occupation statistical map corresponding to thread parameters, a fifth resource occupation statistical map corresponding to GDI object parameters and a sixth resource occupation statistical map corresponding to user object parameters according to the parameter information in the CSV file.
5. A non-transitory readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the method of monitoring a program progress of any of claims 1 to 3.
6. A computer device comprising a non-volatile readable storage medium, a processor and a computer program stored on the non-volatile readable storage medium and executable on the processor, characterized in that the processor implements the method of monitoring a program progress of any of claims 1 to 3 when executing the program.
CN202011169733.XA 2020-10-28 2020-10-28 Program progress monitoring method and device and computer equipment Active CN112328446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011169733.XA CN112328446B (en) 2020-10-28 2020-10-28 Program progress monitoring method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011169733.XA CN112328446B (en) 2020-10-28 2020-10-28 Program progress monitoring method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN112328446A CN112328446A (en) 2021-02-05
CN112328446B true CN112328446B (en) 2024-04-30

Family

ID=74296114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011169733.XA Active CN112328446B (en) 2020-10-28 2020-10-28 Program progress monitoring method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN112328446B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246566A (en) * 2012-02-03 2013-08-14 腾讯科技(深圳)有限公司 Resource monitoring method and device for application program
CN105528277A (en) * 2015-12-10 2016-04-27 北京奇虎科技有限公司 Method and equipment for monitoring target device
CN107368326A (en) * 2016-05-13 2017-11-21 腾讯科技(深圳)有限公司 Course control method and device
CN108287781A (en) * 2017-01-10 2018-07-17 腾讯科技(深圳)有限公司 A kind of EMS memory occupation monitoring method and device, system
CN109740345A (en) * 2018-12-26 2019-05-10 北京神州绿盟信息安全科技股份有限公司 A kind of method and device of monitoring process
CN110928739A (en) * 2018-09-19 2020-03-27 阿里巴巴集团控股有限公司 Process monitoring method and device and computing equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246566A (en) * 2012-02-03 2013-08-14 腾讯科技(深圳)有限公司 Resource monitoring method and device for application program
CN105528277A (en) * 2015-12-10 2016-04-27 北京奇虎科技有限公司 Method and equipment for monitoring target device
CN107368326A (en) * 2016-05-13 2017-11-21 腾讯科技(深圳)有限公司 Course control method and device
CN108287781A (en) * 2017-01-10 2018-07-17 腾讯科技(深圳)有限公司 A kind of EMS memory occupation monitoring method and device, system
CN110928739A (en) * 2018-09-19 2020-03-27 阿里巴巴集团控股有限公司 Process monitoring method and device and computing equipment
CN109740345A (en) * 2018-12-26 2019-05-10 北京神州绿盟信息安全科技股份有限公司 A kind of method and device of monitoring process

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
协作学习交互分析工具及其案例研究;李艳燕;廖剑;王晶;黄荣怀;;开放教育研究;20070805(第04期);96-101 *

Also Published As

Publication number Publication date
CN112328446A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
US9465724B2 (en) Method, program, and system for generating test cases
CN110517148B (en) Control method, system and device for executing quantitative transaction strategy
US9612876B2 (en) Method and apparatus for estimating a completion time for mapreduce jobs
CN104993962A (en) Method and system for obtaining use state of terminal
CN114564374A (en) Operator performance evaluation method and device, electronic equipment and storage medium
CN105844107B (en) Data processing method and device
CN109840212B (en) Function test method, device and equipment of application program and readable storage medium
CN112328446B (en) Program progress monitoring method and device and computer equipment
CN112581444A (en) Anomaly detection method, device and equipment
CN112633341A (en) Interface testing method and device, computer equipment and storage medium
CN115037665B (en) Equipment testing method and device
CN109901919B (en) Information output method and device
CN112785418B (en) Credit risk modeling method, apparatus, device and computer readable storage medium
CN115357696A (en) Dynamic chart billboard display method based on components and related equipment
CN114265655A (en) Cloud application data processing method, device and system and storage medium
CN114942878A (en) Automatic performance testing method for internet application and related equipment
CN110489201B (en) Container performance testing device and method
CN112506765A (en) Software testing method, device, equipment and storage medium
US9846607B2 (en) Method and system for associating crash reports with end user analytics
CN106846433B (en) Signal change diagram drawing method and device and electronic equipment
CN111552634A (en) Method and device for testing front-end system and storage medium
CN111078518A (en) Data acquisition method, terminal device and computer-readable storage medium
CN110163657A (en) Insurance products recommended method and relevant device based on manifold learning arithmetic
CN114138664A (en) Page testing method and device, storage medium and computer equipment
CN115982182A (en) Database locking positioning method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant