Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: "watchdog" for a process?

From: Brian Fahrlander <brian(at)fahrlander.net>
Date: Wed Sep 19 2007 - 17:17:44 EDT


Bart Silverstrim wrote:
> Is there a quick and short script, maybe something that can be run in
> Cron, that will look at the process list and if a process has been
> killed or had died will restart the process?

     That's what /etc/inittab does. I'm using it for both side of my sensor/controller project:

dd:2345:respawn:/usr/local/bin/displayd 2>/dev/null sp:2345:respawn:/usr/local/bin/sensorproc 2>/dev/null

The first two-letter indicator is just an identifier, the path names are specified, and "respawn" means to restart it when it's killed. "init Q" will cause /etc/inittab to be re-read.

     It works very well for me.

-- 
  ------------------------------------------------------------------------
  Brian Fahrländer                 Christian, Conservative, and Technomad
  Evansville, IN                              
http://Fahrlander.net/brian
  ICQ: 5119262                         AOL/Yahoo/GoogleTalk: WheelDweller
  ------------------------------------------------------------------------

-- 
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Received on Wed Sep 19 17:19:03 2007

This archive was generated by hypermail 2.1.8 : Sat Oct 20 2007 - 11:32:46 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library