CN103514076A - Application layer process monitoring method - Google Patents

Application layer process monitoring method Download PDF

Info

Publication number
CN103514076A
CN103514076A CN201310412106.8A CN201310412106A CN103514076A CN 103514076 A CN103514076 A CN 103514076A CN 201310412106 A CN201310412106 A CN 201310412106A CN 103514076 A CN103514076 A CN 103514076A
Authority
CN
China
Prior art keywords
application layer
critical processes
init
monitoring method
process monitoring
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.)
Pending
Application number
CN201310412106.8A
Other languages
Chinese (zh)
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.)
Shenzhen Gongjin Electronics Co Ltd
Original Assignee
Shenzhen Gongjin Electronics 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 Shenzhen Gongjin Electronics Co Ltd filed Critical Shenzhen Gongjin Electronics Co Ltd
Priority to CN201310412106.8A priority Critical patent/CN103514076A/en
Publication of CN103514076A publication Critical patent/CN103514076A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides an application layer process monitoring method. In a Linux embedded system, the key process of an application layer is monitored through the init process. According to the method, firstly, the key process is determined, secondly, the state of all processes is monitored through the init process, and if the key process quits, restarting operation is executed. According to the method, the process of the application layer is monitored through the init process, and when the key process quits, the restarting operation is executed, the quitted key process is returned to normal, and dead halt is avoided.

Description

A kind of application layer process monitoring method
Technical field
The present invention relates to Linux embedded product field, particularly the critical processes of Linux application layer is monitored to the method for processing.
Background technology
Application layer refers to top in OSI(Open Systems Interconnection) model, and for application program provides service to guarantee communication, but it is not the application program itself communicating.Process is a program that can burst out and carry out, an operational process on a data acquisition, and it is the individual that system is carried out Resource Distribution and Schedule.
Embedded product software cannot test out all bug in test process, and application layer process bug as very hidden in some may cause equipment to crash, but may need long-play could occur once, more difficult appearance on stream.Once extremely exit but appear at business process main in operational process, will cause equipment to crash, user must carry out power-off, power on equipment, and the business of equipment can be recovered normally, can cause damage to user ' s right. 
In Linux, first process of application layer is init process, at present, init process in Linux can be monitored all application layer states of a process, exiting of any process of application layer, init process all can provide print prompt, but can not take any substantial action.
Summary of the invention
The object of the invention is extremely to exit in order to realize main business process in timely processing embedded product, the problem that causes equipment to crash, avoid causing user ' s right infringement, and a kind of application layer process monitoring method providing is monitored extremely by the main business process to application layer, in main business process, have while extremely exiting, restart in time recovery, need not the manual power-off restarting of user, the existence of the imperceptible deadlock problem of user, has promoted user's experience.
Technical scheme of the present invention is: a kind of application layer process monitoring method, and in Linux embedded system, utilize init process to monitor the critical processes of application layer, in the method, first determine and then comprise the following steps critical processes:
Step 1, all states of a process of init process monitoring;
Step 2, judged whether that application layer process exits, if do not had, turned to step 1, otherwise turn to step 3;
Step 3, judge whether normally operation of critical processes, if so, turn to step 1, otherwise, turn to step 4;
Step 4, execution reboot operation.
Further, in above-mentioned application layer process monitoring method: judge in step 3 that the method whether business process normally moves is, by checking all process statuss of current operation, whether the critical processes name that adopts canonical matched and searched to pay close attention to exists;
If can match this critical processes name, this critical processes normal operation is described; Otherwise illustrate that operation is undesired.
In the present invention, utilize init process monitoring application layer process, after having critical processes to exit, carry out reboot operation, make the critical processes exiting recover normal.
Below in conjunction with specific embodiment, the present invention is described in more detail.
Accompanying drawing explanation
Fig. 1 is overall flow figure of the present invention.
Embodiment
Embodiment 1, and the present embodiment is a kind of application layer process monitoring method, in Linux embedded system, utilizes init process to monitor the critical processes of application layer, first determines and then comprise the following steps critical processes: as shown in Figure 1 in the method.
Step 1, all states of a process of init process monitoring.For the operation of linux system, init program is the first program of application layer operation, the exiting of any process of application layer, and init process all can provide print prompt, but can not take any substantial action.
Step 2, judged whether that application layer process exits, if do not had, turned to step 1, otherwise turn to step 3;
Step 3, judge whether critical processes exits, if so, turn to step 4, otherwise, turn to step 1;
Step 4, execution reboot operation.
Because init process is first process that Linux application layer pulls up, this process is hung, and equipment will inevitably be restarted, so realize all application layer critical processes monitoring mechanisms in the init of Busybox process, is the most reliable.
The present embodiment is monitored critical processes in Linux application layer, finds to carry out autoboot operation when key business process exits, and improving product stability and user experience.
Concrete steps:
In 1, init process, all states of a process can be monitored, if exit, specific branch can be entered
/*?Wait?for?a?child?process?to?exit?*/
wpid?=?wait(NULL);
while?(wpid?>?0)?{
When/* has process to exit, can enter this partial code */
}
2, whether the process that judgement is exited is the critical processes that product is paid close attention to.This step is exactly by checking that critical processes is whether also in the process of normal operation, specific as follows:
Judge that the method whether business process normally moves is, by " " all process statuss of current operation are checked in order to ps – ax, further " ps – ax is " in the output of order, whether the critical processes name of paying close attention to by canonical matched and searched (for software, process name is essentially a character string) exists.
If can match this critical processes name, critical processes normal operation is described; Otherwise illustrate that operation is undesired.
3, if critical processes has exited, carry out reboot operation, otherwise ignore this monitor message.

Claims (2)

1. an application layer process monitoring method, in Linux embedded system, utilizes init process to monitor the critical processes of application layer, it is characterized in that: in the method, first determine and then comprise the following steps critical processes:
Step 1, all states of a process of init process monitoring;
Step 2, judged whether that application layer process exits, if do not had, turned to step 1, otherwise turn to step 3;
Step 3, judge whether normally operation of critical processes, if so, turn to step 1, otherwise, turn to step 4;
Step 4, execution reboot operation.
2. application layer process monitoring method according to claim 1, it is characterized in that: in step 3, judge that the method whether business process normally moves is, by checking all process statuss of current operation, whether the critical processes name that adopts canonical matched and searched to pay close attention to exists;
If can match this critical processes name, this critical processes normal operation is described; Otherwise illustrate that operation is undesired.
CN201310412106.8A 2013-09-11 2013-09-11 Application layer process monitoring method Pending CN103514076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310412106.8A CN103514076A (en) 2013-09-11 2013-09-11 Application layer process monitoring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310412106.8A CN103514076A (en) 2013-09-11 2013-09-11 Application layer process monitoring method

Publications (1)

Publication Number Publication Date
CN103514076A true CN103514076A (en) 2014-01-15

Family

ID=49896838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310412106.8A Pending CN103514076A (en) 2013-09-11 2013-09-11 Application layer process monitoring method

Country Status (1)

Country Link
CN (1) CN103514076A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598313A (en) * 2015-02-04 2015-05-06 广州市久邦数码科技有限公司 Implementation method for automatic restart after stop of application process and system thereof
CN110853388A (en) * 2019-11-14 2020-02-28 北京星云互联科技有限公司 Information distribution method and device, vehicle-mounted and vehicle-mounted display terminals and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060271916A1 (en) * 2005-05-26 2006-11-30 United Parcel Service Of America, Inc. Software process monitor
CN101561769A (en) * 2009-05-25 2009-10-21 北京航空航天大学 Process migration tracking method based on multi-core platform virtual machine
CN101630262A (en) * 2009-07-17 2010-01-20 北京数帅科技有限公司 Method for monitoring and controlling subprocess based on Linux system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060271916A1 (en) * 2005-05-26 2006-11-30 United Parcel Service Of America, Inc. Software process monitor
CN101561769A (en) * 2009-05-25 2009-10-21 北京航空航天大学 Process migration tracking method based on multi-core platform virtual machine
CN101630262A (en) * 2009-07-17 2010-01-20 北京数帅科技有限公司 Method for monitoring and controlling subprocess based on Linux system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598313A (en) * 2015-02-04 2015-05-06 广州市久邦数码科技有限公司 Implementation method for automatic restart after stop of application process and system thereof
CN110853388A (en) * 2019-11-14 2020-02-28 北京星云互联科技有限公司 Information distribution method and device, vehicle-mounted and vehicle-mounted display terminals and storage medium

Similar Documents

Publication Publication Date Title
CN101354677B (en) Method for detecting and restoring application program running state and restoring device thereof
CN106637805B (en) Internet of things washing machine control method and system and washing machine
CN101883003A (en) Mandatory running method of computer operating system
CN102508734B (en) Operating system recovery method and intelligent equipment
CN105224362A (en) Host computer carries out the method and system of program upgrade to slave computer
CN103064382A (en) Optical proximity correction (OPC) embedded-type remote data collecting system and method based on ARM framework
CN103370693A (en) Restarting processes
CN103370694A (en) Restarting data processing systems
CN103593250A (en) Realizing method for modifying BIOS Setup option out of band
CN107656856A (en) A kind of system mode display methods and device based on CPLD
CN102819466B (en) The disposal route of operating system exception and device thereof
CN103888299A (en) Intelligent network monitoring system and working method thereof
CN104657228A (en) Method and device for processing system exceptions of mobile terminal
CN104199753A (en) Virtual machine application service failure recovery system and method
CN101567962A (en) Double-Loader updating method for set-top box
CN103885565A (en) Dormancy method and dormancy system for intelligent equipment
CN103514076A (en) Application layer process monitoring method
CN103309764A (en) Method and device for protection of fault-tolerant mechanism of virtual machine
CN105930190B (en) A kind of program self-start method and device based on operating system
CN101458642A (en) Computer monitoring terminal and monitoring method
CN106600010A (en) Intelligent emergency processing information system based on scene adaptation
CN104580135B (en) A kind of terminal real-time control system and method based on UEFI
CN102169451B (en) The method and apparatus that a kind of monitoring CPU is run
CN104660992B (en) Video goes offline reconnecting system and method
CN102880480A (en) Method for updating application program of intelligent water meter on line

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Yang Wei

Inventor after: Song Haibo

Inventor after: Yuan Peifeng

Inventor before: Yang Wei

Inventor before: Song Haibo

Inventor before: Yuan Peifeng

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20140115