You can test the network speed or throughput between two Linux servers using the iperf
tool. Here’s how to do it:
- Install iperf on both servers:
sudo apt install iperf (on Debian/Ubuntu)
or
sudo yum install iperf (on CentOS/Red Hat)
- On one of the servers, start iperf in server mode:
iperf -s
- On the other server, start iperf in client mode and specify the IP address of the first server:
iperf -c <server-IP>
The output will show the network speed or throughput between the two servers, including the amount of data transferred, the transfer rate, and other relevant information. You can use the -t
option to specify the duration of the test.
Note: You can also use the iperf3
tool, which is an updated version of iperf that includes new features and improvements. The usage is similar to iperf.