Don's Pages and my Music

Saturday, January 11, 2014

App called speedtest-cli - How to check Internet speed from the command line in Linux - Linux FAQ

I have a Web Server running on my Network. That is an old 400MHz System. It does a great job of Serving up my Web Site and Files on my Local Network too. It uses less Electricity than the Newer Systems and is allot Quieter than anything else I have. I has a GUI Desktop. But, it can't handle Java and Flash in Firefox, which is needed to run Apps, like those on SpeedTest.net and other Speed Test Sites. That's just too much for Processor. I came across this Article today and tried out this App called, speedtest-cli. (More on the Article Below). It is a Command Line App. But it is easy to install. And all you have to do to run a basic Speed Test is, run the command "speedtest-cli" in a Terminal Window. I used the instructions on the https://github.com/sivel/speedtest-cli Page to install it on my Fedora 14 System. And you can also just Download the App from there. Extract the Folder, containing the App and run "speedtest_cli.py" by Opening a Terminal Window in the Folder. I use Krusader to do this. I did this on my Server and ran it, by using Putty, the SSH Terminal App. I did this, because I have the Video Cable in use on another System. So, my Server is basically Headless, right now. At least, until I plug the VGA and USB Cable from my KVM Switch back into it. I used Krusader to copy the unpacked folder to my Server and ran it from there. Check the file permissions if you have any problems running the App, from the "speedtest_cli.py" file. It needs to be executable and owned by the user who is running it. Or you could give full permissions to all users on your system. That would work too. Here's the Command Line output, from my installation, in Fedora 14...


Don



[don@RedBlackBioStarFedora14 ~]$ su
Password:
[root@RedBlackBioStarFedora14 don]# pip install speedtest-cli
bash: pip: command not found...
Install package 'perl-pip' to provide command 'pip'? [N/y]

 * Running..
 * Resolving dependencies..
 * Installing packages..
The following packages have to be installed:
 perl-CPAN-Inject-0.11-3.fc14.noarch    Base class for injecting distributions into CPAN sources
 perl-PAR-Dist-0.46-3.fc14.noarch       Toolkit for creating and manipulating Perl PAR distributions
 perl-Data-Compare-1.22-1.fc14.noarch   Compare perl data structures
 perl-Compress-Bzip2-2.09-10.fc14.i686  Interface to Bzip2 compression library
 perl-File-pushd-1.00-5.fc14.noarch     Change directory temporarily for a limited scope
 perl-CPAN-Checksums-2.04-3.fc14.noarch Write a CHECKSUMS file for a directory as on CPAN
 perl-File-chmod-0.32-8.fc14.noarch     Implements symbolic and ls chmod modes
Proceed with changes? [N/y] The transaction did not proceed.
Failed to install packages: user declined simulation

[root@RedBlackBioStarFedora14 don]# yum install perl-pip
Loaded plugins: auto-update-debuginfo, fastestmirror, fs-snapshot, langpacks, merge-conf, presto, ps, refresh-packagekit, refresh-updatesd, remove-with-leaves, versionlock
Adding en_US to language list
Found 55 installed debuginfo package(s)
Enabling fedora-debuginfo: Fedora 14 - i386 - Debug
Enabling rpmfusion-nonfree-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Debug
Enabling rpmfusion-free-updates-debuginfo: RPM Fusion for Fedora 14 - Free - Updates Debug
Enabling rpmfusion-nonfree-updates-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Updates Debug
Enabling rpmfusion-free-debuginfo: RPM Fusion for Fedora 14 - Free - Debug
Enabling updates-debuginfo: Fedora 14 - i386 - Updates - Debug
Loading mirror speeds from cached hostfile
 * fedora: kdeforge2.unl.edu
 * fedora-debuginfo: mirror.solarvps.com
 * rpmfusion-free: mirrors.tummy.com
 * rpmfusion-free-debuginfo: mirrors.tummy.com
 * rpmfusion-free-updates: mirror.nexcess.net
 * rpmfusion-free-updates-debuginfo: mirror.nexcess.net
 * rpmfusion-nonfree: mirror.nexcess.net
 * rpmfusion-nonfree-debuginfo: mirror.nexcess.net
 * rpmfusion-nonfree-updates: mirror.nexcess.net
 * rpmfusion-nonfree-updates-debuginfo: mirror.nexcess.net                                    
 * updates: kdeforge2.unl.edu
 * updates-debuginfo: mirror.solarvps.com
http://download.opensuse.org/repositories/home%3A/satya164%3A/fedorautils/Fedora_14/repodata/repomd.xml: [Errno 14] HTTP Error 404 : http://download.opensuse.org/repositories/home%3A/satya164%3A/fedorautils/Fedora_14/repodata/repomd.xml
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-pip.noarch 0:1.16-2.fc14 set to be installed
--> Processing Dependency: perl(CPAN::Inject) >= 0.07 for package: perl-pip-1.16-2.fc14.noarch
--> Processing Dependency: perl(PAR::Dist) >= 0.25 for package: perl-pip-1.16-2.fc14.noarch
--> Processing Dependency: perl(File::pushd) >= 0.32 for package: perl-pip-1.16-2.fc14.noarch
--> Processing Dependency: perl(File::pushd) for package: perl-pip-1.16-2.fc14.noarch
--> Running transaction check
---> Package perl-CPAN-Inject.noarch 0:0.11-3.fc14 set to be installed
--> Processing Dependency: perl(File::chmod) >= 0.30 for package: perl-CPAN-Inject-0.11-3.fc14.noarch
--> Processing Dependency: perl(CPAN::Checksums) >= 1.05 for package: perl-CPAN-Inject-0.11-3.fc14.noarch
--> Processing Dependency: perl(CPAN::Checksums) for package: perl-CPAN-Inject-0.11-3.fc14.noarch
--> Processing Dependency: perl(File::chmod) for package: perl-CPAN-Inject-0.11-3.fc14.noarch
---> Package perl-File-pushd.noarch 0:1.00-5.fc14 set to be installed
---> Package perl-PAR-Dist.noarch 0:0.46-3.fc14 set to be installed
--> Running transaction check
---> Package perl-CPAN-Checksums.noarch 0:2.04-3.fc14 set to be installed
--> Processing Dependency: perl(Data::Compare) for package: perl-CPAN-Checksums-2.04-3.fc14.noarch
--> Processing Dependency: perl(Compress::Bzip2) for package: perl-CPAN-Checksums-2.04-3.fc14.noarch
---> Package perl-File-chmod.noarch 0:0.32-8.fc14 set to be installed
--> Running transaction check
---> Package perl-Compress-Bzip2.i686 0:2.09-10.fc14 set to be installed
---> Package perl-Data-Compare.noarch 0:1.22-1.fc14 set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================
 Package                                              Arch                                    Version                                          Repository                                Size
==============================================================================================================================================================================================
Installing:
 perl-pip                                             noarch                                  1.16-2.fc14                                      fedora                                    31 k
Installing for dependencies:
 perl-CPAN-Checksums                                  noarch                                  2.04-3.fc14                                      fedora                                    17 k
 perl-CPAN-Inject                                     noarch                                  0.11-3.fc14                                      fedora                                    26 k
 perl-Compress-Bzip2                                  i686                                    2.09-10.fc14                                     fedora                                    64 k
 perl-Data-Compare                                    noarch                                  1.22-1.fc14                                      updates                                   26 k
 perl-File-chmod                                      noarch                                  0.32-8.fc14                                      fedora                                    17 k
 perl-File-pushd                                      noarch                                  1.00-5.fc14                                      fedora                                    17 k
 perl-PAR-Dist                                        noarch                                  0.46-3.fc14                                      fedora                                    30 k

Transaction Summary
==============================================================================================================================================================================================
Install       8 Package(s)

Total download size: 227 k
Installed size: 453 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 227 k
(1/8): perl-CPAN-Checksums-2.04-3.fc14.noarch.rpm                                                                                                                      |  17 kB     00:00    
(2/8): perl-CPAN-Inject-0.11-3.fc14.noarch.rpm                                                                                                                         |  26 kB     00:00    
(3/8): perl-Compress-Bzip2-2.09-10.fc14.i686.rpm                                                                                                                       |  64 kB     00:00    
(4/8): perl-Data-Compare-1.22-1.fc14.noarch.rpm                                                                                                                        |  26 kB     00:00    
(5/8): perl-File-chmod-0.32-8.fc14.noarch.rpm                                                                                                                          |  17 kB     00:00    
(6/8): perl-File-pushd-1.00-5.fc14.noarch.rpm                                                                                                                          |  17 kB     00:00    
(7/8): perl-PAR-Dist-0.46-3.fc14.noarch.rpm                                                                                                                            |  30 kB     00:00    
(8/8): perl-pip-1.16-2.fc14.noarch.rpm                                                                                                                                 |  31 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                         209 kB/s | 227 kB     00:01    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-File-chmod-0.32-8.fc14.noarch                                                                                                                                     1/8
  Installing     : perl-File-pushd-1.00-5.fc14.noarch                                                                                                                                     2/8
  Installing     : perl-Data-Compare-1.22-1.fc14.noarch                                                                                                                                   3/8
  Installing     : perl-PAR-Dist-0.46-3.fc14.noarch                                                                                                                                       4/8
  Installing     : perl-Compress-Bzip2-2.09-10.fc14.i686                                                                                                                                  5/8
  Installing     : perl-CPAN-Checksums-2.04-3.fc14.noarch                                                                                                                                 6/8
  Installing     : perl-CPAN-Inject-0.11-3.fc14.noarch                                                                                                                                    7/8
  Installing     : perl-pip-1.16-2.fc14.noarch                                                                                                                                            8/8

Installed:
  perl-pip.noarch 0:1.16-2.fc14                                                                                                                                                              

Dependency Installed:
  perl-CPAN-Checksums.noarch 0:2.04-3.fc14        perl-CPAN-Inject.noarch 0:0.11-3.fc14        perl-Compress-Bzip2.i686 0:2.09-10.fc14        perl-Data-Compare.noarch 0:1.22-1.fc14      
  perl-File-chmod.noarch 0:0.32-8.fc14            perl-File-pushd.noarch 0:1.00-5.fc14         perl-PAR-Dist.noarch 0:0.46-3.fc14           

Complete!
[root@RedBlackBioStarFedora14 don]# pip install speedtest-cli

Unknown or unsupported command 'install'
[root@RedBlackBioStarFedora14 don]# yum install speedtest-cli
Loaded plugins: auto-update-debuginfo, fastestmirror, fs-snapshot, langpacks, merge-conf, presto, ps, refresh-packagekit, refresh-updatesd, remove-with-leaves, versionlock
Adding en_US to language list
Found 55 installed debuginfo package(s)
Enabling fedora-debuginfo: Fedora 14 - i386 - Debug
Enabling rpmfusion-nonfree-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Debug
Enabling rpmfusion-free-updates-debuginfo: RPM Fusion for Fedora 14 - Free - Updates Debug
Enabling rpmfusion-nonfree-updates-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Updates Debug
Enabling rpmfusion-free-debuginfo: RPM Fusion for Fedora 14 - Free - Debug
Enabling updates-debuginfo: Fedora 14 - i386 - Updates - Debug
Loading mirror speeds from cached hostfile
 * fedora: kdeforge2.unl.edu
 * fedora-debuginfo: mirror.solarvps.com
 * rpmfusion-free: mirrors.tummy.com
 * rpmfusion-free-debuginfo: mirrors.tummy.com
 * rpmfusion-free-updates: mirror.nexcess.net
 * rpmfusion-free-updates-debuginfo: mirror.nexcess.net
 * rpmfusion-nonfree: mirror.nexcess.net
 * rpmfusion-nonfree-debuginfo: mirror.nexcess.net
 * rpmfusion-nonfree-updates: mirror.nexcess.net
 * rpmfusion-nonfree-updates-debuginfo: mirror.nexcess.net
 * updates: kdeforge2.unl.edu
 * updates-debuginfo: mirror.solarvps.com
http://download.opensuse.org/repositories/home%3A/satya164%3A/fedorautils/Fedora_14/repodata/repomd.xml: [Errno 14] HTTP Error 404 : http://download.opensuse.org/repositories/home%3A/satya164%3A/fedorautils/Fedora_14/repodata/repomd.xml
Trying other mirror.
Setting up Install Process
No package speedtest-cli available.
Error: Nothing to do
[root@RedBlackBioStarFedora14 don]# easy_install speedtest-cli
Searching for speedtest-cli
Reading http://pypi.python.org/simple/speedtest-cli/
Best match: speedtest-cli 0.2.4
Downloading https://pypi.python.org/packages/source/s/speedtest-cli/speedtest-cli-0.2.4.tar.gz#md5=25334d1d856c884cacfaee01bdec83a6
Processing speedtest-cli-0.2.4.tar.gz
Running speedtest-cli-0.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-6Qrlz1/speedtest-cli-0.2.4/egg-dist-tmp-YmemPN
zip_safe flag not set; analyzing archive contents...
Adding speedtest-cli 0.2.4 to easy-install.pth file
Installing speedtest script to /usr/bin
Installing speedtest-cli script to /usr/bin

Installed /usr/lib/python2.7/site-packages/speedtest_cli-0.2.4-py2.7.egg
Processing dependencies for speedtest-cli
Finished processing dependencies for speedtest-cli
[root@RedBlackBioStarFedora14 don]# speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from Charter Communications (71.91.***.***)...
Selecting best server based on ping...
Hosted by OneSource Communications (Keller, TX) [24.07 km]: 31.63 ms
Testing download speed........................................
Download: 28.67 Mbit/s
Testing upload speed..................................................
Upload: 4.09 Mbit/s
[root@RedBlackBioStarFedora14 don]#


How to check Internet speed from the command line on Linux

When you are experiencing slow Internet access, you may want to test the Internet speed of your upstream ISP (often called "last mile" in the residential broadband networks) as part of troubleshooting. For that matter, Speedtest.net is probably the most widely used broadband speed testing website.

Underneath it, Speedtest.net loads JavaScript code in your web browser, which then automatically detects the closest Speedtest.net server from you, and measures download/upload speed by sending HTTP GET and POST requests to the server.

However, if you are trying to check Internet speed from a remote headless server, VPS or an otherwise desktop-less system, Speedtest.net's Flash-based user-friendly interface would be no good. For those of you, there is a command-line interface (CLI) version of Speedtest.net, known as speedtest-cli. Here I will demonstrate how to use speedtest-cli to check Internet speed from the command line in Linux.

Install speedtest-cli on Linux

Read More...
http://xmodulo.com/2014/01/check-internet-speed-command-line-linux.html

speedtest-cli - checks internet speed in the command line


How to check Internet speed from the command line on Linux - Linux FAQ
sivel/speedtest-cli · GitHub

No comments:

Post a Comment