0
Is it possible to get bandwith troughput on Linux terminal? I am looking for the equivalent of a Speedtest (by Ookla).
0
Is it possible to get bandwith troughput on Linux terminal? I am looking for the equivalent of a Speedtest (by Ookla).
0
Here is one speed test service you can access via terminal: http://www.linuxandubuntu.com/home/speedtest-cli-internet-speed-test-in-linux-terminal
How to install Speedtest CLI in Linux
The installation is easier than you expect. Since it is already in the official repositories, you can install it by simply typing the following command in your terminal.
sudo apt-get install speedtest-cli
Since the tool has been written in python and you can also install it via pip.
python3 -m pip install --user speedtest-cli
How to test Internet speed right from the terminal
Run speedtest-cli
from the terminal.
$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from JPR Digital Pvt Ltd (183.87.181.182)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Vodafone India (Mumbai) [1.15 km]: 9.896 ms
Testing download speed................................................................................
Download: 30.03 Mbit/s
Testing upload speed......................................................................................................
Upload: 5.04 Mbit/s
You can also make some changes, like in the above test the values are in bits. Now you might want to read the values in bytes. To do that simply add a --bytes
trailing your command.
In my experience, and as per my answer - I've found speedtest-cli to show significantly worse performance than my rated, and actual network connection. Now I'm a little curious how they would compare on lesser connections. – Journeyman Geek – 2019-05-23T03:04:29.993
Thank You for help! – None – 2019-05-23T14:15:44.983
0
I highly recommend the command line tool known as nload
. This does not give you a Speedtest (by Ookla) kind of summary, but rather it allows you to monitor any/all network traffic in realtime. The is like an EKG (electrocardiogram) for network traffic on any/all ports on your machine:
nload
is a console application which monitors network traffic and bandwidth usage in real time. It visualizes the in- and outgoing traffic using two graphs and provides additional info like the total amount of transfered data and min/max network usage.
Once installed—via whatever package manager you use; it’s a very common tool—just type in nload
to see a live graph of inbound and outbound traffic in realtime. Use the left and right arrow keys on your keyboard to cycle through all of your system’s network interfaces.
I find it very useful when attempting to diagnose bottlenecks when doing any network related work.
Thank You for help! – None – 2019-05-23T14:16:19.237
@IntelliCoCR Thanks! If you found this answer to be helpful, please be sure to upvote it. And if it is the answer that solved your issue, please be sure to check it off as such. – JakeGould – 2019-05-23T14:32:14.963
0
You can do something as 'simple' as checking the average time/speed it takes to curl/wget a file.
I've run the speedtest application that's in the repositories, as talked about in Brian's answer and its inaccurate. I prefer speedtest++ - it needs compiling and a few small prerequisites.
Compared to speedtest cli, it gets results closer to my line speed, and what the speedtest website shows. It might be my gigabit connection but that's no excuse for inaccuracy. Interestingly, speedtest-cli connects to the same ISP I use - so I'm unsure why this is. It also uses the TCP method that the speedtest website uses, though this is apparently not documented.
My line's supposed to be gigabit, and I have the applications running on a linux router connected directly to the ONT, so the bottleneck isn't in my system. Client side, you may find other things affecting your readings, like other applications or network bottlenecks.
On the same line, minutes apart
geek@heckate_router:~$ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Singtel Fiber (XXX.XXX.X.XXX)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Singtel (Singapore) [6.13 km]: 219.284 ms
Testing download speed................................................................................
Download: 698.09 Mbit/s
Testing upload speed......................................................................................................
Upload: 311.51 Mbit/s
As opposed to speedtest ++
geek@heckate_router:~$ SpeedTest
SpeedTest++ version 1.14
Speedtest.net command line interface
Info: https://github.com/taganaka/SpeedTest
Author: Francesco Laurita <francesco.laurita@gmail.com>
IP: XXX.XXX.X.XXX ( Singtel Fiber ) Location: [1.2929, 103.855]
Finding fastest server... 8149 Servers online
............
Server: Singapore www.speedtest.com.sg:8080 by NewMedia Express (6.13142 km from you): 2 ms
Ping: 2 ms.
Jitter: 0 ms.
Determine line type (2) ........................
Fiber / Lan line type detected: profile selected fiber
Testing download speed (32) .................................................................................................................................................................................................................................................................................................
Download: 1004.18 Mbit/s
Testing upload speed (12) ..............................................................................................................................................................................................................................................................................................................................................................................................................................................
Upload: 1020.92 Mbit/s
There's probably a dozen other options on github that might work, but this seems to work well for me.
Thank You for help! – None – 2019-05-23T14:16:02.223
1You mean view how much bandwidth is being used at the time? Or do you want to do the equivalent of a speed test? – ivanivan – 2019-05-22T23:24:22.203
A tool professionals use to test between 2 points is iperf – davidgo – 2019-05-23T09:03:55.843
Thank You! Actually i am going to use iperf for client server bandwith test! – None – 2019-05-23T14:06:20.457