Program process abnormality monitoring method, device, equipment and storage medium
By monitoring process execution information and preset rules in network connections, automatically detecting and responding to network connections and packet blockage abnormalities, the problem that traditional methods cannot be automatically detected is solved, the efficiency and accuracy of process abnormal monitoring is improved, and the system is ensured. stability.
Patent Information
- Application Number
- CN202411186841.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-28
AI Technical Summary
Traditional process exception monitoring methods fail to automatically detect and respond to process exceptions caused by network connection exceptions or packet blocking, and cannot automatically issue exception reminders.
By monitoring multiple processes in the network connection, obtaining process execution information, and determining the network connection and packet blockage based on the preset process rules. If the rules do not comply with the rules, send corresponding exception reminder information and restart according to the preset rules. Exception process.
It realizes automatic monitoring of network connections and packet processing, improves the efficiency and accuracy of process abnormal monitoring, reduces manual intervention, and ensures the maintainability and reliability of the system.
Smart Images

Figure CN118708443B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for monitoring program process abnormalities. Background Art
[0002] Program process exception monitoring refers to the continuous monitoring of program processes running in a computer system to detect and respond to abnormalities or error states that occur in the process. By performing program process exception monitoring, process anomalies can be discovered and handled in a timely manner to prevent system crashes or performance degradation, and the cause of the problem can be quickly located to shorten the fault recovery time.
[0003] Traditional process exception monitoring monitors the resource usage of the program process by collecting information such as the CPU and memory parameters corresponding to the application, but does not monitor the network resources of the program process. Therefore, when a process exception occurs due to network connection abnormalities or data packet blocking, it cannot automatically send out abnormal reminder information to notify operations and developers. Summary of the invention
[0004] The main purpose of this application is to provide a program process abnormality monitoring method, device, equipment and storage medium, aiming to solve the technical problem of how to automatically detect process abnormalities caused by network connection abnormalities or data packet blocking, and issue abnormality reminder information.
[0005] To achieve the above purpose, the present application proposes a method for monitoring program process abnormalities, the method comprising:
[0006] Monitoring multiple processes in a network connection and obtaining process execution information of each of the processes;
[0007] According to the comparison result between the process execution information and the preset process rule, determining whether the network connection of the process and the number of blocked data packets of the process meet the preset process rule;
[0008] If the network connection of the process does not comply with the preset process rules, a network connection abnormality reminder is sent based on the connection abnormality information;
[0009] Alternatively, if the number of data packet congestion of the process does not comply with a preset process rule, a data packet processing exception reminder is sent based on the data packet exception information.
[0010] In one embodiment, the step of judging whether the network connection of the process and the number of blocked data packets of the process meet the preset process rules according to the comparison result between the process execution information and the preset process rules comprises:
[0011] Determining, based on the process execution information, whether the number of packets to be received by the multiple processes and the number of packets to be sent by the multiple processes are within a preset threshold range;
[0012] If the number of data packets to be received of the process and / or the number of data packets to be sent of the process is greater than the preset threshold, it is determined that the number of data packet congestion of the process does not comply with the preset process rule.
[0013] In one embodiment, the method further comprises:
[0014] If the network connection of the process does not conform to the preset process rules, or the number of data packet congestion of the process does not conform to the preset process rules, the process is determined to be an abnormal process;
[0015] Restart the abnormal process according to the preset process startup rule and the abnormal process information.
[0016] In one embodiment, the method further comprises:
[0017] Determine the start time information of each of the processes;
[0018] If the current start time of the process is different from the last start time of the process, the process is a restart process;
[0019] Determine whether the restart process complies with a preset process startup rule.
[0020] In one embodiment, the step of determining whether the restart process complies with a preset process startup rule includes:
[0021] Determine whether each process in the network connection corresponding to the restart process complies with the preset process startup rule;
[0022] If the process does not comply with the preset process startup rule, then the abnormal restart process and the abnormal restart process information are obtained;
[0023] Based on the restart abnormal process information and the preset process start rule, the restart abnormal process is restarted.
[0024] In one embodiment, the method further comprises:
[0025] After the abnormal process is restarted, a preset startup record file is read and a count value in the startup record file is incremented;
[0026] Update the startup record file to obtain the restart times of the abnormal process;
[0027] Based on the number of restarts, it is determined whether to send a data packet processing abnormality reminder.
[0028] In one embodiment, the step of determining whether to send a data packet processing abnormality reminder based on the restart number includes:
[0029] If the network connection of the process complies with the preset process rule, and the number of data packet congestion of the process does not comply with the preset process rule, determining whether the number of data packet congestion is greater than a preset packet congestion tolerance;
[0030] If the number of data packet congestion is greater than the preset data packet congestion tolerance, and the number of restarts of the abnormal process is greater than the preset number of restarts, a data packet processing abnormality reminder is sent based on the data packet abnormality information.
[0031] In addition, to achieve the above purpose, the present application also proposes a program process abnormality monitoring device, the program process abnormality monitoring device comprising:
[0032] A monitoring module, used to monitor multiple processes in the network connection and obtain process execution information of the multiple processes;
[0033] A judgment module, used for judging whether the network connection of the process and the number of blocked data packets of the process meet the preset process rules according to the comparison result of the process execution information and the preset process rules;
[0034] A network connection abnormality reminder module, used for sending a network connection abnormality reminder based on the connection abnormality information when the network connection of the process does not meet the preset process rules;
[0035] The data packet processing exception reminder module is used to send a data packet processing exception reminder based on the data packet exception information when the number of data packet congestion in the process does not meet the preset process rules.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a program process exception monitoring device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the program process exception monitoring method described above.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the program process exception monitoring method described above are implemented.
[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the program process exception monitoring method described above are implemented.
[0039] One or more technical solutions proposed in this application have at least the following technical effects:
[0040] Monitor multiple processes in the network connection and obtain the process execution information of each process. By monitoring the network connection between processes, the listening ports of all TCP and UDP protocols and the corresponding process information can be obtained; based on the comparison result of the process execution information and the preset process rules, determine whether the network connection of the process and the number of packet congestion of the process meet the preset process rules; if the network connection of the process does not meet the preset process rules, send a network connection abnormality reminder based on the connection abnormality information; if the number of packet congestion of the process does not meet the preset process rules, send a packet processing abnormality reminder based on the packet abnormality information. By comparing the process execution information with the preset process rules, any behavior that does not meet expectations or exceeds the preset threshold is identified as an abnormality and a corresponding abnormality reminder is triggered.
[0041] In summary, the present application realizes automatic monitoring of the network connection and data packet processing of the process by monitoring multiple processes in the network connection and comparing the process execution information with the preset process rules, and triggers abnormal reminders and executes preset response operations when abnormal situations are detected without human intervention, thereby improving the efficiency and accuracy of process abnormality monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 A flowchart of the first embodiment of the method for monitoring abnormality of the application process;
[0045] Figure 2 A flowchart of the third embodiment of the method for monitoring abnormality of the application process is provided;
[0046] Figure 3 A detailed flow chart of the third embodiment of the method for monitoring abnormality of the application process;
[0047] Figure 4 A flowchart diagram of the fifth embodiment of the method for monitoring abnormality of the application process;
[0048] Figure 5 This is a schematic diagram of the module structure of the program process abnormality monitoring device according to an embodiment of the present application;
[0049] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the program process abnormality monitoring method in the embodiment of the present application.
[0050] Description of Figure Numbers:
[0051] 10. Monitoring module; 20. Judgment module; 30. Network connection abnormality reminder module; 40. Data packet processing abnormality reminder module; 1001. Processing device; 1002. Read-only memory; 1003. Storage device; 1004. Memory; 1005. Bus; 1006. I / O interface; 1007. Input device; 1008. Output device; 1009. Communication device.
[0052] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0054] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0055] The main solution of the embodiment of the present application is: monitor multiple processes in the network connection to obtain process execution information of each process; determine whether the network connection of the process and the number of data packet congestion of the process comply with the preset process rules based on the comparison result of the process execution information and the preset process rules; if the network connection of the process does not comply with the preset process rules, send a network connection abnormality reminder based on the connection abnormality information; or, if the number of data packet congestion of the process does not comply with the preset process rules, send a data packet processing abnormality reminder based on the data packet abnormality information.
[0056] Because traditional process exception monitoring monitors the resource usage of the program process by collecting information such as the CPU and memory parameters corresponding to the application, but does not monitor the network resources of the program process. Therefore, when a process exception occurs due to network connection abnormality or data packet blocking, it cannot automatically send an exception reminder message to notify the operation and maintenance and developers.
[0057] The present application monitors multiple processes in the network connection and compares the process execution information with the preset process rules, thereby automatically monitoring the network connection and data packet processing of the process, triggering an abnormality reminder and executing a preset response operation when an abnormality is detected without human intervention, thereby improving the efficiency and accuracy of process abnormality monitoring.
[0058] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a program process abnormality monitoring device, etc. The following takes the program process abnormality monitoring device as an example to illustrate this embodiment and the following embodiments.
[0059] Based on this, the embodiment of the present application provides a program process abnormality monitoring device method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for monitoring abnormality of program process of the present application.
[0060] In this embodiment, the program process abnormality monitoring device method includes steps S10 to S40:
[0061] Step S10, monitoring multiple processes in the network connection, and obtaining process execution information of each of the processes;
[0062] It should be noted that the process execution information includes: connection state State, receive queue (Receive Queue, Recv-Q), send queue (Send Queue, Send-Q), local address Local Address, remote address Foreign Address and process state. Among them, the connection state State describes the different stages and states of the connection, such as ESTAB (established), LISTEN (listening), TIME_WAIT (waiting to be closed), etc.; the send queue Send-Q indicates the number of data packets waiting to be processed in the receive queue. A larger value indicates network delay or excessive traffic; the send queue Send-Q indicates the number of data packets waiting to be sent in the send queue. A larger value indicates network delay or insufficient processing capacity of the receiver. The local address represents the local port and IP address, where the local port is the port number used for communication on the local computer, and the IP address is the network address of the local computer; the remote address represents the remote port and IP address, where the remote port is the port number on the remote computer that establishes a connection with the local computer, and the IP address is the network address of the remote computer; the process state represents the information of the process related to the connection, including the process ID (PID) and the process name. If the connection has no associated process, it is displayed as "-".
[0063] In a feasible implementation, the process execution information can be obtained using the Linux command tool ss. The command #ss-antp | grep vsa-mian | grep ESTAB can be used to display the process information of the process named vsa-main in the ESTABLISHED state. Among them, ss -antp means to display all TCP (-t) sockets in the system, and display the address and port number in digital form (-n), and display which process is using each socket (-p); grepESTAB is used to filter out all lines containing "ESTAB" from the output of the ss command. Usually, "ESTAB" means that the socket is in the ESTABLISHED (connection established) state; grep vsa-mian is used to filter out the process information of the process named vsa-main from the output of the ss command. As shown in the following table, a TCP connection in the ESTABLISHED state is obtained by using the command #ss -antp | grep vsa-mian | grepESTAB. The connection is from port 666 of the local machine to port 44090 of the peer, and is managed by a process named vsa-main (pid=29652) through file descriptor 35.
[0064]
[0065] In a feasible implementation, the netstat command can be used to obtain process execution information. For example, the netstat -antp command can view all TCP protocol listening ports and corresponding process information. Among them, -n means displaying the address and port number in digital form, -t means TCP protocol, and -p means displaying the process identifier and process name.
[0066] In this implementation, by monitoring the processes in the network connection, the process execution information of each process can be obtained using different instructions.
[0067] Step S20, judging whether the network connection of the process and the number of blocked data packets of the process meet the preset process rules according to the comparison result of the process execution information and the preset process rules;
[0068] Step S30, if the network connection of the process does not comply with the preset process rule, a network connection abnormality reminder is sent based on the connection abnormality information;
[0069] Exemplarily, the preset process rules are: process a needs to be created and the connection state is ESTAB, and the TCP port number is 666; process b needs to be created and the connection state is ESTAB, and the TCP port number is 667; process c needs to be created and the connection state is ESTAB, and the TCP port number of the connected peer is 668. If the process execution information does not meet the preset process rules, it indicates that the process is running abnormally. The process rules can also include: IP address whitelist / blacklist, specifying which IP addresses or address ranges are allowed or prohibited; specifying allowed protocol types; setting network traffic thresholds to prevent excessive use of network resources; specifying connection frequency and connection duration to limit the speed at which the process establishes new connections.
[0070] Step S40, or, if the number of packet congestion of the process does not meet the preset process rule, a packet processing abnormality reminder is sent based on the packet abnormality information.
[0071] In a feasible implementation manner, step S20, based on the comparison result between the process execution information and the preset process rule, the step of determining whether the network connection of the process and the number of blocked data packets of the process meet the preset process rule includes:
[0072] Determining, based on the process execution information, whether the number of packets to be received by the multiple processes and the number of packets to be sent by the multiple processes are within a preset threshold range;
[0073] If the number of data packets to be received of the process and / or the number of data packets to be sent of the process is greater than the preset threshold, it is determined that the number of data packet congestion of the process does not comply with the preset process rule.
[0074] The receiving queue Recv-Q and sending queue Send-Q data in the process execution information are compared with the preset thresholds respectively. If the number of packets in the receiving queue Recv-Q is greater than the preset threshold, it means that the process message processing is blocked and the process operation is abnormal. At this time, a packet processing abnormality reminder is sent based on the abnormal process information; if the number of packets in the process sending queue Send-Q is greater than the preset threshold, it means that the receiving process message processing of the other end is blocked and the process operation is abnormal. A packet processing abnormality reminder is sent based on the abnormal process information. For example, the operation and maintenance and developers can be notified of the abnormal process information and the cause of the abnormality through emails, text messages, etc.
[0075] This embodiment provides a method for monitoring program process exceptions. By monitoring multiple processes in a network connection and comparing process execution information with preset process rules, it automatically monitors the network connection and data packet processing of the process, triggers an exception reminder and executes a preset response operation when an abnormal situation is detected, without the need for human intervention, thereby improving the efficiency and accuracy of process exception monitoring.
[0076] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 1 , the method further comprises:
[0077] If the network connection of the process does not conform to the preset process rules, or the number of data packet congestion of the process does not conform to the preset process rules, the process is determined to be an abnormal process;
[0078] Restart the abnormal process according to the preset process startup rule and the abnormal process information.
[0079] In a feasible implementation, a shell script is used to check whether the process exists. If not, the process is started, and a cron job is set to run the shell script regularly. Before or after restarting the abnormal process, log information is recorded for troubleshooting and performance monitoring, and a notification is sent to the administrator or relevant team so that the administrator can understand the process restart situation.
[0080] In a feasible implementation, a system monitoring tool such as Monit or Supervisor is used to automatically detect the process status and restart the process when necessary.
[0081] In this embodiment, by configuring monitoring and automation scripts, the process is automatically restarted when a process abnormality is detected without manual intervention, thereby improving the maintainability and reliability of the system. By restarting the abnormal process, the function of the process can be quickly restored to ensure that the service is not interrupted or the interrupted service is restored as soon as possible.
[0082] Based on the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned second embodiment can refer to the above introduction, and will not be repeated in the following. Figure 2 After step S40, the program process abnormality monitoring method further includes steps A10 to A30:
[0083] Step A10, determining the start time information of each process;
[0084] Step A20, if the current start time of the process is different from the last start time of the process, the process is a restart process;
[0085] Step A30, determining whether the restart process complies with a preset process startup rule.
[0086] In a feasible implementation, the Linux system tool ps is used to obtain the startup time information of each process, and the #ps -aux | grep vsa_main command is used to obtain the process statistics, including the process number, user, CPU time, memory usage, etc. The process startup time START is judged to determine whether the process has been restarted. If the process startup time is different from the last startup time, it means that the process has been restarted. As shown in the following table, the information of the process named "vsa_main" is output through the ps tool. USER indicates that the user running the process is root; PID: indicates that the unique identifier of the process is 29652. Through PID, the process can be further managed or operated; %CPU shows that the percentage of CPU occupied by the process is 0.1; %MEM: shows that the percentage of physical memory occupied by the process is 10.6; VSZ indicates the virtual memory size (Virtual Memory Size) occupied by the process, which is 867996KB; RSS indicates that the physical memory size (Resident Set Size) occupied by the process is 217336KB; TTY: indicates which terminal the process is running on, where? usually means that the process is not associated with any terminal; STAT: indicates that the current state of the process is Ssl, S indicates that the process is in sleep state (waiting for an event), s indicates that the process is the leader process of the session, and l is related to multi-threaded processes, indicating that the process is multi-threaded; START indicates that the process was started on May 16. TIME indicates that the total CPU time occupied by the process since it was started is 40 hours and 29 minutes; COMMAND shows the command or program name that started the process, and / usr / local / VA IoTSec / module / vsa_main.bin is the executable file path of the process.
[0087]
[0088] In another feasible implementation, whether a process is a restart process is determined by querying a process history database. A database or file system is established to store the history records of each process, including basic information of the process (such as PID, name, command line parameters), start time, end time, and number of starts. When a process is detected to be started, the process history database is checked to see if there is a matching process record that ends within the most recent time window (such as within a few minutes), and the command line parameters of the process are checked to see if they match the parameters of the previously ended process. If a matching record is found, it means that the process is a restart process, and the number of restarts of the process is increased by 1, and its latest start time is updated.
[0089] There are often dependencies between processes. Restarting a process may affect other processes that depend on it. In this embodiment, confirming which processes have been restarted can help maintenance personnel better understand these dependencies and adjust other processes that depend on it when necessary.
[0090] Please refer to Figure 3 In a feasible implementation manner, step A30, determining whether the restart process complies with the preset process startup rule, further includes steps A31 to A33:
[0091] Step A31, determining whether each process in the network connection corresponding to the restart process complies with the preset process startup rule;
[0092] Step A32, if the process does not comply with the preset process startup rule, obtaining the abnormal restart process and the abnormal restart process information;
[0093] Step A33: restart the abnormal restart process based on the abnormal restart process information and the preset process startup rule.
[0094] In a feasible implementation, the preset process startup rule is: after process a is abnormally restarted, process b and process c must be restarted, otherwise there will be problems in establishing the network connection. If a process has been restarted, then determine whether other processes in the corresponding network connection meet the preset process startup rule based on the information of the restarted process; if process b and process c have not been restarted, then it is necessary to automatically restart process b and process c to ensure normal network connection.
[0095] In this embodiment, if there is a restarted process, it is determined whether other processes in the network connection comply with the preset process startup rules, thereby ensuring that after a process in the network connection is abnormally restarted, other processes in the network connection are also restarted according to the preset process startup rules.
[0096] If other processes have close dependencies on the restarted process (such as data sharing, synchronization operations, etc.), the status of these processes may have been affected, and restarting them can avoid potential problems. If the restarted process is responsible for processing or storing critical data, and this data is used by other processes, restarting these dependent processes can ensure data consistency and accuracy. Restarting can clear any dirty data or inconsistent status that may have been introduced by the previous process exception.
[0097] Based on the third embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as those in the third embodiment can be referred to the above introduction, and will not be repeated in the following. On this basis, the program process abnormality monitoring method also includes the following steps:
[0098] After the abnormal process is restarted, a preset startup record file is read and a count value in the startup record file is incremented;
[0099] Update the startup record file to obtain the restart times of the abnormal process;
[0100] Based on the number of restarts, it is determined whether to send a data packet processing abnormality reminder.
[0101] When the process starts, the count value stored in the boot log file is read. If the file does not exist or the read fails, the default count value is 0. After the count value is read successfully, the read count value is increased by 1 and the new count value is written back to the boot log file. By recording the number of restarts, the system administrator can discover these problems in a timely manner and take appropriate measures to repair and optimize them, thereby improving the overall performance and stability of the system.
[0102] Based on the fourth embodiment of the present application, in the fifth embodiment of the present application, the same or similar contents as those in the fourth embodiment can be referred to the above introduction, and will not be repeated in the following. Figure 4 The step of determining whether to send a data packet processing abnormality reminder based on the restart number includes steps B10 to B20:
[0103] Step B10, if the network connection of the process complies with the preset process rule, and the number of data packet congestion of the process does not comply with the preset process rule, then determining whether the number of data packet congestion is greater than a preset packet congestion tolerance;
[0104] Step B20: If the number of packet congestion is greater than the preset packet congestion tolerance, and the number of restarts of the abnormal process is greater than the preset number of restarts, a packet processing abnormality reminder is sent based on the packet abnormality information.
[0105] In a feasible implementation, a reasonable interval is set between the network connection anomaly and the data packet congestion, so that data packet congestion within this interval will not cause a process abnormality error. If the network connection meets the preset process rules, the number of data packet congestion of the process is further checked. If the number of data packet congestion is within the tolerance interval, and the number of restarts of the abnormal process is less than or equal to the preset number of restarts, no data packet processing abnormality reminder is sent to the staff; if the number of data packet congestion is within the tolerance interval, but the number of restarts of the abnormal process is greater than the preset number of restarts, a data packet processing abnormality reminder is sent to the staff; if the number of data packet congestion exceeds the tolerance interval, a data packet processing abnormality reminder is sent to the staff. It should be noted that the data packet congestion tolerance interval can be dynamically adjusted according to the actual operation of the system and performance data.
[0106] By comparing the number of packet jams and the packet jam tolerance, no exception reminders are sent for process exceptions caused by temporary, non-fatal problems. Instead, they are solved by restarting. This can reduce the need for manual intervention in these problems, reduce operation and maintenance costs, and enable administrators to focus on more complex problems. At the same time, reducing the number of unnecessary exception reminders can enable operation and maintenance personnel to focus more on situations that really need attention.
[0107] This application also provides a program process abnormality monitoring device, please refer to Figure 5 , the program process abnormality monitoring device comprises:
[0108] A monitoring module 10 is used to monitor multiple processes in the network connection and obtain process execution information of the multiple processes;
[0109] A judgment module 20, configured to judge whether the network connections of the plurality of processes and the number of data packets of the plurality of processes conform to the preset process rules according to a comparison result between the process execution information and the preset process rules;
[0110] A network connection abnormality reminder module 30, configured to send a network connection abnormality reminder based on the connection abnormality information when the network connection of the process does not comply with a preset process rule;
[0111] The data packet processing abnormality reminder module 40 is used to send a data packet processing abnormality reminder based on the data packet abnormality information when the number of data packets of the process does not meet the preset process rules.
[0112] The program process abnormality monitoring device provided by the present application adopts the program process abnormality monitoring method in the above embodiment, which can solve the technical problem of how to automatically detect the process abnormality caused by network connection abnormality or data packet blocking, and issue abnormality reminder information. Compared with the prior art, the beneficial effects of the program process abnormality monitoring device provided by the present application are the same as the beneficial effects of the program process abnormality monitoring method provided by the above embodiment, and the other technical features of the program process abnormality monitoring device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0113] The present application provides a program process exception monitoring device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the program process exception monitoring method in the above-mentioned embodiment one.
[0114] Reference below Figure 6, which shows a schematic diagram of the structure of a program process abnormality monitoring device suitable for implementing the embodiment of the present application. The program process abnormality monitoring device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The program process abnormality monitoring device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0115] like Figure 6 As shown, the program process abnormality monitoring device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in a read-only memory (ROM: Read Only Memory) 1002 or the program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for device operation are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the program process abnormal monitoring device to communicate wirelessly or wired with other devices to exchange data. Although the program process abnormal monitoring device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or less systems can be implemented or have alternatively.
[0116] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0117] The program process abnormality monitoring device provided by the present application adopts the program process abnormality monitoring method in the above embodiment, which can solve the technical problem of how to automatically detect process abnormalities caused by network connection abnormalities or data packet blocking, and issue abnormality reminder information. Compared with the prior art, the beneficial effects of the program process abnormality monitoring device provided by the present application are the same as the beneficial effects of the program process abnormality monitoring method provided by the above embodiment, and other technical features in the program process abnormality monitoring device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0118] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0119] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0120] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the program process abnormality monitoring method in the above-mentioned embodiment.
[0121] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0122] The computer-readable storage medium may be included in the program process abnormality monitoring device; or may exist independently without being assembled into the program process abnormality monitoring device.
[0123] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the program process abnormality monitoring device, the program process abnormality monitoring device: monitors multiple processes in the network connection to obtain process execution information of each of the processes; determines whether the network connection of the process and the number of data packets of the process comply with the preset process rules based on the comparison result between the process execution information and the preset process rules; if the network connection of the process does not comply with the preset process rules, a network connection abnormality reminder is sent based on the connection abnormality information; if the number of data packets of the process does not comply with the preset process rules, a data packet processing abnormality reminder is sent based on the data packet abnormality information.
[0124] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0126] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0127] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned program process abnormality monitoring method, and can solve the technical problem of how to automatically detect process abnormalities caused by network connection abnormalities or data packet blocking, and issue abnormality reminder information. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the program process abnormality monitoring method provided by the above-mentioned embodiment, and will not be repeated here.
[0128] The present application also provides a computer program product, including a computer program, which implements the steps of the program process exception monitoring method as described above when the computer program is executed by a processor.
[0129] The computer program product provided by the present application can solve the technical problem of how to automatically detect process anomalies caused by abnormal network connections or data packet blocking, and issue abnormal reminder information. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the program process anomaly monitoring method provided by the above embodiment, and will not be repeated here.
[0130] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for monitoring program process abnormality, characterized in that: The method includes: Monitoring multiple processes in a network connection and obtaining process execution information of each of the processes; According to the comparison result between the process execution information and the preset process rule, determining whether the network connection of the process and the number of blocked data packets of the process meet the preset process rule; If the number of blocked data packets of the process does not meet the preset process rules, the process is determined to be an abnormal process, and the abnormal process is restarted according to the preset process startup rules and abnormal process information; After the abnormal process is restarted, a preset startup record file is read and a count value in the startup record file is incremented; Update the startup record file to obtain the restart times of the abnormal process; If the network connection of the process complies with the preset process rule, and the number of packet congestion of the process does not comply with the preset process rule, determining whether the number of packet congestion is greater than a preset packet congestion tolerance; If the number of data packet congestion is greater than the preset data packet congestion tolerance, and the number of restarts of the abnormal process is greater than the preset number of restarts, a data packet processing abnormality reminder is sent based on the data packet abnormality information.
2. The method according to claim 1, characterized in that The step of judging whether the network connection of the process and the number of blocked data packets of the process meet the preset process rules according to the comparison result of the process execution information and the preset process rules comprises: Determining, based on the process execution information, whether the number of packets to be received by the multiple processes and the number of packets to be sent by the multiple processes are within a preset threshold range; If the number of data packets to be received of the process and / or the number of data packets to be sent of the process is greater than the preset threshold, it is determined that the number of data packet congestion of the process does not comply with the preset process rule.
3. The method according to any one of claims 1 to 2, characterized in that Before the step of reading a preset startup record file and incrementing the count value in the startup record file after the abnormal process is restarted, the method further includes: If the network connection of the process does not conform to the preset process rule, the process is determined to be an abnormal process, and the abnormal process is restarted according to the preset process startup rule and abnormal process information.
4. The method according to claim 1, characterized in that The method further comprises: Determine the start time information of each of the processes; If the current start time of the process is different from the last start time of the process, the process is a restart process; Determine whether the restart process complies with a preset process startup rule.
5. The method according to claim 4, characterized in that The step of determining whether the restart process complies with a preset process startup rule comprises: Determine whether each process in the network connection corresponding to the restart process complies with the preset process startup rule; If the process does not comply with the preset process startup rule, then the abnormal restart process and the abnormal restart process information are obtained; Based on the restart abnormal process information and the preset process startup rule, the restart abnormal process is restarted.
6. A program process abnormality monitoring device, characterized in that: The device comprises: A monitoring module, used to monitor multiple processes in the network connection and obtain process execution information of the multiple processes; A judgment module, used to judge whether the network connection of the process and the number of data packet congestion of the process meet the preset process rules according to the comparison result of the process execution information and the preset process rules; if the number of data packet congestion of the process does not meet the preset process rules, the process is judged to be an abnormal process, and the abnormal process is restarted according to the preset process startup rules and abnormal process information; after the abnormal process is restarted, a preset startup record file is read and a count value in the startup record file is incremented; the startup record file is updated to obtain the number of restarts of the abnormal process; The data packet processing exception reminder module is used to determine whether the number of data packet congestion is greater than the preset data packet congestion tolerance when the network connection of the process complies with the preset process rules and the number of data packet congestion of the process does not comply with the preset process rules; if the number of data packet congestion is greater than the preset data packet congestion tolerance and the number of restarts of the abnormal process is greater than the preset number of restarts, a data packet processing exception reminder is sent based on the data packet exception information.
7. A program process abnormality monitoring device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the program process abnormality monitoring method according to any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the program process abnormality monitoring method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Parasitic course detection method and device in virtual machine
CN104732145A
Node state detection method and device for distributed storage system
CN113407409A
Network information display method and device and electronic equipment
CN114285619A
Software operation monitoring method, device and equipment and computer storage medium
CN116860555A
Data processing method and device, electronic equipment and computer readable storage medium
CN118312660A
