iperf is free open-source command-line utility for measuring network performance. It is available for Linux, Windows and macOS. It can be used in both client and server mode.
sudo apt-get install -y iperf
brew install iperf
- Windows: download here
To run iperf in server mode, run the following command:
It listens to TCP port 5001 by default. You change this by specifying the
If you are doing wireless network performance monitoring, then you probably want to run iperf in server mode on a device with a wired ethernet connection.
To run iperf in client mode, run the following command:
iperf -c <SERVER_IP>
The default behavior is that the client will send and the server will receive. You can change this behavior by specifying the
There are plenty of options you can use. Use
iperf --help to list all available options.
Below some useful options are listed.
-pspecify the port to listen to.
Example: to have iperf listen on port 5551, use
iperf -s -p 5551
-tspecify the duration of the test.
iperf -c <SERVER_IP> -t 10
-ispecify the interval between reports.
iperf -c <SERVER_IP> -t 30 -i 5
-Rreverse the test so that the server receives and the client sends.