[rc5] Monitoring clients

Caolan McNamara 9312811 at ul.ie
Thu Jul 17 21:30:11 EDT 1997


On 17-Jul-97 Ivo Janssen wrote:
>On Thu, 17 Jul 1997, Bill Plein wrote:
>
>> #!/bin/sh
>> # This is runrc5
>> cd /home/bill/rc5
>> killall -HUP rc5v2 2> /dev/null
>> ./rc5v2 &
> 
>> ... it's ugly, and it only will restart it once every other hour.
>
>Hmm. Stopping and starting the client every hour?
>Isn't there something as:
>if `ps x|grep rc5` then restart else do nothing
>or so???
>
>Ivo

heres what i use for a check to restart the client
if [ "`ps -cuxw | grep -c -h -s rc5-client`" = "0" ]; then
        ~caolan/bin/rc5-client -n 20 -a skynet.csn.ul.ie -p 8000 linu
x at linuxnet.org &
fi
slap in a crontab that runs each hour and ta-da.

C.

Real Life: Caolan McNamara           * Email: 9312811 at ul.ie
Local: caolan at skynet.csn             * Quote: Happiness is a small sig.
URL: http://skynet.csn.ul.ie/~caolan * Sig: randomly chosen oblique strategy
Don't be afraid of things because they are easy to do
----
To unsubscribe, send email to majordomo at llamas.net with 'unsubscribe rc5' in the body.



More information about the rc5 mailing list