On Thu, 25 Sep 2003 12:15:38 -0500
"Lansing, Dan" <Dan.Lansing at AndersenCorp.com> wrote:
>I have written a small ugly script to restart some services which
>occasionally quit for unknown reasons...is there a way I can write a script
>to check if the services are running and run my restart script if they die?

There are a lot of different ways to handle this.  The way I handle it for
one of my servers, is every 15 min a script is run from cron, and uses pidof
to determine if there are any processes running with that name. If the
process writes its pid to a file, just check to see if that pid is running
(though this can fail- its possible for the process to quit, and a new,
unrelated process to get its pid).  

Another option is to use the daemontools suite (please, no flamewars- it IS
an option). 

Jay

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list