RE: Automatic Cache Monitoring

From: Dax Kelson <dkelson@dont-contact.us>
Date: Wed, 11 Feb 1998 21:05:32 -0700 (MST)

> Maybe someone with more perl coding experience than me could write a script
> to centrally telnet to port 80 and when the connection fails to mail the
> admins, or even beep a pager.

Perl has too much startup overhead.

Try

#!/bin/ksh
if telnet www.webserver.com 80 >/dev/null 2>&1 <<!
q
!
then
  true
else
  # restart WebServer
  #echo "Restarting..."
  mailx -s 'Web Server Down' admin@isp.com < /dev/null
  # Restart Server
  /usr/local/sbin/restart.sh
fi

Dax Kelson
Internet Connect, Inc.
Received on Wed Feb 11 1998 - 20:07:10 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:51 MST