I run a cronjob every 2 minutes (kinda often, but it's not really service
impacting) called radmon.sh:
PATH=:/bin:/usr/bin:/usr/ucb:/usr/etc
hostname=`hostname`
admin="[EMAIL PROTECTED]"
# A little lock file for me to use when I'm testing stuff to
# keep this script from working
if [ -f /home/staff/aholtz/bin/lock ]; then
exit
fi
/bin/ps axwwww | grep radiusd | grep -v "grep" > /dev/null 2>&1
if [ $? -eq 0 ]; then
:
else
/etc/rc.radiator restart > /dev/null 2>&1
echo "Radius for $hostname not running!" | Mail -s "Radius \
for $hostname not running!" $admin
fi
That script (/etc/rc.radiator) is just another little shell script that
takes stop|start|reload|restart as a command line parameter (similiar to
other rc scripts). You could just replace that with your startup radius
command. Granted this isn't the most intricate of scripts and doesn't
really test whether radiusd is answering requests or not - it just looks
to be sure it is still running in memory. I suppose if your radiusd is
"hanging" in that it is running, but not answering requests you could
write a script to parse output from the command line answer from
radpwtst....
--------------------------------------------------------------------------
Aaron Holtz
ComNet Inc.
UNIX Systems Administration/Network Operations
"It's not broken, it just lacks duct tape."
--------------------------------------------------------------------------
On Nov 2, Andrew Kaplan molded the electrons to say....
>What are people doing to ensure that Radiator is always running. I'm having
>bad luck with restart wrappers. Unfortunately, Im not a perl programmer. But
>has anyone written a perl script that would test to see if radiator was
>running (say run the radpwtst if it fails run ps aux | grep rad) and then if
>not restart radiator.
>
>Or perhaps there is a better way to ensure that radiator is always running.
>
>Thanks,
>
>Andrew P. Kaplan, CNE, MCSE+Internet, MCT, CCNA, CCDA
>CyberShore, Inc. -- Premium Internet Services --
>
>CyberShore is now offering free Internet Seminars. On Tuesday, November 9th,
>Ken Richters will show you how to create a great looking Web site in about
>15 minutes using Microsoft Frontpage 2000. To register or for more info
>visit www.cshore.com/seminars
>
>
>===
>Archive at http://www.thesite.com.au/~radiator/
>To unsubscribe, email '[EMAIL PROTECTED]' with
>'unsubscribe radiator' in the body of the message.
>
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.