script to monitor internet connection
Micah
micahjon at ywave.com
Fri Jan 6 21:35:59 PST 2006
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
More information about the freebsd-questions
mailing list