Author: Master of Beijing hang, Senior Engineer of SMIC youdian: Huang Zhen
Used kernel:2.6.28
Cross Compiler used:Arm-linux-gcc-4.3.2
UsedIperfSource code:Iperf2.0.2
Used Host:Ubuntu10.04
What is iperf first? (Borrow online explanation)
Iperf is a network performance testing tool. Iperf can test the bandwidth quality of TCP and UDP. Iperf can measure the maximum TCP bandwidth and has multiple parameters and UDP features. Iperf can report bandwidth, latency jitter, and packet loss.
We used this test to mount the root file system. I think the effect may be better if I use a system running on the board, the following describes how to install iperf on a PC.
Ubuntu10.04 is very intelligent and can be used directly by users who can access the Internet.
Sudo
Apt-Get install iperf
This command can successfully install iperf
If you want to download the source code for installation, you can use the most common method.
Tar xvf
Iperf-2.0.2.tar.gz
CD iperf-2.0.2
./Configure
Make
After the compilation is successful, run the following command to install iperf:
Make install
The installation is successful.
Next we will introduce how to cross-compile our iperf source code:
For convenience, we wrote a. Sh configuration file.
The specific content is as follows:
Vim
Buildarm. Sh
#! /Bin/sh
Echo
"Ac_cv_func_malloc_0_nonnull = yes"> arm-linux.cache
./Configure -- Host = arm-Linux cc = arm-none-linux-gnueabi-gcc-4.3.2-Cache-file = arm-linux.cache
Make
(Configure the environment variables of the Cross Compiler)
After the configuration file is written, you need to change its permissions so that it can execute
Chmod
+ X buildarm. Sh
Then you can run the following command:
./Buildarm. Sh
After the successful execution, an iperf file will be generated in the SRC folder of your iperf directory. You can place the binary executable file to the file system of your board, now let's test it immediately:
First, open the file system, but ensure that the Board can ping the host after the system is started. This will prove that the network between the two is connected:
Then you can start the services of the Host:
Now let's test the status of the two:
The first step is the TCP test:
Run the iperf program of the host
Run commands
Iperf
-S
Then run
Now let's test the UDP transmission speed:
Run the command on the host: iperf-S-u
Check the client now:
Test successful
By reading other posts on the Internet and man's manual, you can view more iperf usage, hoping to help you learn more.