Cross compilation of iperf3

Compilation environment: Ubuntu16.04 64-bit
Cross-compilation tool: arm-himix200-linux-gcc

1. iperf source code download

What I use here is iperf-3.1.3-source.tar.gz, click the download address for the download address .

2. Modify src/Makefile.in

Around line 613, remove the -pg option, otherwise the compilation will report an error. Modify as follows:

#iperf3_profile_CFLAGS = -pg -g
iperf3_profile_CFLAGS = -g
iperf3_profile_LDADD = libiperf.la
#iperf3_profile_LDFLAGS = -pg -g
iperf3_profile_LDFLAGS = -g

3. Static compilation

cd ~/work
mkdir iperf.install
tar zxf iperf-3.1.3-source.tar.gz
cd iperf-3.1.3/
./configure --prefix=/home/june/work/iperf.install --host=arm-himix200-linux CC=arm-himix200-linux-gcc CFLAGS=-static --enable-static LDFLAGS=-static --disable-shared
make
make install

The executable program iperf3 in the /home/june/work/iperf.install/ directory is what we need.

4. Run

4.1 Server

Run the iperf3 service on the PC and click the download address . After decompression is complete, hold down the shift key and right-click the mouse in the decompression directory, select to enter windows powershell, enter the following command, and use the PC as the server:

.\iperf3.exe -s

4.2 Client

Put the iperf3 generated by cross compilation into the development board under the same LAN, iperf3 syntax:

iperf -c <服务端IP地址> -u -b <传输带宽> -t <测量时间[秒] > -i <间隔>

Set the device to client UDP protocol to check the bandwidth 30 times, command:

./iperf3 -c 192.168.3.2 -u -b 100M -i 1 -t 30

Check the average network bandwidth of 30 times using tcp protocol

./iperf3 -c 192.168.3.2 - w -i 1 -b 100M -t 30

Guess you like

Origin blog.csdn.net/weixin_43549602/article/details/119252792