[rc5] Monitoring clients

Bill Plein bill at diablo.net
Thu Jul 17 15:53:49 EDT 1997

>>> A little too crude for my tastes.  Better to have the script immediately
>>> restart the client if it dies.. rather than wasting valuable cycles with a
>>> cron job... :)
>>while true; do rc5v2; done
>That's nice and all, but I was originally more concerned with restarting
>client when someone decideds to reboot the machines. (No, I'm not root on
>all of them)

If you are not root, then you need to set up a user cron job. I have set up
one (I am not online right now so I don't have access to it) that does
something like this:

# This is runrc5
cd /home/bill/rc5
killall -HUP rc5v2 2> /dev/null
./rc5v2 &

The above script will kill all running versions (that you have rights to!),
and restart it. 

Then add a cron job running once an hour to call the file. If you are not
allowed to set up personal crontabs (with 'crontab -e' if you are not
already familiar with it), then you may be out of luck.

0 */1 * * *	/home/bill/rc5/runrc5

Some versions of cron don't like the above format, in which case you may
need to do something like:

0 0,2,4,6,8,10,12,14,16,18,20,22 * * * /home/bill/rc5/runrc5

... it's ugly, and it only will restart it once every other hour.

Bill Plein
bill at diablo.net
To unsubscribe, send email to majordomo at llamas.net with 'unsubscribe rc5' in the body.

More information about the rc5 mailing list