Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

process monitor and restart utility



On Thu, 29 Dec 2005 00:21:29 -0500
Robert La Ferla <robertlaferla at comcast.net> wrote:

> I am looking for a utility that essentially keeps a list of processes to 
> monitor (in a flat file much like crontab) and restarts them if they 
> crash (or fail to respond to some condition like a http get).  However, 
> I'd also like it to provide an optional notification of the 
> crash/restart and there should be a way to stop the process without 
> having it automatically restarted.  I've written scripts to do this but 
> there's got to be a standard or commonly used utility out there to do 
> this.  I read that Debian has something called restartd.  Ideally, I'd 
> like something that is actively supported open source and compiles/runs 
> on Fedora.  Recommendations?
While I was looking at the utilities that dsr posted, you already have
it. You can use inittab to do it. 

Add a line similar to this in /etc/inittab:
x:35:respawn:<path to utility>  <arguments>

In the above, the x is some id assigned by you. 35 means to do this in
run levels 3 and 5. Normally, daemons are started when the rc script is
executed. rc then starts a script whose symlink is in the
rc<runlevel>.d directory.  But, daemons can be started directly from
inittab. 


-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.blu.org/pipermail/discuss/attachments/20051229/a999d31e/attachment.sig>



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org