Linux Tips

How one can take a look at web velocity in Linux terminal

SEOClerks

Discover ways to use speedtest cli software to check web velocity in Linux terminal. Additionally consists of one liner python command to get velocity particulars instantly.

test internet speed in linux terminalWeb velocity examine in Linux

Most of us examine the web bandwidth velocity every time we hook up with new community or wifi. So why not our servers! Here’s a tutorial which can stroll you thru to check web velocity in Linux terminal.

Everybody of us usually makes use of Speedtest by Ookla to examine web velocity. Its fairly easy course of for a desktop. Goto their web site and simply click on GO button. It is going to scans your location and velocity take a look at with nearest server.  If you’re on cell, they’ve their app for you. However in case you are on terminal with command line interface issues are little totally different. Lets see find out how to examine web velocity from Linux terminal.

If you wish to velocity examine solely as soon as and dont need to obtain software on server, soar right here and see one liner command.

Step 1 : Obtain speedtest cli software

To begin with, it’s a must to obtain speedtest CLI software from github repository. Now a days, its additionally included in lots of well-known Linux repositories as effectively. If its their in yours then you may immediately set up that bundle in your Linux distro.

Lets proceed with Github obtain and set up course of. Set up git bundle relying in your distro. Then clone Github repo of speedtest like belwo :

[root@kerneltalks ~]# git clone https://github.com/sivel/speedtest-cli.git
Cloning into ‘speedtest-cli’…
distant: Counting objects: 913, performed.
distant: Whole 913 (delta zero), reused zero (delta zero), pack-reused 913
Receiving objects: 100% (913/913), 251.31 KiB | 143.00 KiB/s, performed.
Resolving deltas: 100% (518/518), performed.

 

[root@kerneltalks ~]# git clone https://github.com/sivel/speedtest-cli.git

Cloning into ‘speedtest-cli’...

distant: Counting objects: 913, performed.

distant: Whole 913 (delta zero), reused zero (delta zero), packreused 913

Receiving objects: 100% (913/913), 251.31 KiB | 143.00 KiB/s, performed.

Resolving deltas: 100% (518/518), performed.

 

Will probably be cloned to your current working listing. New listing named speedtest-cli will probably be created. You possibly can see beneath recordsdata in it.

[root@kerneltalks ~]# cd speedtest-cli
[root@kerneltalks speedtest-cli]# ll
whole 96
-rw-r–r–. 1 root root 1671 Oct 7 16:55 CONTRIBUTING.md
-rw-r–r–. 1 root root 11358 Oct 7 16:55 LICENSE
-rw-r–r–. 1 root root 35 Oct 7 16:55 MANIFEST.in
-rw-r–r–. 1 root root 5215 Oct 7 16:55 README.rst
-rw-r–r–. 1 root root 20 Oct 7 16:55 setup.cfg
-rw-r–r–. 1 root root 3196 Oct 7 16:55 setup.py
-rw-r–r–. 1 root root 2385 Oct 7 16:55 speedtest-cli.1
-rw-r–r–. 1 root root 1200 Oct 7 16:55 speedtest_cli.py
-rwxr-xr-x. 1 root root 47228 Oct 7 16:55 speedtest.py
-rw-r–r–. 1 root root 333 Oct 7 16:55 tox.ini

 

[root@kerneltalks ~]# cd speedtest-cli

[root@kerneltalks speedtestcli]# ll

whole 96

rwrr. 1 root root  1671 Oct  7 16:55 CONTRIBUTING.md

rwrr. 1 root root 11358 Oct  7 16:55 LICENSE

rwrr. 1 root root    35 Oct  7 16:55 MANIFEST.in

rwrr. 1 root root  5215 Oct  7 16:55 README.rst

rwrr. 1 root root    20 Oct  7 16:55 setup.cfg

rwrr. 1 root root  3196 Oct  7 16:55 setup.py

rwrr. 1 root root  2385 Oct  7 16:55 speedtestcli.1

rwrr. 1 root root  1200 Oct  7 16:55 speedtest_cli.py

rwxrxrx. 1 root root 47228 Oct  7 16:55 speedtest.py

rwrr. 1 root root   333 Oct  7 16:55 tox.ini

 

The python script speedtest.py is the one we will probably be utilizing to examine web velocity.

You possibly can hyperlink this script for a command in /usr/bin so that every one customers on server can use it. Or you may even create command alias for it and it is going to be straightforward for all customers to make use of it.

Step 2 : Run python script

Now, run python script with none argument and it’ll search nearest server and take a look at your web velocity.

[root@kerneltalks speedtest-cli]# python speedtest.py
Retrieving speedtest.web configuration…
Testing from Amazon (35.154.184.126)…
Retrieving speedtest.web server checklist…
Choosing greatest server primarily based on ping…
Hosted by Spectra (Mumbai) [1.15 km]: eight.174 ms
Testing obtain velocity……………………………………………………………………..
Obtain: 548.13 Mbit/s
Testing add velocity……………………………………………………………………………………
Add: 323.95 Mbit/s

 

[root@kerneltalks speedtestcli]# python speedtest.py

Retrieving speedtest.web configuration...

Testing from Amazon (35.154.184.126)...

Retrieving speedtest.web server checklist...

Choosing greatest server primarily based on ping...

Hosted by Spectra (Mumbai) [1.15 km]: eight.174 ms

Testing obtain velocity................................................................................

Obtain: 548.13 Mbit/s

Testing add velocity................................................................................................

Add: 323.95 Mbit/s

 

Oh! Dont amaze with velocity. 😀 I’m on AWS EC2 Linux server. Thats the bandwidth of Amazon knowledge heart! 🙂

Totally different choices with script

Few choices which is perhaps helpful are as beneath :

To go looking speedtest servers close by your location use –list swap and grep on your location title.

[root@kerneltalks speedtest-cli]# python speedtest.py –list | grep -i mumbai
2827) Bharti Airtel Ltd (Mumbai, India) [1.15 km]
8978) Spectra (Mumbai, India) [1.15 km]
4310) Hathway Cable and Datacom Ltd (Mumbai, India) [1.15 km]
3315) Joister Broadband (Mumbai, India) [1.15 km]
1718) Vodafone India (Mumbai, India) [1.15 km]
6454) YOU Broadband India Pvt Ltd. (Mumbai, India) [1.15 km]
9764) Railtel Company of india Ltd (Mumbai, India) [1.15 km]
9584) Sheng Li Telecom (Mumbai, India) [1.15 km]
7605) Thought Mobile Ltd. (Mumbai, India) [1.15 km]
8122) Sify Applied sciences Ltd (Mumbai, India) [1.15 km]
9049) I-ON (Mumbai, India) [1.15 km]
6403) YOU Broadband India Pvt Ltd., Mumbai (Mumbai, India) [1.15 km]

 

[root@kerneltalks speedtestcli]#  python speedtest.py –list | grep -i mumbai

2827) Bharti Airtel Ltd (Mumbai, India) [1.15 km]

8978) Spectra (Mumbai, India) [1.15 km]

4310) Hathway Cable and Datacom Ltd (Mumbai, India) [1.15 km]

3315) Joister Broadband (Mumbai, India) [1.15 km]

1718) Vodafone India (Mumbai, India) [1.15 km]

6454) YOU Broadband India Pvt Ltd. (Mumbai, India) [1.15 km]

9764) Railtel Company of india Ltd (Mumbai, India) [1.15 km]

9584) Sheng Li Telecom (Mumbai, India) [1.15 km]

7605) Thought Mobile Ltd. (Mumbai, India) [1.15 km]

8122) Sify Applied sciences Ltd (Mumbai, India) [1.15 km]

9049) ION (Mumbai, India) [1.15 km]

6403) YOU Broadband India Pvt Ltd., Mumbai (Mumbai, India) [1.15 km]

 

You possibly can see right here, first column is server identifier adopted by title of firm internet hosting that server, location and at last its distance out of your location.

To check web velocity utilizing particular server use –server swap and server identifier from earlier output as argument.

[root@kerneltalks speedtest-cli]# python speedtest.py –server 2827
Retrieving speedtest.web configuration…
Testing from Amazon (35.154.184.126)…
Retrieving speedtest.web server checklist…
Choosing greatest server primarily based on ping…
Hosted by Bharti Airtel Ltd (Mumbai) [1.15 km]: 13.234 ms
Testing obtain velocity……………………………………………………………………..
Obtain: 93.47 Mbit/s
Testing add velocity……………………………………………………………………………………
Add: 69.25 Mbit/s

 

[root@kerneltalks speedtestcli]# python speedtest.py –server 2827

Retrieving speedtest.web configuration...

Testing from Amazon (35.154.184.126)...

Retrieving speedtest.web server checklist...

Choosing greatest server primarily based on ping...

Hosted by Bharti Airtel Ltd (Mumbai) [1.15 km]: 13.234 ms

Testing obtain velocity................................................................................

Obtain: 93.47 Mbit/s

Testing add velocity................................................................................................

Add: 69.25 Mbit/s

 

To get share hyperlink of your velocity take a look at, use –share swap. It offers you URL of your take a look at hosted on speedtest web site. You possibly can share this URL.

[root@kerneltalks speedtest-cli]# python speedtest.py –share
Retrieving speedtest.web configuration…
Testing from Amazon (35.154.184.126)…
Retrieving speedtest.web server checklist…
Choosing greatest server primarily based on ping…
Hosted by Spectra (Mumbai) [1.15 km]: 7.471 ms
Testing obtain velocity……………………………………………………………………..
Obtain: 621.00 Mbit/s
Testing add velocity……………………………………………………………………………………
Add: 367.37 Mbit/s
Share outcomes: http://www.speedtest.web/consequence/6687428141.png

 

[root@kerneltalks speedtestcli]# python speedtest.py –share

Retrieving speedtest.web configuration...

Testing from Amazon (35.154.184.126)...

Retrieving speedtest.web server checklist...

Choosing greatest server primarily based on ping...

Hosted by Spectra (Mumbai) [1.15 km]: 7.471 ms

Testing obtain velocity................................................................................

Obtain: 621.00 Mbit/s

Testing add velocity................................................................................................

Add: 367.37 Mbit/s

Share outcomes: http://www.speedtest.web/consequence/6687428141.png

 

Observe final line which incorporates URL of your take a look at consequence. If I obtain that picture its the one beneath :

Speedtest result on LinuxSpeedtest consequence on Linux

 

Thats it! However hey for those who dont need all this technical jargon, you may even use beneath one liner to get velocity take a look at performed instantly.

Web velocity take a look at utilizing one liner in terminal

We’re going to use curl software to fetch above stated python script on-line and provide it to python for execution on the go!

[root@kerneltalks ~]# curl -s https://uncooked.githubusercontent.com/sivel/speedtest-cli/grasp/speedtest.py | python –

 

[root@kerneltalks ~]# curl -s https://uncooked.githubusercontent.com/sivel/speedtest-cli/grasp/speedtest.py | python –

 

Above command will run the script and present you consequence on display screen!

[root@kerneltalks speedtest-cli]# curl -s https://uncooked.githubusercontent.com/sivel/speedtest-cli/grasp/speedtest.py | python –
Retrieving speedtest.web configuration…
Testing from Amazon (35.154.184.126)…
Retrieving speedtest.web server checklist…
Choosing greatest server primarily based on ping…
Hosted by Spectra (Mumbai) [1.15 km]: 12.599 ms
Testing obtain velocity……………………………………………………………………..
Obtain: 670.88 Mbit/s
Testing add velocity……………………………………………………………………………………
Add: 355.84 Mbit/s

 

[root@kerneltalks speedtestcli]# curl -s https://uncooked.githubusercontent.com/sivel/speedtest-cli/grasp/speedtest.py | python –

Retrieving speedtest.web configuration...

Testing from Amazon (35.154.184.126)...

Retrieving speedtest.web server checklist...

Choosing greatest server primarily based on ping...

Hosted by Spectra (Mumbai) [1.15 km]: 12.599 ms

Testing obtain velocity................................................................................

Obtain: 670.88 Mbit/s

Testing add velocity................................................................................................

Add: 355.84 Mbit/s

 

I examined this software on RHEL 7 server however course of is identical on Ubuntu, Debian, Fedora or CentOS.

 

Source link

Related Articles

Leave a Reply

Back to top button