标题:
交叉编译iperf测试arm开发板上wifi模块的网络流量速度
[打印本页]
作者:
yuyang911220
时间:
2015-2-27 08:36
标题:
交叉编译iperf测试arm开发板上wifi模块的网络流量速度
交叉编译iperf测试arm开发板上wifi模块的网络流量速度
1.在pc机端安装iperf软件
luther@gliethttp:~$ sudo apt-get install iperf
2.交叉编译iperf到arm开发板上
luther@gliethttp:~$ wget
http://downloads.sourceforge.net ... =1207626803&
;big_mirror=0
luther@gliethttp:~$ tar zxvf iperf-2.0.4.tar.gz
luther@gliethttp:~/iperf-2.0.4$ ./configure --help
luther@gliethttp:~/iperf-2.0.4$ ./configure --host=arm-linux
luther@gliethttp:~/iperf-2.0.4$ vim config.h
修改如下内容:可以通过./configure查看正常编译的配置信息,将差异修改到arm交叉编译生成的config.h中
...
#define HAVE_MALLOC 0 改为 #define HAVE_MALLOC 1
/* #undef HAVE_QUAD_SUPPORT */ 改为 #define HAVE_QUAD_SUPPORT 1
#define malloc rpl_malloc 改为 /* #undef malloc */
luther@gliethttp:~/iperf-2.0.4$ make -j4 //我的pc为双核
luther@gliethttp:~/iperf-2.0.4$ ll src/iperf
-rwxr-xr-x 1 luther luther 75K 2008-11-25 16:07 src/iperf
这样我们运行到arm上的iperf程序就编译成功了,将它拷贝到arm板子上.
1.在pc上以服务器模式启动iperf
luther@gliethttp:~$ iperf -s
2.将交叉编译的iperf拷贝到arm开发板上
/ # tftp -r iperf -g 192.168.100
/ # chmod 755 iperf
/ # ./iperf -c 192.168.2.65 -i 5 -t 60
//192.168.2.65是我的pc端ip地址
//-i 5表示arm板子上启动的client每5s打印一下速度信息;
//-t 60表示测试60s;
//默认使用tcp传输
/ # ./iperf -c 192.168.2.65 -i 5 -t 60
------------------------------------------------------------
Client connecting to 192.168.2.65, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.2.101 port 35071 connected with 192.168.2.65 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 5.0 sec 5.14 MBytes 8.62 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 5.0-10.0 sec 3.45 MBytes 5.78 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 10.0-15.0 sec 2.61 MBytes 4.38 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 15.0-20.0 sec 3.14 MBytes 5.27 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 20.0-25.0 sec 3.20 MBytes 5.36 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 25.0-30.0 sec 4.56 MBytes 7.65 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 30.0-35.0 sec 5.48 MBytes 9.19 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 35.0-40.0 sec 4.56 MBytes 7.65 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 40.0-45.0 sec 3.05 MBytes 5.12 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 45.0-50.0 sec 3.02 MBytes 5.06 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 50.0-55.0 sec 3.60 MBytes 6.04 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 55.0-60.0 sec 3.29 MBytes 5.52 Mbits/sec
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-60.1 sec 45.1 MBytes 6.30 Mbits/sec
/ #
在pc端经过60s之后,打印最终log如下:
luther@gliethttp:~$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.2.65 port 5001 connected with 192.168.2.101 port 35071
[ 4] 0.0-60.1 sec 45.1 MBytes 6.29 Mbits/sec
上面
192.168.2.65为以服务器模式运行的iperf所在pc的ip地址
192.168.2.101为wifi通过dhcpcd eth0动态获取的ip
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/)
Powered by Discuz! 7.0.0