博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
iperf 网络测试工具
阅读量:5359 次
发布时间:2019-06-15

本文共 7020 字,大约阅读时间需要 23 分钟。

  一个网络速度测试工具,支持IPv4与IPv6,支持TCP、UDP、SCTP传输协议,可在Windows、Mac OS X、Linux、FreeBSD等各种平台使用,是一个简单又实用的小工具。

常用方式举例:

S端:

iperf -s -u -i 1

 

C端:

iperf.exe -c 192.168.x.x -p 5001 -u -b 30m -t 10 -w 3072

 

-w 包大小

-i 间隔

-t 次数

-b 带宽

-u udp模式

-p 指定端口

 

# Linux 版本参数说明

[loki@loki-c7t1 ~]$ iperf --help |moreUsage: iperf [-s|-c host] [options]       iperf [-h|--help] [-v|--version]Client/Server:  -b, --bandwidth #[kmgKMG | pps]  bandwidth to send at in bits/sec or packets per second  -e, --enhancedreports    use enhanced reporting giving more tcp/udp and traffic information  -f, --format    [kmgKMG]   format to report: Kbits, Mbits, KBytes, MBytes  -i, --interval  #        seconds between periodic bandwidth reports  -l, --len       #[kmKM]    length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450)  -m, --print_mss          print TCP maximum segment size (MTU - TCP/IP header)  -o, --output    
output the report or error message to this specified file -p, --port # server port to listen on/connect to -u, --udp use UDP rather than TCP --udp-counters-64bit use 64 bit sequence numbers with UDP -w, --window #[KM] TCP window size (socket buffer size) -z, --realtime request realtime scheduler -B, --bind
[:
][%
] bind to
, ip addr (including multicast address) and optional port and device -C, --compatibility for use with older versions does not sent extra msgs -M, --mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP no delay, disabling Nagle's Algorithm -S, --tos # set the socket's IP_TOS (byte) fieldServer specific: -s, --server run in server mode -t, --time # time in seconds to listen for new connections as well as to receive traffic (default not set) --udp-histogram #,# enable UDP latency histogram(s) with bin width and count, e.g. 1,1000=1(ms),1000(bins) -B, --bind
[%
] bind to multicast address and optional device -H, --ssm-host
set the SSM source, use with -B for (S,G) -U, --single_udp run in single threaded UDP mode -D, --daemon run the server as a daemon -V, --ipv6_domain Enable IPv6 reception by setting the domain and socket to AF_INET6 (Can receive on both IPv4 and IPv6)Client specific: -c, --client
run in client mode, connecting to
-d, --dualtest Do a bidirectional test simultaneously --ipg set the the interpacket gap (milliseconds) for packets within an isochronous frame --isochronous
:
,
send traffic in bursts (frames - emulate video traffic) -n, --num #[kmgKMG] number of bytes to transmit (instead of -t) -r, --tradeoff Do a bidirectional test individually -t, --time # time in seconds to transmit for (default 10 secs) -B, --bind [
|
] bind ip (and optional port) from which to source traffic -F, --fileinput
input the data to be transmitted from a file -I, --stdin input the data to be transmitted from stdin -L, --listenport # port to receive bidirectional tests back on -P, --parallel # number of parallel client threads to run -R, --reverse reverse the test (client receives, server sends) -T, --ttl # time-to-live, for multicast (default 1) -V, --ipv6_domain Set the domain to IPv6 (send packets over IPv6) -X, --peer-detect perform server version detection and version exchange -Z, --linux-congestion
set TCP congestion control algorithm (Linux only)Miscellaneous: -x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports -y, --reportstyle C report as a Comma-Separated Values -h, --help print this message and quit -v, --version print version information and quit[kmgKMG] Indicates options that support a k,m,g,K,M or G suffixLowercase format characters are 10^3 based and uppercase are 2^n based(e.g. 1k = 1000, 1K = 1024, 1m = 1,000,000 and 1M = 1,048,576)The TCP window size option can be set by the environment variableTCP_WINDOW_SIZE. Most other options can be set by an environment variableIPERF_
, such as IPERF_BANDWIDTH.Source at
Report bugs to

 

# Windows 版本参数说明

c:\xx\iperf2>iperf.exe -hUsage: iperf [-s|-c host] [options]       iperf [-h|--help] [-v|--version]Client/Server:  -b, --bandwidth #[KMG | pps]  bandwidth to send at in bits/sec or packets per second  -e, --enhancedreports    use enhanced reporting giving more tcp/udp and traffic information  -f, --format    [kmKM]   format to report: Kbits, Mbits, KBytes, MBytes  -i, --interval  #        seconds between periodic bandwidth reports  -l, --len       #[KM]    length of buffer to read or write (default 8 KB)  -m, --print_mss          print TCP maximum segment size (MTU - TCP/IP header)  -o, --output    
output the report or error message to this specified file -p, --port # server port to listen on/connect to -u, --udp use UDP rather than TCP -w, --window #[KM] TCP window size (socket buffer size) -z, --realtime request realtime scheduler -B, --bind
bind to
, an interface or multicast address -C, --compatibility for use with older versions does not sent extra msgs -M, --mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP no delay, disabling Nagle's Algorithm -V, --ipv6_domain Set the domain to IPv6Server specific: -s, --server run in server mode -U, --single_udp run in single threaded UDP mode -D, --daemon run the server as a daemonClient specific: -c, --client
run in client mode, connecting to
-d, --dualtest Do a bidirectional test simultaneously -n, --num #[KM] number of bytes to transmit (instead of -t) -r, --tradeoff Do a bidirectional test individually -t, --time # time in seconds to transmit for (default 10 secs) -B, --bind [
|
] bind src addr(s) from which to originate traffic -F, --fileinput
input the data to be transmitted from a file -I, --stdin input the data to be transmitted from stdin -L, --listenport # port to receive bidirectional tests back on -P, --parallel # number of parallel client threads to run -T, --ttl # time-to-live, for multicast (default 1) -Z, --linux-congestion
set TCP congestion control algorithm (Linux only)Miscellaneous: -x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports -y, --reportstyle C report as a Comma-Separated Values -h, --help print this message and quit -v, --version print version information and quit[KM] Indicates options that support a K or M suffix for kilo- or mega-The TCP window size option can be set by the environment variableTCP_WINDOW_SIZE. Most other options can be set by an environment variableIPERF_
, such as IPERF_BANDWIDTH.Source at
Report bugs to

 

转载于:https://www.cnblogs.com/Cong0ks/p/11383139.html

你可能感兴趣的文章
c#接口
查看>>
MyEclipse部署Jboss出现java.lang.OutOfMemoryError: PermGen space
查看>>
ZOJ 1133
查看>>
HIVE和HADOOP的一些东西
查看>>
alibaba / zeus 安装 图解
查看>>
Planned Delivery Time as Work Days (SCN discussion)
查看>>
Ubuntu:让桌面显示回收站
查看>>
Android上传头像代码,相机,相册,裁剪
查看>>
git 安装体验
查看>>
Oracle 给已创建的表增加自增长列
查看>>
《DSP using MATLAB》Problem 2.17
查看>>
if 循环
查看>>
uva 111 History Grading(lcs)
查看>>
Python学习week2-python介绍与pyenv安装
查看>>
php判断网页是否gzip压缩
查看>>
一个有意思的js实例,你会吗??[原创]
查看>>
sql server中bit字段实现取反操作
查看>>
Part3_lesson2---ARM指令分类学习
查看>>
Django mysql 改用pymysql 驱动
查看>>
jQuery拖拽原理实例
查看>>