Know a way to parse Speed Test results

bandwidthperformancerate-limiting

I like SpeedTest.net, but what I'd really like to do is put a graph in cacti, run a speed test every half-hour, and graph the results (maybe running it three times each time and averaging it).

I can do the cacti part, but I need a script (perl, python, php, bash, ruby, whatever) that can produce speed results. Does anyone know a script that does this, or a webpage that would be script-friendly I could hit and parse?

Best Answer

I don't have a full answer but I do have a sample bash script that you could use.

Something like the command:

/usr/bin/time -f '%e' curl -s http://download.thinkbroadband.com/10MB.zip -o /dev/null 

Will result in a string with the number of seconds it took to download the file to the system. Divide the KB of the filesize (known) to get the KB/s, roughly.

Note that there are so many factors at play in internet bandwidth, that speed constrictions on either endpoint or routers in between can impact this result. Also, make sure you own the remote server if you are planning on running this 'download' test often; bandwidth isn't free! :)

Related Topic