Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Our home broadband (TWC/RoadRunner/San Diego) intermittently drops out for minutes at a time. In WinXP, I had a logger that would ping one or more sites (e.g. Yahoo.com), log the ping times, and display the data in an interactive graph. This was very useful in showing the ISP tech (I didn't know about Shibboleet then).

The problem is still unsolved after two visits, but now I'm using Ubuntu 10.04. I'm looking for a similar tool. I'm a Linux newb (i.e. "just write a script" isn't helpful at this point), so I'm hoping for something user-friendly with a GUI.

Can anyone recommend a Linux utility that...

  • Logs ping times
  • Displays results graphically
  • Doesn't require advanced Linux skills to set up

Thanks.

share|improve this question

closed as off-topic by gronostaj, ϺОŞΣŞ, Tog, Kevin Panko, Mokubai Nov 25 '13 at 22:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve. Here are a few suggestions on how to properly ask this type of question." – gronostaj, ϺОŞΣŞ, Tog, Kevin Panko, Mokubai
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 1 down vote accepted

I run Cacti with a template for it called SmokePing. It is fantastic for showing the link, and latency on the link. I have rural wireless, and have latency all over the map.

share|improve this answer

I found this excellent website http://testmy.net/ which can run automatic speed tests on your network. You can set it to test upstream, downstream speed or both and you can set it to test regularly (say every 15 minutes) up to 100 times (which would give 25 hours of logging). It shows the results in a nice graph.

I also wrote a script to monitor my broadband connection. It pings 5 addresses every second (you could change it to as many or as few as you like) and logs the results. It's not graphical but it shows some useful information. You will need to run it from a terminal but it's not hard to use.

Here is my script

#!/bin/bash
# Script to monitor network up-time and down-time. It works by repeatedly pinging a number of addresses. 
# Script written by Eleanor Ellis, 24 November 2013. If you want to get in touch with me or offer me a job (Oh yeah, wishful thinking!), then please email me at eleanor DOT ac DOT ellis AT gmail DOT com (you know how it works - I don't want loads of spam).

# http://superuser.com/questions/212869/graphical-broadband-connectivity-logger-for-linux-ubuntu/680015#680015
declare -i seconds=1
Initialising=true
Address[1]="192.168.1.1"    ; Description[1]="Router LAN interface  " # Change this IP address to whatever yours is.
Address[2]="78.149.164.211" ; Description[2]="Router WAN interface  " # Change this IP address to whatever yours is.
Address[3]="78.151.235.131" ; Description[3]="Primary DNS       " # Change this IP address to whatever yours is.
Address[4]="62.24.139.9"    ; Description[4]="Secondary DNS     " # Change this IP address to whatever yours is.
Address[5]="google.com"     ; Description[5]="External site     " # Change this address to whatever you want.

# Add more addresses if you want but do remember to change the number in the loop below to match.

echo Checking network connectivity."
echo Only changes of state will be logged, for example when connectivity is lost or regained.

for i in {1..5}; do    # Change this loop to reflect how many addresses you want to ping.
    PingSucceededLastTime[$i]=false
    let FailCount[$i]=0
    let SuccessCount[$i]=0

done

while true; do 
    for i in {1..5}; do
        ping -c 1 ${Address[$i]} >/dev/null

        if [ $? -eq 0 ]
        then # Ping Command completed successfully
            if [ ${PingSucceededLastTime[$i]} == false ] || [ $Initialising == true ]
            then
                printf "\n`date`: Ping to ${Description[$i]}: ${Address[$i]} succeeded after ${FailCount[$i]} failed pings. "
                PingSucceededLastTime[$i]=true
                let SuccessCount[$i]=1
            else
                let SuccessCount[$i]=${SuccessCount[$i]}+1
            fi
        else
            if [ ${PingSucceededLastTime[$i]} == true ] || [ $Initialising == true ]
            then
                printf "\n`date`: Ping to ${Description[$i]}: ${Address[$i]} failed after ${SuccessCount[$i]} successful pings. "
                PingSucceededLastTime[$i]=false
                let FailCount[$i]=1
            else
                let FailCount[$i]=${FailCount[$i]}+1
            fi
        fi
    done

    Initialising=false
    sleep $seconds
    printf "-"
done

You will need to save this to a text file. I called mine check-connectivity.sh and saved it in my home directory.

Next you will need to make the script executable: either right-click on it in your file browser of choice and set the "executable" permission or in a terminal type chmod +x check-connectivity.sh or whatever filename you used.

To run the script, in a terminal type ./check-connectivity.sh

This will display something like this in your terminal

Checking network connectivity.
Only changes of state will be logged, for example when connectivity is lost or regained.

Sun Nov 24 12:57:31 GMT 2013: Ping [1] to Router LAN interface  : 192.168.1.1 succeeded after 0 failed pings. 
Sun Nov 24 12:57:31 GMT 2013: Ping [2] to Router WAN interface  : 78.149.164.211 succeeded after 0 failed pings. 
Sun Nov 24 12:57:31 GMT 2013: Ping [3] to Primary DNS       : 78.151.235.131 succeeded after 0 failed pings. 
Sun Nov 24 12:57:31 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 succeeded after 0 failed pings. 
Sun Nov 24 12:57:31 GMT 2013: Ping [5] to External site     : google.com succeeded after 0 failed pings. ---------------------------------------------------
Sun Nov 24 12:58:46 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 failed after 51 successful pings. -
Sun Nov 24 12:58:47 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 succeeded after 1 failed pings. --
Sun Nov 24 12:58:59 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 failed after 2 successful pings. -
Sun Nov 24 12:59:01 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 succeeded after 1 failed pings. ------------------------------------------------------------------------------------------------------------------------------------------------------
Sun Nov 24 13:02:18 GMT 2013: Ping [3] to Primary DNS       : 78.151.235.131 failed after 205 successful pings. -
Sun Nov 24 13:02:19 GMT 2013: Ping [3] to Primary DNS       : 78.151.235.131 succeeded after 1 failed pings. ----------------------------------
Sun Nov 24 13:03:09 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 failed after 185 successful pings. -
Sun Nov 24 13:03:10 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 succeeded after 1 failed pings. ---------------------------------------------
Sun Nov 24 13:04:13 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 failed after 45 successful pings. -
Sun Nov 24 13:04:15 GMT 2013: Ping [4] to Secondary DNS     : 62.24.139.9 succeeded after 1 failed pings. ----------------------------------------------------------------------------------------------------------------------------------------
Sun Nov 24 13:07:16 GMT 2013: Ping [5] to External site     : google.com failed after 423 successful pings. -
Sun Nov 24 13:07:17 GMT 2013: Ping [5] to External site     : google.com succeeded after 1 failed pings. ---------------------------------------------
Sun Nov 24 13:08:20 GMT 2013: Ping [5] to External site     : google.com failed after 45 successful pings. -
Sun Nov 24 13:08:21 GMT 2013: Ping [5] to External site     : google.com succeeded after 1 failed pings. ------------------------------------------
Sun Nov 24 13:09:24 GMT 2013: Ping [5] to External site     : google.com failed after 42 successful pings. -
Sun Nov 24 13:09:25 GMT 2013: Ping [5] to External site     : google.com succeeded after 1 failed pings. -------------------------------------
Sun Nov 24 13:10:18 GMT 2013: Ping [1] to Router LAN interface  : 192.168.1.1 failed after 550 successful pings. -
Sun Nov 24 13:10:19 GMT 2013: Ping [1] to Router LAN interface  : 192.168.1.1 succeeded after 1 failed pings. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sun Nov 24 13:14:26 GMT 2013: Ping [5] to External site     : google.com failed after 240 successful pings. -
Sun Nov 24 13:14:28 GMT 2013: Ping [5] to External site     : google.com succeeded after 1 failed pings. ---------------------------------------------------------------------------------------------------------------------------------------------

You can see that the script is working because each time a ping is sent, the script prints a hyphen after the success or failure message so you will see the line of hyphens getting longer.

If you want to log this to a file, in a terminal type ./check-connectivity.sh > connectivity.log

I did all this in my home directory, so my script and the log file are both in the home directory where I can easily find them. Feel free to do it in a different directory.

I hope this is helpful. All the best! Eleanor Ellis

Acknowledgements I learnt how to do this by customising a script found at http://linuxconfig.org/bash-scripts-to-scan-and-monitor-network, so thanks to the author of that article!

I also googled lots to find out how to handle variables, integers, arrays and so on in BASH (the Bourne Again Shell). I learned a lot about BASH scripting by making this script so don't be afraid to have a go!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.