Test Internet Connection Speed From Console Over SSH Command Line

aptestI have recently rented a dedicated server for my hobby projects and learning CentOS Linux server. I was informed that I am connected to the 100M/s port. How do I test my Internet connection download speed from the console over the ssh session without using HTML5 or Adobe flash/Java applets based websites? How do I test my upload speed from the console?

I recommend that you use lftp command to test Internet upload and download speed from console. You can run lftp using the ssh client:

[a] wget — Retrieves files from the web (download speed test).

[b] wput — A tiny wget-like ftp-client for uploading files (upload speed test).

[c] axel — Another light download accelerator.

[d] iperf — Perform network throughput tests.


You can use the following yum command to install lftp and iperf under RHEL / CentOS / Fedora Linux:

OR use the following apt-get command under Debian or Ubuntu Linux:

Step #1: Find out download url

You need a large size file to test download speed. For example, you can visit the home page of«Argonne National Laboratory Public Software Mirror» to grab Centos Linux ISO file.

Step #2: Use lftp command to test download speed

The syntax is:

Sample outputs:

Fig.01: lftp testing internet speed

Fig.01: lftp testing internet speed
You will also get the report as follows:

A note about wget command

You can use the wget command as follows for testing download speed:

Sample outputs:

Fig.02: wget command in action

Fig.02: wget command in action

Step #3: Use lftp command to test upload speed
The sytnax is as follows:

In this example, I am uploading a file to my private ftp server:


Sample outputs:

Fig.03: lftp upload speed test in action

Fig.03: lftp upload speed test in action

How do I test network throughput rate between two Linux or Unix servers?
Consider the following setup:

Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss. On server A start iperf as follows:

On server B type the same command as follows:

Sample outputs:

Fig.04: iperf client in action

Fig.04: iperf client in action

  1. -s : Run in server mode.
  2. -B IP : Bind to IP, an interface or multicast address.
  3. -c IP : Run in client mode, connecting to IP.
  4. -d : Do a bidirectional test simultaneously.
  5. -t 60 : Time in seconds to transmit for (default 10).
  6. -i 10 : Pause n seconds between periodic bandwidth reports.

See the following man pages for information:

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *