[last update 2014-11-14, before that 2013-7-29]

speedtest-cli new install script as the git repo changed for it alittle, also a little cool script to test local server and a few other servers and output results to screen and file.

HOW TO INSTALL SIMPLE WAY

If get ssl error:

The difference is that its not as deep nested now

Now to run script

Now you are done, if you want to make this program permanent so its not sitting in your home folder. The best option is to move it to one of your PATH variablaes (linux constantly checks those when you type any command in to see if its there)

I see that /usr/local/bin is one of my paths

I dont need to chmod +x as this file already has all the right permissions

Now from any directory running speedtest-cli will do a test

Confirm it works:

After you confirm it works delete the download directory

Okay now here is some usage

lists all of the ten billion million servers

test with anyone like this

like to test with Optimum Online server in New York, NY USA

To get a picture of your results to share with the speedtest network or your friends/family/coworkers

or

or instead of 663 any other valid server number

Next here is my script to list with a few servers plus the closest one to you (remember when not specifying a server it picks the closest one based on ping)

Get a list of servers like this

So then pick a few servers from the million numbers that outputs.

I picked 3864 2065 663 2789 2362 3047 1337 251 3927 2195 that kinda spans the world enough for me

So here is the awesome command, just type it out in notepad and then copy it out and paste it into your shell:

 

Hopefully that doesnt have typos, I had to write it out, my googlesites kept crashing when I was trying to paste this in, and I am too lazy to fix it tommorow or do this tommorow so I am doing this now and had to type it out by hand…

Anyhow below is the old article there are a few other cool methods, this is just a rerendition of METHOD4 updated for how it is now, it might be different by the time you get to it.

Finally if you get any errors make sure you have the latest python requirements and google “speedtest-cli linux requirements”

UPDATE 2014-11-14: scriptlet to run speedtest-cli  against many servers across the world

Here is a better script (just do the prereq steps listed, in comment section – they are not commented out so you can copy paste them). The main part of the script below the prereq script, is meant to work so you can copy paste it into a shell and run the test (you dont need to make a script out of this)

 

 

 


 

LINUX – TEST INTERNET CONNECTION – SPEED TEST – INTERNET SPEED TEST

 

METHOD1: wget

METHOD2: lftp

METHOD3: iperf

METHOD4: speedtest-cli

METHOD5: script that runs wgets

 

METHOD 1a

 

 

another way just saves 9 keystrokes or so

 

 

 

Then control C when you see the speed

 

METHOD 1b

 

 

 

METHOD 2

 

 

DOWNLOAD:

 

UPLOAD:

METHOD 2 – Good for local tests too

ON SERVER & CLIENT:  apt-get install iperf

BASIC IDEA:

SERVER:  iperf -s  or  iperf -s -p PORT 

CLIENT: iperf -c SERVERIP  or  iperf -c SERVERIP -p PORT 

SERVER HAS A PUBLIC IP:

-B on server is optional it binds to specific interface, in this case the WAN IP is on the SERVER

ON SERVER:

ON CLIENT:

SERVER BEHIND PUBLIC IP / GOOD WITH LOCAL TESTS JUST CHANGE IPS:

WITH PORT 44444 PORT FORWARDED @ SERVER NETWORK TO SERVER:

ON SERVER:

ON CLIENT:

IPERF OPTIONS FROM http://doc.pfsense.org/index.php/Iperf_man_page

METHOD 3

See the top of the article for speedtest-cli from git

 

METHOD 4

WRITE THIS SCRIPT: netspeed.sh

 

One thought on “LINUX – CLI Internet Connection Speed Tests

Leave a Reply

Your email address will not be published. Required fields are marked *