Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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! :)

share|improve this answer

If you have someplace to setup a remote endpoint, you could use iPerf really easily: http://sourceforge.net/projects/iperf/

Speedtest.net does have their "Mini" that lets you setup your own hosted utility. Maybe you could utilize that, especially since they provide the Flash app and scripts to host it: http://speedtest.net/mini.php

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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