Difference between revisions of "Internet speed test using Terminal"

From Ever changing code
Jump to navigation Jump to search
Line 1: Line 1:
= Speedtest.net =
= Speedtest.net =
<source lang=bash>
  sudo apt-get install python-pip
  sudo apt-get install python-pip
  pip install speedtest-cli
  pip install speedtest-cli
</source>
or:
or:
<source lang=bash>
  sudo apt-get install python-setuptools
  sudo apt-get install python-setuptools
  easy_install speedtest-cli
  sudo easy_install speedtest-cli
</source>
This 2nd solution worked on AWS Ubuntu 13.04 Server and it needed ~3Mb (<tt>python-setuptools</tt>) to download versus ~80Mb for <tt>python-pip</tt>


This 2nd solution worked on AWS Ubuntu 13.04 Server and it needed ~3Mb (<tt>python-setuptools</tt>) to download versus ~80Mb for <tt>python-pip</tt>
Run the speedtest:
<source lang=bash>
$ speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Global Crossing (217.156.150.69)...
Selecting best server based on latency...
Hosted by Gigaclear PLC (Slough) [8.91 km]: 13.461 ms
Testing download speed........................................
Download: 23.93 Mbit/s
Testing upload speed..................................................
Upload: 12.27 Mbit/s
</source>


= Wget =
= Wget =

Revision as of 22:50, 12 March 2015

Speedtest.net

sudo apt-get install python-pip
 pip install speedtest-cli

or:

sudo apt-get install python-setuptools
 sudo easy_install speedtest-cli

This 2nd solution worked on AWS Ubuntu 13.04 Server and it needed ~3Mb (python-setuptools) to download versus ~80Mb for python-pip

Run the speedtest:

$ speedtest-cli 
 Retrieving speedtest.net configuration...
 Retrieving speedtest.net server list...
 Testing from Global Crossing (217.156.150.69)...
 Selecting best server based on latency...
 Hosted by Gigaclear PLC (Slough) [8.91 km]: 13.461 ms
 Testing download speed........................................
 Download: 23.93 Mbit/s
 Testing upload speed..................................................
 Upload: 12.27 Mbit/s

Wget

wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip
wget -O /dev/null http://speedtest.sea01.softlayer.com/downloads/test100.zip
curl -o /dev/null http://speedtest.sea01.softlayer.com/downloads/test100.zip

wget -O /dev/null http://ipv4.download.thinkbroadband.com/1GB.zip
wget -O /dev/null http://ipv4.download.thinkbroadband.com:81/1GB.zip
wget -O /dev/null http://ipv4.download.thinkbroadband.com:8080/1GB.zip

iperf

This measures the bandwidth between two locations where one is set as a server and another as a client.

Start up server listening on port 8888. By default it is TCP port 5001 and TCP window size 64.0KB.

/opt/systems/bin/iperf -s -p 8888

Connect client to server on port 8888

/opt/systems/bin/iperf -c your.server.com -l 1300 -p 8888 -P 10

Switches:

-t option used in the above command tells to transfer data for X seconds
-p will tell the client to connect the port 8888 on the server
-w will specify your desired window size value
-u options needs to be also used on the client side for specifying UDP traffic in case server iperf -s -u was used
-P divide results into X time frames aka lines printed
-f m displays results in megabytes

References