You are on page 1of 13

How to compile iperf for Windows using Cygwin

Iperf is a very versatile open source program that can be used for network performance testing. It can generate TCP or UDP data streams for measuring network throughput and can also be used for testing network latency and jitter. There are some older versions of iperf compiled for Windows available on the web but I couldnt find a working link for iperf version 2.0.5 so I decided to try compiling it using Cygwin and it worked!
You can download iperf version 2.0.5 for Windows that I compiled from source or continue reading if you want to learn how to compile your own copy. Youll need to copy iperf.exe and also the 3 cygwin DLL files included in the zip archive into your system in order for it to work.
1. Setting up Cygwin
Cygwin is basically a Linux emulation environment for Windows. Although your Linux apps will have to be recompiled from source before they will run in the Cygwin environment. To get started you will need to download and run setup.exe from the Cygwin site. You can use the default install options but when you reach the package selection screen click on Devel so that Default changes to Install , this will install all of the development tools you will need.
You should have a shortcut to Cygwin on your desktop when the installation is finished.
2. Download the iperf source code
Next download and extract the iperfsource codeto C:\cygwin\iperf-2.0.5 ,7-zipworks well for extracting tar and gzip files in Windows.
3. Configure the compiler
Start the Cygwin shell from the start menu or the shortcut on your desktop.
Enter the directory where you extracted the iperf source
cd /iperf-2.0.5
Configure the compiler (this might take a couple minutes)
./configure
If everything went well your output should look something like this.
4. Compile the source
To get the compile process started just type make and hit enter. It shouldnt take very long for the compile to finish.
5. Make install
Assuming your build completed without errors your going to want to run make install, to do this just typemake installin the shell and hit enter. As you can see from the output belowiperf.exewas copied to /usr/local/bin/
6. Running iperf
You can run iperf directly from the Cygwin environment but you will have to specify the full path to the executable eg: /usr/local/bin/iperf. If you prefer to run iperf directly from a Windows command prompt or from another machine you can copy the iperf binary and the nessasary DLL files out of the cygwin environment.
If you installed Cygwin to the default location theniperf.exewill be located in C:\cygwin\usr\local\bin
You will also need the following DLL files found in C:\cygwin\bin.
cygwin1.dll
cyggcc_s-1.dll
cygstdc++-6.dll
Copy the three DLL files andiperf.exesomewhere on your system that is in your path like c:\windows\system32 for example. You can then run iperf directly from a command prompt.
How to compile iperf for Windows using Cygwin
Iperf is a very versatile open source program that can be used for network performance testing. It can generate TCP or UDP data streams for measuring network throughput and can also be used for testing network latency and jitter. There are some older versions of iperf compiled for Windows available on the web but I couldnt find a working link for iperf version 2.0.5 so I decided to try compiling it using Cygwin and it worked!
You can download iperf version 2.0.5 for Windows that I compiled from source or continue reading if you want to learn how to compile your own copy. Youll need to copy iperf.exe and also the 3 cygwin DLL files included in the zip archive into your system in order for it to work.
Cygwin is basically a Linux emulation environment for Windows. Although your Linux apps will have to be recompiled from source before they will run in the Cygwin environment. To get started you will need to download and run setup.exe from the Cygwin site. You can use the default install options but when you reach the package selection screen click on Devel so that Default changes to Install , this will install all of the development tools you will need.
Next download and extract the iperfsource codeto C:\cygwin\iperf-2.0.5 ,7-zipworks well for extracting tar and gzip files in Windows.
To get the compile process started just type make and hit enter. It shouldnt take very long for the compile to finish.
Assuming your build completed without errors your going to want to run make install, to do this just typemake installin the shell and hit enter. As you can see from the output belowiperf.exewas copied to /usr/local/bin/
You can run iperf directly from the Cygwin environment but you will have to specify the full path to the executable eg: /usr/local/bin/iperf. If you prefer to run iperf directly from a Windows command prompt or from another machine you can copy the iperf binary and the nessasary DLL files out of the cygwin environment.
Copy the three DLL files andiperf.exesomewhere on your system that is in your path like c:\windows\system32 for example. You can then run iperf directly from a command prompt.
Iperf is a very versatile open source program that can be used for network performance testing. It can generate TCP or UDP data streams for measuring network throughput and can also be used for testing network latency and jitter. There are some older versions of iperf compiled for Windows available on the web but I couldnt find a working link for iperf version 2.0.5 so I decided to try compiling it using Cygwin and it worked!
You can download iperf version 2.0.5 for Windows that I compiled from source or continue reading if you want to learn how to compile your own copy. Youll need to copy iperf.exe and also the 3 cygwin DLL files included in the zip archive into your system in order for it to work.
Cygwin is basically a Linux emulation environment for Windows. Although your Linux apps will have to be recompiled from source before they will run in the Cygwin environment. To get started you will need to download and run setup.exe from the Cygwin site. You can use the default install options but when you reach the package selection screen click on Devel so that Default changes to Install , this will install all of the development tools you will need.
Assuming your build completed without errors your going to want to run make install, to do this just typemake installin the shell and hit enter. As you can see from the output belowiperf.exewas copied to /usr/local/bin/
You can run iperf directly from the Cygwin environment but you will have to specify the full path to the executable eg: /usr/local/bin/iperf. If you prefer to run iperf directly from a Windows command prompt or from another machine you can copy the iperf binary and the nessasary DLL files out of the cygwin environment.
Iperf is a very versatile open source program that can be used for network performance testing. It can generate TCP or UDP data streams for measuring network throughput and can also be used for testing network latency and jitter. There are some older versions of iperf compiled for Windows available on the web but I couldnt find a working link for iperf version 2.0.5 so I decided to try compiling it using Cygwin and it worked!
Cygwin is basically a Linux emulation environment for Windows. Although your Linux apps will have to be recompiled from source before they will run in the Cygwin environment. To get started you will need to download and run setup.exe from the Cygwin site. You can use the default install options but when you reach the package selection screen click on Devel so that Default changes to Install , this will install all of the development tools you will need.
You can run iperf directly from the Cygwin environment but you will have to specify the full path to the executable eg: /usr/local/bin/iperf. If you prefer to run iperf directly from a Windows command prompt or from another machine you can copy the iperf binary and the nessasary DLL files out of the cygwin environment.
Iperf is a very versatile open source program that can be used for network performance testing. It can generate TCP or UDP data streams for measuring network throughput and can also be used for testing network latency and jitter. There are some older versions of iperf compiled for Windows available on the web but I couldnt find a working link for iperf version 2.0.5 so I decided to try compiling it using Cygwin and it worked!
Cygwin is basically a Linux emulation environment for Windows. Although your Linux apps will have to be recompiled from source before they will run in the Cygwin environment. To get started you will need to download and run setup.exe from the Cygwin site. You can use the default install options but when you reach the package selection screen click on Devel so that Default changes to Install , this will install all of the development tools you will need.

You might also like