Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!nosc!logicon.com!trantor.harris-atd.com!x102c!mlindsey From: mlindsey@x102c.harris-atd.com (Lindsey MS 04396) Newsgroups: comp.protocols.tcp-ip.domains Subject: Re: Monitoring your nameserver Message-ID: <4121@trantor.harris-atd.com> Date: 15 Aug 90 12:46:30 GMT References: <9008141525.AA27754@sci.ccny.cuny.edu> Sender: news@trantor.harris-atd.com Reply-To: mlindsey@x102c.ess.harris.com (Lindsey MS 04396) Distribution: inet Organization: Harris Corporation GSS, Melbourne, Florida Lines: 42 In article <9008141525.AA27754@sci.ccny.cuny.edu> dan@SCI.CCNY.CUNY.EDU (Dan Schlitt) writes: >So how do folks arrange to get automatic notification in a timely way >when their nameserver software dies? Answers for diverse hardware >running unix for me, but others may be interested in other cases. We have a shell script that cron runs every minute to check named, log errors, and restart named if applicable. It's not very sexy, but it works ok. Since the shell script is so short, I've included it below: ################### cut here #################################### #!/bin/sh # Program: check_named # Purpose: to ensure named it always running. # Code date: 3/2/90 # # Revision History: # # Date Name Description of change # if [ -f /etc/named/core ] then rm /etc/named/core fi if [ -f /etc/named.pid ] then PID=`cat /etc/named.pid` ANSWER=`ps $PID | grep -c in.named` if [ "$ANSWER" = 0 ] then /usr/etc/in.named date >> /etc/named/named_downtime fi else /usr/etc/in.named date >> /etc/named/named_downtime fi exit 0 ################### cut here #################################### "Waste your brain, wax your board, and pray for waves!" Woody in E.G.A.E. /earth is 98% full! Please delete anyone you can! (anonymous) $teve Lindsey |-) uunet!x102a!mlindsey (407) 727-5893 :-) mlindsey@x102a.ess.harris.com