Iperf
From Texas Instruments Embedded Processors Wiki
Translate this page to
Contents |
About
iperf is a open source tool that can be used for measuring network performance . Supports -
- Measuring of maximum TCP and UDP bandwidth performance.
- Tuning of various network related parameters and UDP characteristics.
- Reporting of bandwidth, delay jitter, datagram loss.
- Supports bandwidth measurements with bidirectional traffic
- Transmit time duration of TCP/UDP traffic.
Visit iperf website for more information.
Source Download Location
Visit Sourceforge link
Cross compiling
Step 1: Modify the src/Client.cpp file to add delay_loop()
void delay_loop( unsigned long usec ) {
Timestamp end;
end.add( usec * 1e-6 );
Timestamp now;
while ( now.before( end ) ) {
now.setnow();
}
}
Step 2: Configure for cross compilation. ./configure --host=arm-linux --prefix=$HOME/install CC=$(TOOL_CHAIN_PREFIX)-gcc CXX=$(TOOL_CHAIN_PREFIX)-g++ LDFLAGS=-L(Path of lib folder of filesystem).
The TOOL_CHAIN_PREFIX corresponds to the tool chain in use. Set this based on your tool chain. Also make path to toolchain is exported as part of $PATH.
You may use options "CFLAGS=-static CXXFLAGS=-static" to the configure line if you want to build a static version. Note it will be about 10 times the size.
Step 3: Compile the source code
make install OR make
Test setup
- Boot the EVM with ramdisk.
- Connect 2 EVMs back to back with an ethernet cable.
- On 1 EVM, run iperf in server mode(-s option) and on another EVM run iperf in client mode(-c option).
Execution
TCP
- Server side command - iperf -s
- Client side command - iperf -c (serveripadddress) -w (window size) -d -t (time interval for data tranfer).
UDP
- Server side command - iperf -s -u
- Client side command - iperf -c (serveripadddress) -u -d -t (time interval for data tranfer).
NOTE :-d option stands for bidirectional traffic.
Leave a Comment