快速业务通道

网络性能测试之netperf的安装使用

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-05-02

[root@server2 opt]#wget ftp://ftp.netperf.org/netperf/netperf-2.4.5.tar.gz
[root@server2 opt]# tar xzvf netperf-2.4.5.tar.gz
[root@server2 opt]# cd netperf-2.4.5
[root@server2 netperf-2.4.5]# ./configure
[root@server2 netperf-2.4.5]# make && make install
按照以上方法分别在两台linux服务器上安装;
分为服务端和客户端
服务端启动如下:
[root@server2 opt]#netserver
Starting netserver at port 12865
Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC

[root@server2 opt]#
在客户端使用如下命令测试

[root@server1 etc]# netperf -H 10.10.10.131 -l 60
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.10.10.131 (10.10.10.131) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec

87380 16384 16384 60.01 291.03 吞吐量为291.03Mb/s
[root@server1 etc]# netperf -H 10.10.10.131
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.10.10.131 (10.10.10.131) port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec

87380 16384 16384 10.00 289.18
[root@server1 etc]# netperf -H 10.10.10.131 -c
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.10.10.131 (10.10.10.131) port 0 AF_INET
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % S % U us/KB us/KB

87380 16384 16384 10.00 294.17 99.60 -1.00 27.737 -1.000
[root@server1 etc]# netperf -H 10.10.10.131 -C
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.10.10.131 (10.10.10.131) port 0 AF_INET
Recv Send Send Utilization Service Demand
Socket Socket Message Elapsed Send Recv Send Recv
Size Size Size Time Throughput local remote local remote
bytes bytes bytes secs. 10^6bits/s % U % S us/KB us/KB

87380 16384 16384 10.00 261.73 -1.00 78.08 -1.000 24.438

[root@server1 etc]# netperf --help

Usage: netperf [global options] -- [test options]

Global options:
-a send,recv Set the local send,recv buffer alignment
-A send,recv Set the remote send,recv buffer alignment
-B brandstr Specify a string to be emitted with brief output
-c [cpu_rate] Report local CPU usage
-C [cpu_rate] Report remote CPU usage
-d Increase debugging output
-D [secs,units] * Display interim results at least every secs seconds
using units as the initial guess for units per second
-f G|M|K|g|m|k Set the output units
-F fill_file Pre-fill buffers with data from fi

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号