Currently, Internet providers, or ISP (Internet Service Provider), offer us different speeds based on the type of task to be performed, this is vital since a high speed will be a guarantee that our navigation will be smooth and the entire loading process and download will be within expectations without affecting productivity or taking extra time..
A useful tool to check the internet speed in real time is Speedtest-cli, which can be used to verify the loading and unloading speed on the server and it uses a command line interface to perform this task in a way very simple, in the same way, Speedtest-cli is able to test the network speed of our server.
Through this tutorial we will learn to install Speedtest-cli on CentOS 7..
1. How to install Python on CentOS 7 Linux
Step 1
Speedtest-cli requires Python for optimal execution, before that, we can access as root users by running the following:
sudo su
Step 2
Subsequently, we will run the following line to install Python on CentOS 7:
yum install Python
Enter the letter and to accept the download and installation of Python.
2. How to install Speedtest-cli on CentOS 7 Linux
Step 1
Now, we will go to the directory / usr / local / src which will be the path where we have to download the utility:
cd / usr / local / src
Then we will download the Python script associated with Speedtest-cli by running the following:
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
Step 2
We assign the respective permissions:
chmod + x speedtest-cli
3. How to check Internet speed in CentOS 7 Linux
Step 1
The next step is to perform the respective Internet tests, the most basic is to run any of the following options:
./speedtest-cli python speedtest-cli
This will be the result obtained:
There we can see details such as:
- Upload and download speed
Step 2
If we want to see this result in bytes, we will execute the following:
./speedtest-cli –bytes
Step 3
Now, another of the options available for Speedtest-cli is to obtain this result graphically, for this we can execute the following line which provides us with a web link to verify said result:
./speedtest-cli –share
Step 4
With this result, we can go to the link from any browser and this will be the result we will see:
4. How to obtain a server ID to validate CentOS 7 Linux
Step 1
It is possible that for some reason we want to obtain the ID of the available servers, for this, first, we will execute the following line:
wget http://www.speedtest.net/speedtest-servers.php
Step 2
To observe the IDs of the servers we will execute the following line:
more speedtest-servers.php
Step 3
To know a specific ID we can use one of the following options:
grep 'city' speedtest-servers.php grep 'country' speedtest-servers.php grep 'city, state' speedtest-servers.php
For example, we can run the following to see all servers in Spain:
grep 'Spain' speedtest-servers.php
Step 4
To see a specific ID, including city and state, we can execute the following:
grep 'Tampa, FL' speedtest-servers.php | egrep -o 'id = "[0-9] {4}"'
This will result in the IDs of the servers in that region and with those IDs, we will execute the following to perform the speed test:
./speedtest-cli –server “IDâ€
Step 5
The general Speedtest-cli options are as follows:
Display the help of the utility
Do not run the download test
Displays the value in bytes instead of bits
Generate and offer a speedtest.net URL with the image of the results
Suppress detailed output, only show basic information
Suppress detailed output, only show basic information in CSV format
Single character delimiter for use in CSV output
Suppress detailed output, only show basic information in JSON format
Display a list of speedtest.net servers sorted by distance
Allows you to specify a server for validation
Excludes a server from the selection
Generate a MINI URL of the Mini Speedtest server
Refers to the source IP address
It is the timeout in seconds, its default value is 10 seconds
It makes use of the HTTPS protocol instead of HTTP when communicating with servers operated by speedtest.net
Does not pre-assign load data in order to improve performance
Display the current version of Speedtest-cli
With this practical tool it will be possible to keep a detailed control of the network speed, both up and down, for support, control or guarantee tasks..