Q:

How do I do an internet speedtest from CLI on Raspbian?

I am have a couple pi's running headless raspbian that I SSH into, I wanted to know if there is any speedtest utility that I can use.
I am aware that I can download a file and check the speed that way but I wanted comprehensive download/upload data kind of what speedtest.net provides but CLI version of it.
Is that possible?
Thanks for the help

A:

I used the following commands to install and execute the speedtest:
1.sudo apt-get install python-pip 
2.sudo easy_install speedtest-cli 

to execute "speedtest-cli" 

works like a charm thanks Phil 

A:

There is a package on github that does a speedtest.net sampling from the commandline, it is located here: https://github.com/sivel/speedtest-cli. Note that the author points out several potential pitfalls:

There is the potential for this tool to report results inconsistent
  with Speedtest.net. There are several concepts to be aware of that
  factor into the potential inconsistency:

Speedtest.net has migrated to using pure socket tests instead of HTTP based tests 

This application is written in Python. Different versions of Python will execute certain parts of the code faster than others
CPU and Memory capacity and speed will play a large part in
  inconsistency between Speedtest.net and even other machines on the
  same network

