Process Watchdogs
Scot L. Harris
webid at cfl.rr.com
Sun Jan 23 21:56:41 UTC 2005
On Sun, 2005-01-23 at 06:38, Richard Worwood wrote:
> I'm have a problem with one of my servers at the moment where services
> keep stopping and I would like to setup some kind of watchdog process to
> keep this in check, notify me when it happens and restart them.
>
> Does anyone have any ideas on how I can do this?
>
> Thanks
>
> Richard
You can write a script that uses ps to monitor the particular processes
you want to make sure are running. You can use ps piped to grep to
look for the particular process you are looking for. Test the results
and if it is not there have it notify you via email or some other means
or you can even try to restart the process in the script.
Put this script in a cron job to run periodically say every 5 minutes or
so.
--
Scot L. Harris
webid at cfl.rr.com
All laws are simulations of reality.
-- John C. Lilly
More information about the users
mailing list