TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:8903] Testing internet connection reliability



On Sat, 2 Oct 1999, Ben Beuchler wrote:

> I'm starting to play with my new DSL, running qmail and Apache servers...
> Even have a domain or two of my own.  I would like to be able to provide
> e-mail forwarding for my friends and maybe host their personal sites.
> However, I'm a little nervous about the reliability of my internet
> connection.  Is there some sort of script or program that will test it at
> regular intervals (maybe pinging a reliable host) and log the results?

First of all, I've found DSL to be pretty reliable. I've had a few
downtimes in the past, but nothing significant. Of course, this depends on
your ISP/telco mix. Anyway, if you need something that tests your
conectivity for you, try this:

#!/bin/sh
LOG="/var/netlog"  # plug  what you want the logfile to be in here
ENDPT=""   # location to ping -- you could use yahoo or whatever you
           # want, but use an IP addr if possible

while true
do
	ping -c1 $ENDPT 2>/dev/null 1>&2
	[ $? -ne 0 ] && {
		echo "unable to reach network at `date`" >> $LOG
	}
done

hope that helps

~Dan