3 common network speed test tools under Linux

3 common network speed test tools under Linux

No matter what operating system you use, network speed is a performance indicator that you care about very much. After all, no one wants to watch a video and then the network speed is so slow that you doubt your life. This article introduces three network speed test tools under the Linux command line, so that you can know your network status anytime and anywhere.

[[325128]]

fast

Fast is a service provided by Netflix. It can be used not only through the command line, but also directly on the Web: fast.com.

We can install this tool with the following command:

  1. $ npm install --global fast-cli

Whether it is a web page or a command line, it provides the most basic network download speed test. The simplest way to use it under the command line is as follows:

  1. $fast
  2. 93 Mbps ↓

From the above results, we can see that if we use the fast command directly, it will only return the network download speed. If you also want to get the network upload speed, you need to use the -u option.

  1. $ fast -u
  2. ⠧ 81 Mbps ↓ / 8.3 Mbps ↑

speedtest

speedtest is a more well-known tool. It is written in Python and can be installed using the apt or pip command. You can use it from the command line or import it directly into your Python project.

Installation method:

  1. $ sudo apt install speedtest-cli
  2. or
  3. $ sudo pip3 install speedtest-cli

When using it, you can directly run the speedtest command:

  1. $ speedtest
  2. Retrieving speedtest.net configuration...
  3. Testing from Tencent cloud computing (140.143.139.14)...
  4. Retrieving speedtest.net server list...
  5. Selecting best server based on ping...
  6. Hosted by Henan CMCC 5G (Zhengzhou) [9.69 km]: 28.288 ms
  7. Testing download speed................................................................................
  8. Download: 56.20 Mbit/s
  9. Testing upload speed................................................................................................................
  10. Upload: 1.03 Mbit/s

As you can see from the running results, the speedtest command will directly provide the upload/download rate, and the test process is also very fast. You can write a script to call this command, and then perform network tests regularly and save the results in a file or database, so that you can track your network status in real time.

iPerf

iperf is a network performance testing tool that can test TCP and UDP bandwidth quality, measure the maximum TCP bandwidth, have multiple parameters and UDP features, and report bandwidth, delay jitter, and packet loss. Using this feature, iperf can be used to test the performance of some network devices such as routers, firewalls, switches, etc.

For Debian based distributions, you can install iPerf using the following command:

  1. $ sudo apt install iperf

This tool is not only available on Linux systems, but also on Mac and Windows systems.

If you want to test network bandwidth, you need two computers. These two computers need to be in the same network, one as the server and the other as the client, and both must have iPerf installed.

You can get the server's IP address by running the following command:

  1. $ ip addr show | grep inet.*brd
  2. inet 192.168.242.128/24 brd 192.168.242.255 scope global dynamic noprefixroute ens33

We know that in the local area network, our ipv4 address usually starts with 192.168. After running the above command, we need to write down the address of the server, which will be used later.

After that, we start the iperf tool on the server:

  1. $ iperf -s

Then, we can wait for the client to connect. The client can use the following command to connect to the server:

  1. $ iperf -c 192.168.242.128

After a few seconds of testing, it will return the network transmission rate and bandwidth.

<<:  The United States drafted new rules that will allow American companies and Huawei to jointly develop 5G standards

>>:  How do two computers in different places send data to each other? How many people are discouraged by the five-layer model?

Recommend

LuxVPS: €3/month KVM-4GB/30GB/1TB/Germany data center

The LuxVPS domain name was registered in June 202...

5G: What it means and why we'll never need 6G

The launch of 5G isn’t all that far away, with ro...

Unlocking the full potential of 5G: Innovating with network effects

The emergence of 5G technology has aroused people...

5G application complex network security issues cannot be ignored

The commercial use of 5G has brought unlimited po...

Cisco launches AI-based predictive services

[51CTO.com original article] Recently, Cisco anno...

Single Sign On (Single Sign On) is enough to read this article

[[347603]] background In the early stages of ente...

Can 5G address workplace safety issues?

As 5G networks roll out around the world, their p...

Basic Principles for Campus Network Product Selection

I am Xia Jie, a lecturer at 51CTO Academy. On the...

HostDare: Los Angeles CN2 GIA line VPS annual payment from $44.99, 10% off

HostDare hasn't released promotions for a lon...