My Internet connection has been flaky for a while. I wonder what the options are to monitor and somehow store statistics (over time) for when my modem loses and regains Internet connectivity.

I wish to use this information when I contact my ISP.

I'm thinking, would something like Instruments be able to do this?


I maintain a script that chooses a random server that's known to respond to pings, and performs 100 pings (one second apart). I run this script by hand as a first indicator to determine if I'm having a connectivity or signal quality problem.

The ping command I use is ping -c 100 [server-hostname]

I chose hostnames for my script that were known to respond to ping at the time that I wrote the script, and I tried to keep the list geographically diverse (for example by using university web servers). But this sort of technique requires maintenance, because servers don't consistently allow ping (server configurations change over time), and things like hosted servers disrupt the geographic diversity issue.

I would think that Automator might be a better fit for this sort of task than Instruments, although if you're adept with scripting (shell, python, perl, etc), you could write a script to do it and use much less memory.

As for your situation, the source(s) of failure should dictate what kind of connectivity testing you do. The problem could be due to a piece of hardware within your home/office that needs to be periodically reset, or even replaced. The ping test I describe above doesn't necessarily isolate the source of the problem.

Edit: and to address analysis/graphing, you could perform a ping test at a regular interval (every # minutes), export the packet loss percentage data in a format such as comma-separated values, and use a spreadsheet program to graph the results.

  • Thanks for your answer, bneely. Your approach in the final edit paragraph might be something I'll look into. One of the considerations that came to my mind in this approach is, if there might be some sort of ping rate threshold on the remote server, that might cause my host to be blocked from further pinging? One way around that would probably be to add and rotate a few more servers in the pink loop, to reduce the rate/payload on a single server (and the risk of being blacklisted). – Henrik Dec 16 '11 at 2:45
  • A little typo there; ping loop, not pink loop. (Too bad one can't edit comments after 5 minutes here.) – Henrik Dec 16 '11 at 2:52
  • Yep, you should actively plan to avoid being detected as the source of a denial-of-service type attack. I don't know what a good threshold is. – bneely Dec 16 '11 at 2:54

I made a simple web app that checks your connection every second and plots the results on a chart: http://netcheck.stimulus.software/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .