Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jan 2006 21:35:56 -0800
From:      Micah <micahjon@ywave.com>
To:        brianjohn@fusemail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: script to monitor internet connection
Message-ID:  <43BF533C.6050206@ywave.com>
In-Reply-To: <52231.71.37.238.58.1136553753.fusewebmail-19592@webmail.fusemail.com>
References:  <52231.71.37.238.58.1136553753.fusewebmail-19592@webmail.fusemail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian John wrote:
> Hello,
> I would like to write a script to monitor my internet connection status. 
> My home connection goes down fairly often and I would like to get an idea
> for just how often it goes down and if possible how long it goes down for.
>  Could someone help me write a script that will check my connection to the
> internet and log whenever it goes down and possibly how long it goes down
> for?  I want to have some evidence to give to my ISP that my connection is
> going down.
> 
> Thanks
> 
> /Brian

If there really is nothing in the ports collection or google, you might 
start with pinging from a cron job.  Something like:
#!/bin/sh
ping -c 1 my.isps.main.server.example.com 2> /dev/null > /dev/null
echo `date`: Ping returned $? >> /var/log/ispevidence.log

HTH,
Micah



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43BF533C.6050206>