Watchdog Script

2007-12-25 1:57:00

Dear managers,

we have a service process running in the background that unfortunately
dies from time to time. We are researching why. However, until we have
found the bug we would like to setup a script that is called by cron
every 5 mins. This script should check whether the process is still
running with something like

ps -Af | grep OurService

and if it is not then restart it with

nohup ./OurService &

I have no idea how such a shell script would look like. Ideas are
greatly appreciated.

Thanks ins advance!

Regards,

Andreas

Comments

Got something to say?

You must be logged in to post a comment.