----- Original Message ----- From: "Reiner Tolentino" <[EMAIL PROTECTED]> To: "Philippine Linux Users' Group (PLUG) Technical Discussion List" <[email protected]>
Sent: Wednesday, August 16, 2006 12:16 PM
Subject: [plug] detect running application


I have an application that should run 24/7 and should email me if it
stop. Now, my question now is.. how can I know/detect if this
application is not running.

you have lots of options to choose.. when it comes to monitoring... snmp is the logical choice to make... it intended for that purpose... extensible snmp + mrtg solve your problem....

for simple solution... make a shell script with the following template...

1. make an endless loop from number 1 to number 4
2. run your application in foreground mode
3. mail to intended recipient
4. goto number 1

if your application is not capable to run in foreground mode (usually a daemon that runs on a background mode).. make a script with the following template..

1. make an endless loop from number 1 to number 7
2. run ps by name if that daemon is running...
3. if daemon is running goto number 6
4. run daemon in background mode
5. mail to intended recipient
6. sleep for how many seconds for another schedule of checking
7. goto number 1

fooler.


_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to