Re: [Hampshire] Simple way to monitor network uptime?

Top Page

Reply to this message
Author: Jamie Webb
Date:  
To: hampshire
Subject: Re: [Hampshire] Simple way to monitor network uptime?
On Wed, Nov 22, 2006 at 09:07:08PM -0500, Andy Random wrote:
>
> Hi,
>
> I'm looking for a simple/easy/quick way to monitor my net connection and
> generate stats on number and duration of outages.
>
> I have an intermittent issue with my broadband connection right now and I
> want to gather some simple stats on just how bad the problem.
>
> I know there are a number of large powerful packages that will monitor
> almost everything but I'm also short of time and just want something
> simple/easy to set up which will tell me when and how long the net
> connection was down. Any suggestion?


Just run a cron job?

(ping -c1 www.google.com >/dev/null 2>&1 \
    && echo `date -Is` UP \
    || echo `date -Is` DOWN) > pinglog


Then 'grep DOWN pinglog | wc -l' gives you the total downtime, 'uniq
-c -f1 pinglog | grep DOWN' gives you a list of outages with start
time and duration, etc.

-- Jamie Webb