RSS Amplifier

Bash Prompt · Oct 28, 2021

Quickly Test Network Speed Between Two Servers

0
Sign in to vote or save

Elliot Cooper · Bash Prompt

Quickly discovering the speed between two Linux servers can often be a chore of copying large files around.

There is a better way with iperf.

iperf can be used to quickly setup a server and client process on two Linux servers and report the max network throughput between them.

Server

Run the following command on the server machine:

iperf -s -i 10
  • -s - Create a server that will listen on TCP 5001.
  • -i 10 - Print a speed report every 10 seconds.

Client

On the client run the following command:

iperf -i 10 -c <SERVER>
  • -i - Print a speed report every 10 seconds.
  • -c - The server’s IP or hostname.

Result

Every 10 seconds the measured network speed will be printed on the client and server. Here is the server’s output on my test machine:

# iperf -s -i 10
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------
[  4] local 1.1.1.1 port 5001 connected with 2.2.2.2 port 36172
[ ID] Interval       Transfer     Bandwidth
[  4] 0.0000-10.0000 sec  2.27 GBytes  1.95 Gbits/sec
[  4] 0.0000-10.0163 sec  2.27 GBytes  1.84 Gbits/sec
[  4] 0.0000-10.0163 sec  2.27 GBytes  1.95 Gbits/sec

I’m getting a speed of ~1.9Gbits/sec between these machines.

Read the original on bash-prompt.net

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.