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

Re: sleet.wunderground.com



Jeff,


Can you check on sleet?  ldmping states that the LDM service is
unavalable.

I also included a script that checks the status of a LDM machine. The
script needs to be renamed.  Internally, the thelma word needs to be
changed to the sleet and the list of email addresses changed.  At UPC we
run this out of cron every 20 minutes.  Just a convience script.

Thanks,
RObb...



===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
address@hidden             WWW: http://www.unidata.ucar.edu/
===============================================================================
#!/bin/sh
#
# file:         thelmaup
# by:           mitch baltuch
# date:         1/94
#
# this script should be run out of cron.  it uses ldmping to make sure that
# both the server, and the atm box is running.  if all is well the script
# exits.  if not, the first time mail is sent and a check file is created.
# before this is done, the check file is tested for.  if it already exists
# no mail is sent.  this means that after the server or box is brought up,
# the check file has to be deleted manually.
#
# Assumptions: 
#
# Usage:        atmup
#
# modification history
# name          date            modification
#
# msb           1/13/94         original code
#
# msb           1/14/94         increased rpc timeout to 20 seconds
#                               added selffix code
#
# msb           2/7/94          modified to check failure 5 times before
#                               sending failure message.
#
# rpk           8/7/98          modified to use with thelma
###############################################################################

# set shell variables

DESTDIR=/home/idd

LDM_BIN=/usr/local/ldm/bin
LDM_PING=$LDM_BIN/ldmping

MAILLIST=address@hidden,support,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden,rkambic

#echo $MAILLIST

#exit 0

$LDM_PING -t 30 -q -i 0 thelma.ucar.edu

if [ $? -ne 0 ]
then

  if [ -r $DESTDIR/.thelmamsg ]
  then

    : true

  else

    count=0
    worked=0
    while [ ${count} -lt 5 -a ${worked} -ne 1 ]
    do
      echo $count $worked
      sleep 30
      $LDM_PING -t 30 -q -i 0 thelma.ucar.edu
      if [ $? -eq 0 ]
      then
        worked=1
      fi
      count=`expr $count + 1`
    done

    if [ ${worked} -ne 1 ]
    then
      date > $DESTDIR/.thelmamsg
      mailx -s "thelma failure" $MAILLIST < $DESTDIR/.thelmamsg
    fi
  fi

else

  if [ -r $DESTDIR/.thelmamsg ]
  then

    date > $DESTDIR/.thelmamsg
    mailx -s "thelma success" $MAILLIST < $DESTDIR/.thelmamsg
    rm $DESTDIR/.thelmamsg

  fi

fi

exit 0