Network status logger for Linux?
September 24, 2005 11:44 PM   Subscribe

Looking for a Linux tool to monitor network status.

Something simple that will ping an IP or two, on chosen schedule, and log the results including ping results and time. WinXP equivalent also useful.
posted by Goofyy to Computers & Internet (17 answers total)
 
Smokeping may be overkill, but it's cool.
posted by aneel at 11:57 PM on September 24, 2005


Nagios is the standard, though it doesn't appear to be simple.
posted by RikiTikiTavi at 1:29 AM on September 25, 2005


Am I missing something?

What is wrong with:

ping -i 60 192.168.1.2 > ping.log &

Sounds to me like someone needs to man ping and learn about redirection.
posted by i_am_joe's_spleen at 1:32 AM on September 25, 2005


log the results including ping results and time

Sounds to me like someone needs to learn how to read the question.
posted by grouse at 1:50 AM on September 25, 2005


Response by poster: You gotta lotta spleen, Joe. RTFQ.
That doesn't log the time of day. Read before you snark.

Smokeping isn't simple, haven't checked out Nagios yet, (and RikiTiviTavi notes it isn't simple).

We're seeing intermittent slowdowns over the WiFi here, and trying to fathom what is happening. Just pinging the router is flaky, for no reason we can identify. Having such a tool also offers other uses. No reason to suppose interference from another system or someone tapping in.
posted by Goofyy at 1:51 AM on September 25, 2005


Best answer: Goofyy: how about this? It was one of the suggestions I found searching Google Groups for ping timestamp.

Of course, it doesn't get any simpler than a script like this:

while true; do
    echo -n "$(date) "
    ping -c 1 $2 | fgrep icmp_seq
    sleep $1
done
And an example of running it:
$ ./ping-ts.sh 1 www
Sun Sep 25 10:07:25 BST 2005 64 bytes from www (127.0.0.1): icmp_seq=0 ttl=253 time=0.426 ms
Sun Sep 25 10:07:26 BST 2005 64 bytes from www (127.0.0.1): icmp_seq=0 ttl=253 time=0.408 ms

(etc)
posted by grouse at 2:09 AM on September 25, 2005


Those linebreaks looked fine in live preview. :(
posted by grouse at 2:10 AM on September 25, 2005


Nagios is really unsimple.
posted by aneel at 2:15 AM on September 25, 2005


The FQ does not say "time of day". It says "time", which I interpreted as the time taken for a response packet. We do after all frequently refer to "ping times". My answer is correct as far as the question goes.

Put grouse' script in cron and you have your scheduling also.

Sorry for the snark, but your question did not make sense to me as put.
posted by i_am_joe's_spleen at 2:17 AM on September 25, 2005


Then don't answer it at all, or just give your suggestion of how to solve the problem with PING and redirection without the snark. AskMe is not the place to air your disdain for people who know less about something than you do - it's about helping them to learn.
posted by benzo8 at 2:40 AM on September 25, 2005


It's not free for commercial use, but Big Brother is pretty good. It's at www.bb4.org. They charge exorbitant amounts for the Professional version, but the basic version is available for free download. If you're not going to use it commercially, that should take care of you.

It's oriented around pinging/monitoring many hosts, not just one or two, but it should work fine. One or two is just a special case of many. :)

Complexity level is moderate... there's quite a bit to do to get it running, but none of the individual steps are terribly hard. And if you want to add new hosts later, it'll handle a really large number of targets.
posted by Malor at 3:06 AM on September 25, 2005


I thought everyone just used nmap or ethereal.
posted by The Jesse Helms at 7:33 AM on September 25, 2005


Then there's mon.cgi.
posted by The Jesse Helms at 7:35 AM on September 25, 2005


We use nagios at work and it might not be simple, but it's complete. Really complete.
posted by boo_radley at 10:50 AM on September 25, 2005


Response by poster: Thanks Grouse. That wins from simplicity. A little problem if the ping doesn't come back, but we think we can work around it. It just repeats the date/time, but without inserting a [cr]. Makes it hard to parse the file for analysis (something I'll enjoy doing anyway).

Appreciate the other ideas, but the tools are too complex for the simple application for which we wanted to use it. Pity, really. Smokeping looks fabulous, but too many dependencies.

Joe's Spleen: Sorry for your confusion, to me, "ping results" is the response time, so "time" would be the when of the ping. But I've wished to opportunity to accuse you of 'spleen' since seeing your nick. I'm a smart ass :-P
posted by Goofyy at 10:55 AM on September 25, 2005


Do you know perl? Look into the Net::Ping module. Also, check Perlmonks, I'd be suprised if this didn't already exist as a perl script.
posted by phrontist at 11:48 AM on September 25, 2005


Goofyy: just replace ping -c 1 $2 | fgrep icmp_seq with ping -c 1 $2 | fgrep icmp_seq || echo or actually add some text in there.
posted by grouse at 12:18 PM on September 25, 2005


« Older Replacing laptop speakers   |   List Of Things For New Math Teachers Newer »
This thread is closed to new comments.