Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Sunday, May 20, 2012
How to test Internet connection speed from command line?
There's plenty of websites for it, but they're all Flash, not of much use for servers without graphics mode. Any tool I can use to test up/down bandwidth from Linux command line?
Old question, though this solution is missing from the answers. You could use iperf to test the speed between the to machines, since iperf was designed to measure bandwidth.
on machine1 (host, this one will receive)
iperf -s -p 65000
on machine2 (client, this one will upload)
iperf -c [ip of server] -p 65000
Reverse the machines to test the other way (upload->download or vica versa).
ab - the apache benchmark tool comes with most installs of apache, can be used to test downstream bandwidth. You could probably use curl for upstream tests
Pick a large file from a fast source and grab it using wget or curl, A good file to download is Windows XP SP2, large file size and Microsoft's servers allow a very high download speed, unlike some providers who set a per download speed cap.
If you have access to a unix shell on a server somewhere, you can use SCP to move a file between your computer and the server and vice-versa. It gives you the speed of the file transfer.
Another tool that seems to be built for exactly this use is Netperf, although it seems really complicated. After reading docs for half an hour I gave up and wrote my own.
Well I am faced with the same problem and I've decided that the only exhaustive way to test my internet speed is to use a bittorrent client.
Otherwise you never know if it's the route you are using and there might a problem with any specific set of routes however if instead you use a bit torrent client you can find out exactly how many bits the internet can stuff down your pipes (and vice versa) if we are trying really hard.
Selecting the correct torrent file is an exercise left up to the reader. I wanted wiki leaks but I think I'm going to have to go with some os torrent because I want something reliable.
I usually just find a large file somewhere (such as a Linux distro ISO) and use ftp or wget to download it.
ReplyDeleteI don't think FTP gives you a figure until it's finished, but wget gives you a running commentary.
wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
ReplyDeleteOld question, though this solution is missing from the answers.
ReplyDeleteYou could use iperf to test the speed between the to machines, since iperf was designed to measure bandwidth.
on machine1 (host, this one will receive)
iperf -s -p 65000
on machine2 (client, this one will upload)
iperf -c [ip of server] -p 65000
Reverse the machines to test the other way (upload->download or vica versa).
I prefer the stats from curl
ReplyDeletecurl -o /dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
ab - the apache benchmark tool comes with most installs of apache, can be used to test downstream bandwidth. You could probably use curl for upstream tests
ReplyDeletePick a large file from a fast source and grab it using wget or curl, A good file to download is Windows XP SP2, large file size and Microsoft's servers allow a very high download speed, unlike some providers who set a per download speed cap.
ReplyDeleteIf you have access to a unix shell on a server somewhere, you can use SCP to move a file between your computer and the server and vice-versa. It gives you the speed of the file transfer.
ReplyDeleteTry http://speedof.me
ReplyDeleteThis site is not flash-based. As it is based on html5 technology, it can be run from any browser on any OS.
An easy way would be to time wget/curl then divide the filesize by the time.
ReplyDeleteeg. 654mb linux distro -- 20 mins
32.7 mb/min
558.08 kb/sec
Guys,
ReplyDeleteI think you can use "iftop" package... you can download the rpm on http://checksuite.sourceforge.net/dl/.
cheers
Linox
iftop is the way to go, but require libpcap and ncurses: ex-parrot.com/~pdw/iftop/
ReplyDeleteIt is of course a linux utility, but a port is available for OSX via: macports.org/ports.php?by=name&substr=iftop
curl 'http://speedtest.wdc01.softlayer.com/downloads/test500.zip' -o test.zip
ReplyDeleteI have not reached speed limit at other end here - curl -o /dev/null http://download.thinkbroadband.com/1GB.zip
ReplyDeleteAnother tool that seems to be built for exactly this use is Netperf, although it seems really complicated. After reading docs for half an hour I gave up and wrote my own.
ReplyDeleteWell I am faced with the same problem and I've decided that the only exhaustive way to test my internet speed is to use a bittorrent client.
ReplyDeleteOtherwise you never know if it's the route you are using and there might a problem with any specific set of routes however if instead you use a bit torrent client you can find out exactly how many bits the internet can stuff down your pipes (and vice versa) if we are trying really hard.
Selecting the correct torrent file is an exercise left up to the reader. I wanted wiki leaks but I think I'm going to have to go with some os torrent because I want something reliable.