Wouldn't another option be to find out why said processes just "hang" for no reason. This is not normal behavior.

Jim

-----------------------------------

James G. Louis
Information Technologist
lcojiml at iwon.com
http://bounce.to/bizindawishin

 --- On Thu 09/25, Jay Kline < list at slushpupie.com > wrote:
From: Jay Kline [mailto: list at slushpupie.com]
To: tclug-list at mn-linux.org
Date: Thu, 25 Sep 2003 12:40:03 -0500
Subject: Re: [TCLUG] running services---beware of n00b

On Thu, 25 Sep 2003 12:15:38 -0500<br>"Lansing, Dan" <Dan.Lansing at AndersenCorp.com> wrote:<br>>I have written a small ugly script to restart some services which<br>>occasionally quit for unknown reasons...is there a way I can write a script<br>>to check if the services are running and run my restart script if they die?<br><br>There are a lot of different ways to handle this.  The way I handle it for<br>one of my servers, is every 15 min a script is run from cron, and uses pidof<br>to determine if there are any processes running with that name. If the<br>process writes its pid to a file, just check to see if that pid is running<br>(though this can fail- its possible for the process to quit, and a new,<br>unrelated process to get its pid).  <br><br>Another option is to use the daemontools suite (please, no flamewars- it IS<br>an option). <br><br>Jay<br><br>_______________________________________________<br>TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>http://www.mn-linux.org tclug-list at mn-linux.org<br>https://mailman.real-time.com/mailman/listinfo/tclug-list<br>

_______________________________________________


_______________________________________________
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