New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
command line speedtest.net via tespeed
I recently got my Raspberry Pi after five months on the waiting list. I was running it headless via ssh, but I wanted to know its networking speed. After a bit a googling, I found "tespeed", a command line interface to the actual speedtest.net servers:
https://github.com/Janhouse/tespeed
It worked nicely, and I also started measuring the speeds of my various linux lowendboxen. It works very nicely after adding the python-lxml module to stock Python on debian installations. It's interesting to watch speedtest.net increase the transfer size by a factor of two at each stage.
Comments
Thanks for the link and info, was looking for something like this to use from ssh
awesome.. it says 400MB download and 202MB upload.. @Simplenode
Neat find. Seemingly pretty alpha stage software.
A tad confusing on the output. I get this:
Download speed: 226.45 Mbit/s
Download size: 16.18 MiB; Downloaded in 0.03 s
Download speed: 506.35 Mbit/s
Download size: 35.78 MiB; Downloaded in 0.07 s
Download speed: 518.21 Mbit/s
Download size: 63.56 MiB; Downloaded in 0.10 s
Download speed: 646.71 Mbit/s
Download size: 142.98 MiB; Downloaded in 0.23 s
Download speed: 633.88 Mbit/s
Download size: 253.05 MiB; Downloaded in 0.42 s
Download speed: 596.00 Mbit/s
Download size: 379.57 MiB; Downloaded in 0.90 s
Download speed: 421.00 Mbit/s
Download size: 595.58 MiB; Downloaded in 1.40 s
Download speed: 424.15 Mbit/s
Download size: 855.21 MiB; Downloaded in 2.05 s
Download speed: 416.47 Mbit/s
Download size: 1164.58 MiB; Downloaded in 2.78 s
Download speed: 419.66 Mbit/s
Download size: 2024.02 MiB; Downloaded in 6.41 s
Download speed: 315.75 Mbit/s
Upload size: 2.10 MiB; Uploaded in 0.03 s
Upload speed: 64.97 Mbit/s
Upload size: 2.10 MiB; Uploaded in 0.03 s
Upload speed: 65.40 Mbit/s
Upload size: 4.19 MiB; Uploaded in 0.05 s
Upload speed: 77.21 Mbit/s
Upload size: 4.19 MiB; Uploaded in 0.05 s
Upload speed: 86.31 Mbit/s
Upload size: 16.78 MiB; Uploaded in 0.10 s
Upload speed: 168.41 Mbit/s
Upload size: 16.78 MiB; Uploaded in 0.08 s
Upload speed: 204.32 Mbit/s
Upload size: 134.22 MiB; Uploaded in 0.60 s
Upload speed: 224.78 Mbit/s
Upload size: 134.22 MiB; Uploaded in 0.58 s
Upload speed: 231.01 Mbit/s
Upload size: 134.22 MiB; Uploaded in 0.57 s
Upload speed: 235.21 Mbit/s
Upload size: 134.22 MiB; Uploaded in 0.58 s
Upload speed: 232.52 Mbit/s
Otherfolks seeing similar when testing? Do we just take the last value as the speed?
@pubcrawler: appears to be the last "Download size" file that it's showing.
Well, if you check the README at git, you can see that the script uses the 5 nearest locations. VPSeS are inside Datacenters.. so the nearest locations probably is another datacenter in the same US-state. That means sholdn't be used as a "real" speed to users from your server. Maybe you can use the value with less speed as the "minimum speed" to someone close to your server.
Running it with the -w and -s switches yield:
79.54,47.91,"Mbit","http://68.71.31.19/speedtest/speedtest/"
As the only output. Appears to be the highest numbers from the tests that it runs.
Interesting @Damian. I am short on RTFM today
Promising tool even if a bit off in some way.
the -s and -w combo is interesting.
The no output at runtime though leaves you hanging and wondering
command: python tespeed.py -s -w
660.05,239.69,"Mbit","http://spt01sghlga.sghl.ga.charter.com/speedtest/"
Indeed, but it would be good for monitoring via Munin or Observium or something. I considered a Munin graph, but it would probably ruin my commit.
Hi guys!
Thanks for noticing it!
I did some work on it tonight to get better results on boxes with >100Mbit connections.
I would suggest collecting data for drawing graphs by running a cronjob with something like
./tespeed.py -w -s >> data.csv
(you might also want to add a timestamp).This is one example of how someone uses it: https://docs.google.com...
(Scroll to the right to see the graph.)
You can read more about it on
https://github.com/masteinha...
and
https://github.com/jaekwo...
By the way, you can also use only
-w
flag and still send the output to file. Everything except the CSV data is written to STDERR.So
./tespeed.py -w >> data.csv
will write the same thing as./tespeed.py -w -s >> data.csv
. In the 1st case you will also be able to monitor the output as the test is happening.Line for cronjob:
echo
date +%s
,date +'%d/%m/%Y %H:%M:%S'
,python /home/user/tespeed/tespeed.py -w -s
>> /home/user/tespeed.csvNifty examples
Welcome aboard @Janhouse!
Thanks for noticing it!
>
Welcome to our community! Your tespeed script is very nice, thank you for it!
Not too bad.
565.43,429.39,"Mbit","['http://speedtest.vodafone-ip.de/speedtest/']"
Thanks very much! This is very helpful. I made a post about this on : pythonforbeginners.com so that more Python people can use it I hope you don't mind.
The output I see here suggests the script's author has some confusion over bits and bytes...
A typo maybe? About mebibytes (not mebibits?)
cool. I wouldn't recommend using speedtest.net's servers tho, cuz sometimes they are overloaded. I would recommend using provider speedtests such as linode, etc.
Accurate speed must be substained longer than 7 secs. Malware 101...
@fly
linode? screw that. softlayer bro.