There is a great degree of flex in how the packets are delivered and overall bit rate and packet payload size can be controlled. iperf is a tool that is used to perform network performance measurement and tuning. iperf is an open-source software which is written in C language. Jperf is a GUI version for doing the same job. The core concept work behind Jperf is the iPerf.
How Does iperf Works?
It works either in server or client mode. Normally the client will send the data and the server will receive it. So we have client and server, and iPerf is going to find out the Bandwidth, performance, and speed of the network between both. It generates a packet that can be either TCP or UDP and send those packets to the server and calculate the timing of sending from client-side, timing when the packet reaches to server-side, size of the packet, etc. and on the behalf of that data, iPerf calculates the Speed, Performance, and Bandwidth of Network.
How to install iperf?
For RedHat based Linux
yum install iperf
For Other Linux based Operating Systems, download the tool from iperf.fr/iperf-download.php and execute the following command.
tar -xvf iperf-2.0.5.tar.gz cd iperf-2.0.5 ./configure make install
How to run iPerf?
As iperf works with both client and server, we must start a server before starting the client. Just run the below command on the server machine and it will initiate the server.
Here, -s signifies the server mode.
Initiate the client by using the following command.
iperf -c 126.96.36.199 -u 100
- c signifies the client mode.
- 188.8.131.52 signifies the IP address of the server to which client is to be connected.
- u signifies generating the UDP packets.
- 100 signifies the length of UDP data payload.
After the successful execution of the command, it prints the bandwidth and other network-related details.
- SAR command in Linux to monitor system performance
- mindepth and maxdepth in Linux find() command for limiting search to a specific directory.
- enable and disable command in Linux
- Linux Operating System | CLI (Command Line Interface) and GUI (Graphic User Interface)
- Difference between locate, which and find Command in Linux
- How to use aplay and spd-say command in Linux?
- Working with zcat, zmore and zless Command in Linux
- Nice and Renice Command in Linux with Examples
- Network configuration and trouble shooting commands in Linux
- How to find time taken by a command/program on Linux Shell?
- Netstat command in Linux
- Practical applications of 'ls' command in Linux
- 'dd' command in Linux
- 'IPCS' command in Linux with examples
- select command in Linux with examples
- grep command in Unix/Linux
- Sed Command in Linux/Unix with examples
- ZIP command in Linux with examples
- SORT command in Linux/Unix with examples
- Gzip Command in Linux
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.