Detailed explanation of iperf3 parameters (iperf3 command)

All the command parameters of iPerf3 can actually be found on the iPerf - iPerf3 and iPerf2 user documentation official website, but the first one is in English, and the use of some parameters is not written in detail. The following uses experience to do some use for each parameter . Frequently asked questions. The following will translate each parameter, and add an example for the use of each parameter, see the article linked after the translation of each parameter (iperf3 version 3.13 adds a lot of parameters, which have not been updated on the iperf3 home page but can be found in man iperf3 As you can see in the help, this article is not fully completed, and it is being added one after another. If you want to know which parameters are detailed, but this article is still missing, you can comment and leave a message, and the author will add it first ).

In addition to the preliminary description in this article, each parameter can refer to the following series of detailed graphic analysis articles:

iPerf3 -b parameter detailed graphic analysis Detailed graphic analysis of iPerf3 -M parameters
Detailed graphic analysis of iPerf3 -B parameters iPerf3 -N parameter detailed graphic analysis
iPerf3 -p parameter detailed graphic analysis Detailed graphic analysis of iPerf3 -A parameters
iPerf3 -P parameter detailed graphic analysis iPerf3 -w parameter detailed graphic analysis
Detailed explanation of iperf3 --bind-dev parameters and -B parameter update (version 3.13)

If you are interested, welcome to visit and exchange iperf3 source code to read and analyze to communicate together.

The following is the original text and detailed description of the original user manual:

GENERAL OPTIONS (general parameters, parameters that apply regardless of whether iperf3 runs in client or server mode)
Command line option (command line parameter) Description
-p, --port n

The server port for the server to listen on and the client to connect to. This should be the same in both client and server. Default is 5201.

1. Server: The port that the server monitors, defaults to port 5201, and monitors TCP/UDP at the same time

2. Client: the port for the client to connect to, the default is 5201, if there is a -u parameter at the same time, use UDP to initiate the connection, if not, use TCP to connect by default

How to use:

iperf3 -s -p 6666, listen on port 6666

iperf3 -c 192.168.0.1 -p 6666, to connect to port 6666 of the server

-f, --format [kmgtKMGT]  A letter specifying the format to print bandwidth numbers in. Supported formats are 
    'k' = Kbits/sec           'K' = KBytes/sec
    'm' = Mbits/sec           'M' = MBytes/sec

The adaptive formats choose between kilo- and mega- as appropriate.

format to report: Kbits/Mbits/Gbits/Tbits

What format is used to display the bandwidth (column bitrate) of the specified print test result: k means: kilobit/s, K means: kilobyte/s, m ​​means: megabit/s, M means: megabyte /s, g means: gigabit/s, G means: gigabytes/s, t means: megabits/s, T means: terabytes/s.

The client and server can use different parameters to print out the bandwidth test results according to their own specified methods

How to use:

iperf3 -s -f M

iperf3 -c 192.168.0.1 -f k

-i, --interval n

Sets the interval time in seconds between periodic bandwidth, jitter, and loss reports. If non-zero, a report is made every interval seconds of the bandwidth since the last report. If zero, no periodic reports are printed. Default is 1.

以秒为单位,设置带宽(还有抖动,丢包等)测试报告打印输出的周期。不使用这个选项时,默认周期是1秒,可以使用0和任何0.1秒到60秒之间的参数,如果是0表示不打印周期性的报告,只在整个测试完成时,输出一次报告结果。客户端和服务端可以使用不同的参数值。

使用方式:

iperf3 -s -i 0

iperf3 -c 192.168.0.1 -i 3.6

-F, --file name

client-side: read from the file and write to the network, instead of using random data;
server-side: read from the network and write to the file, instead of throwing the data away.

Use  a  file as the source (on the sender) or sink (on the receiver) of data, rather than just generating random data or throwing it away.  This feature is used for finding whether or not the  storage subsystem is the bottleneck for file transfers.  It does not turn iperf3 into a file transfer tool.  The length, attributes, and in some cases contents of the received  file  may  not  match those of the original file.

客户端:从文件中读取数据,并发送到网络里,如果不加这个选项默认系统会产生随机数据发送到网络里
服务端:把网络上收到的数据写入文件中,默认系统会丢弃收到的数据

这个功能可以支持使用iperf3来测试在文件传输时,文件存储系统的性能会不会成为瓶颈,但有时候收到的文件的长度属性内容可能和发送的文件不一至(应该 是UDP有丢包的情况下才会发生),所以我们不能把iperf3做为一个文件传输工具来使用。
使用方式:
iperf3 -s -F ./log.txt

iperf3 -c 192.168.0.1 -F ./input.txt

-A, --affinity n/n,m

Set the CPU affinity, if possible (Linux and FreeBSD only). On both the client and server you can set the local affinity by using the n form of this argument (where n is a CPU number). In addition, on the client side you can override the server’s affinity for just that one test, using the n,m form of argument. Note that when using this feature, a process will only be bound to a single CPU (as opposed to a set containing potentialy multiple CPUs).

如果系统支持则可以设置CPU亲和性(只支持Linux和FreeBSD),说白了就是在设定将iperf3进程跑在哪个CPU上。客户端和服务端都可以设置CPU亲和性,n表示CPU编号(Linux下如何查看CPU编号及其它CPU相关的信息)。
此外在客户端可以通过"-A n,m"的形式,覆盖server端的CPU亲和性设置(就是覆盖运行server端时,指定运行在哪个CPU上的设置),指定本次运行时iperf3的服务端跑在m号CPU上,但只对这一次运行生效。
注意如果用了这个参数,意味着iperf3只会在指定的CPU上运行(默认不加这个参数时,操作系统会根据当前各个CPU核的负额情况,自行调度iperf运行在哪个CPU上)
使用方式:

iperf3 -s -A 2,指定服务端运行在2号CPU上

iperf3 -c 192.168.0.1 -A 0,指定客户端运行在0号CPU上
或者
iperf3 -c 192.168.0.1 -A 0,3,指定本次运行客户端运行在0号CPU上而服务端运行在2号CPU上

详见:iPerf3 -A参数详细图文分析

-B, --bind host[%<dev>]

Bind to host, one of this machine's addresses. For the client this sets the outbound interface. For a server this sets the incoming interface. This is only useful on multihomed hosts, which have multiple network interfaces.

optional <dev> equivalent to `--bind-dev <dev>'

绑定到主机,主机的一个地址。对客户端来说,这个设置数据发送从哪个接口发送。

对服务端来说,这是设置数据从哪个接口接收。这个命令只在多宿主主机(二个或者二个以上网络接口)中有用。

这里还有个[%<dev>]的选项,这个选项是可选的,功能等同于"--bind-dev <dev>"

这个选项对接口的定义很不清楚,没有讲清楚 IP接口和物理网卡接口选择时,-B与主机路由的选择关系,

可以参照另外一个文章有清楚的描述:iPerf3 -B (--bind host)绑定发送端网卡/发送IP端地址

3.13版本对上述内容兼容,并有更新(可选参数[%<dev>]部分),详见:

iperf3 --bind-dev参数详解 -B参数更新详解

以及Linux侧路由配置:Linux上添加路由,删除路由,修改路由配置(路由表项基本知识)

--bind-dev <dev>

bind to the specified network interface.  This option uses SO_BINDTODEVICE, and may require root permissions.  (Available on Linux and possibly other systems.)

绑定到指定的网卡上,本选项是使用SO_BINDTODEVICE完成的,所以可能需要root权限(只在linux或者某此指定操作系统上可用)

详见:iperf3指定网卡测试 --bind-dev参数详解

-V, --verbose

give more detailed output

输入更多的详细信息

-J, --json

output in JSON format

运行结束时,用JSON的格式输出测试结果,默认打印到屏幕上,可以结合下面"--logfile"或者linux本身的重定向命令">"将输出报告打印到指定文件里

--logfile file

send output to a log file. (new in iPerf 3.1)

把测试结果存到指定的log文件

--forceflush

 force flushing output at every interval

这个参数未完成,待更新

--timestamps<=format> emit a timestamp at the start of each output line(optional "=" and format string as per strftime(3))
这个参数未完成,待更新
--rcv-timeout # 

idle timeout for receiving data (default 120000 ms)

这个参数未完成,待更新

--snd-timeout #

timeout for unacknowledged TCP data(in ms, default is system settings)

这个参数未完成,待更新

-d, --debug[=#] 

emit debugging output. Primarily (perhaps exclusively) of use to developers.

(optional optional "=" and debug level: 1-4. Default is 4 - all messages)

打印出更多的调试用的log,主要是给开发者用的,如果不是碰到需要调试的问题,这个参数基本没什么用。=#是可选项,默认是4,打印所有消息,可以选1-4

-v, --version

Show version information and quit.

只要加了-v这个参数,iperf3会显示版本号,然后自动退出

-h, --help

Show a help synopsis and quit.

只要加了-h这个参数,iperf3会显示帮助信息(包括命令使用格式,各个参数的简明的使用说明),然后自动退出
 

SERVER SPECIFIC OPTIONS(服务器端专用参数)
Command line option(命令行参数) Description(具体描述)
-s, --server

Run iPerf in server mode. (This will only allow one iperf connection at a time)


本次iperf3运行在服务端模式(-c和-s是互斥的,二者必居其一),括号里的这句话:这只允许一次一个iperf connection,是指iperf服务端同一时间只接受一个TCP或者UDP连接。

意味着同一时间只有一个客户端可以给这个iperf3服务端进程打流。(但可以在通过-p参数,指定在同一个主机的同一个IP地址的不同的端口同时开多个iperf3服务端进程)

使用方式:

iperf3 -s

-D, --daemon

Run the server in background as a daemon.

以daemon的形式在后台运行(不会向控制台窗口输出,可以通过ps -aux | grep iperf3看到对应的后台进程号)

和用iperf3 -s &命令(注意命令最后的&号)类似,都可以让iperf3在后台运行,但iperf3 -s &命令的话,控制台终端还是可以得到iperf3的打印输出的。

但用&的后台运行,在你关闭终端时,程序也会关闭,而用-D的,则在终端关闭后,iperf3 -s会继续在后台运行

下面文章可以详细了解Linux前后台程序,如何让程序在后台运行,如何切换前后台,以及Daemon进程:

如何在Linux前后台切换程序, 用&把程序运行在后台和以Daemon方式运行的程序(控制台退出后程序继续保持运行)

使用方式:

iperf3 -s -D

-1, --one-off

handle one client connection then exit

这个参数未完成,待更新

--server-bitrate-limit #[KMG][/#]

server's total bit rate limit (default 0 = no limit)(optional slash and number of secs interval for averaging  total data rate.  Default is 5 seconds)

这个参数未完成,待更新

--idle-timeout #

restart idle server after # seconds in case it got stuck (default - no timeout)

这个参数未完成,待更新

-I, --pidfilefile

write a file with the process ID, most useful when running as a daemon. (new in iPerf 3.1)

这介需要iperf3.1以上版本才支持,提供了一个将本次运行的iperf3进程的PID写入到指定文件里的功能,正常的情况下也没啥用,大概率在将程序运行成Daemon程序,

并用需要通过PID去监控,KILL或者其它控制这个进程的自动化功能时用到(原文件是这么说的,但我觉得这个指供的功能和ps -aux | grep iperf3得到的信息是一样的,

对于工作在Linux下的人来说并没有什么实际意义,估计是给其它平台的工作者用的)

使用方式:

iperf3 -s -I /home/user/iperf.pid

注意:

1)当前用户一定要有/home/user目录的写权限

2)文件可以事先用touch命令创建好,也可以不用创建

3)iperf3当前进各结束后/home/user/iperf.pid文件会被主动删除

4)/home/user/iperf.pid一定要使用全路径,不能使用默认的当前路径

   (使用当前路径分导致各种奇怪的iperf启动失败,或者启动成功了,但指定目录找到不iperf.pid文件),原因不明

--rsa-private-key-path file

Path to the RSA private key (not password-protected) used to decrypt authentication credentials from the client (if built with OpenSSL support).

这个参数未完成,待更新

--authorized-users-path file

path  to  the  configuration  file  containing  authorized  users credentials to run iperf tests (if built with OpenSSL support).  The file is a comma separated list of usernames and password hashes; more information on the structure of the file can be found in the EXAMPLES section.

这个参数未完成,待更新

--time-skew-thresholdsecond seconds

time skew threshold (in seconds) between the server and client during the authentication process.

这个参数未完成,待更新

CLIENT SPECIFIC OPTIONS(客户端专用参数)
Command line option(命令行参数) Description(具体描述)
-c, --client host

Run iPerf in client mode, connecting to an iPerf server running on host.

本次iperf3运行在客户端状态,host指向的是iperf服务端的ip地址

使用方式:

iperf3 -c 192.168.0.10, 本机做为客户端连接到192.168.0.10(服务端运行在这人ip地址上),并做打流量测试

--sctp

Use SCTP rather than TCP (Linux, FreeBSD and Solaris). (new in iPerf 3.1)

使用sctp协议(不加这人选项的话默认使用tcp),iperf3.1及更新的版本开始支持

使用方式:

iperf3 -c 192.168.0.10 --sctp

-u, --udp

Use UDP rather than TCP. See also the -b option.

使用udp协议(不加这人选项的话默认使用tcp),使用这个选项的话,还需要查看-b选项,因为UDP是面向数据报的协议,所以一般要用-b指定打多大带宽的数据(不指定-b的话,默认值见对-b参数的解释)

使用方式:

iperf3 -c 192.168.0.10 -u

--connect-timeout n set  timeout for establishing the initial control connection to the server, in milliseconds.  The default behavior is the operating system's timeout for TCP connection establishment.  Provid‐ing a shorter value may speed up detection of a down iperf3 server.
这个参数未完成,待更新
-b, --bandwidth n[KM]

Set target bandwidth to n bits/sec (default 1 Mbit/sec for UDP, unlimited for TCP). If there are multiple streams (-P flag), the bandwidth limit is applied separately to each stream. You can also add a ’/’ and a number to the bandwidth specifier. This is called "burst mode". It will send the given number of packets without pausing, even if that temporarily exceeds the specified bandwidth limit.

设置本次测试的发送带宽成n 比特/秒(对UDP来说默认是1M 比特/秒,对TCP来说默认是不限制),如果同时还设置了多线程(-P选项),当前这个-b的带宽指定的是每个线程的发送带宽。

我们还可以在带宽后面加上/和一个数字。我们称这个为“突发脉冲模式”。加了这个“/数字”后,iperf3客户端会一次连续发送指定的数量的数据包,中间不做任何间隔(不加这个 "/数字"时,iperf3会根据每个报文的长度,算出为了达到指定的带宽,每秒需要发送几个报文,然后每个数据报文会被以平均的时间间隔进行发送),即使中间会有偶尔的超出带宽限制

使用方式:

iperf3 -c 192.168.0.10 -u -b 100M,报文平均的落在时间线上

或者

iperf3 -c 192.168.0.10 -u -b 100M/40,报文以40个为一组,连续发送40个报文,每一组平均的落在时间线上,每一组发送时可能超出-b指定的带宽,但iperf3保证整个打流期间的平均带宽不超过指定值。

详见:iperf3 -b参数详细图文分析

--pacing-timer n[KMGT]

 set pacing timer interval in microseconds (default 1000 microseconds, or 1 ms).  This controls iperf3's internal pacing timer for the -b/--bitrate option.  The timer fires at the interval set by this parameter.  Smaller values of the pacing timer parameter smooth out the traffic emitted by iperf3, but potentially at the cost of performance due to more frequent timer processing.

这个参数未完成,待更新

--fq-rate n[KMGT]

Set a rate to be used with fair-queueing based socket-level pacing, in bits per second.  This pacing (if specified) will be in addition to any pacing due to iperf3's internal throughput  pac‐ing  (-b/--bitrate  flag), and both can be specified for the same test.  Only available on platforms supporting the SO_MAX_PACING_RATE socket option (currently only Linux).  The default is no fair-queueing based pacing.

这个参数未完成,待更新

--no-fq-socket-pacing

This option is deprecated and will be removed.  It is equivalent to specifying --fq-rate=0.

这个参数未完成,待更新

-t, --time n

The time in seconds to transmit for. iPerf normally works by repeatedly sending an array of len bytes for time seconds. Default is 10 seconds. See also the -l-k and -n options.

定义本次发送报文测试要持续的时间,单位为秒iPerf通常工作的模式是:持续-t定义的时间(秒)不停的重复发送一组长度为-l定义的数据包。默认值是10秒。参照-l, -k和-n选项
使用方式:
iperf3 -c 127.0.0.1 -u -t 11
注意这个参数不能和-n或者-k同时使用,上述例子表示连续发送11秒钟时间后停止测试 

-n, --num n[KMGT]

The number of buffers to transmit. Normally, iPerf sends for 10 seconds. The -n option overrides this and sends an array of len bytes num times, no matter how long that takes. See also the -l-k and -t options.

定义本次发送报文要发送的总的数据长度,单位是字节。默认情况下iperf持续发送10秒时间。加了-n选项后,就不覆盖了10秒这个默认设置,而是发送-n指定长度的数据,发送完后停止。参照-l,-k和-t选项
使用方式:
iperf3 -c 127.0.0.1 -u -n 40M
注意这个参数不能和-t或者-k同时使用,长度后面不带单位的话默认单位是字节,也可以用K/M表示千/兆字节,上述例子表示总共要发送40M字节的报文

-k, --blockcount n[KMGT]

The number of blocks (packets) to transmit. (instead of -t or -n) See also the -t-l and -n options.

定义本次发送报文要发送的报文个数。发送-k指定个数的报文,发送完后停止。参照-l,-n和-t选项
使用方式:
iperf3 -c 127.0.0.1 -u -k 37
注意这个参数不能和-t或者-n同时使用,上面例子表示总共要发送37个报文

-l, --length n[KMGT]

The length of buffers to read or write. iPerf works by writing an array of len bytes a number of times. Default is 128 KB for TCP, 8 KB for UDP. See also the -n-k and -t options.

每次发报的报文长度。iperf发送一组长度为-l指定的数据报文,每个数据报文的长度都是-l指定的长度。默认TCP是128KB, UDP是8KB。参照-n, -k和-t选项。

使用方式:

iperf3 -c 192.168.3.15 -u -l 2K

注意: 这个参数可以和-n, -k和-t参数一起使用。

-P, --parallel n

The number of simultaneous connections to make to the server. Default is 1.

到iperf3服务器端并行的连接数量,默认值是1。(在日常测试中,我们会发现当最大吞吐量上不去的时候,开多个并行连接一般会立竿见影的提升最大吞吐量,通常我人们的第一反应是iperf开启了多线程(详见:Linux下如何查看多线程进程里的线程信息),但事实上在开启多个并行连接的情况下iperf不论是客户端还是服务端,依然工作在单线程模式下(详见:iPerf3 -P参数详细图文分析),最大吞吐量主要取决于接收方主机,发送方主机和网络3个节点的,最大带宽,最大包处理能力,延时这三个能力,后面我们可以专门开篇讲讲做最大吞吐量测试3个节点3个能力的影响,以及应该如何正确设置iperf的参数。

使用方式:

iperf3 -c 192.168.3.15 -u -P 3

表示开3个连接。

-R, --reverse

Run in reverse mode (server sends, client receives).

工作在反向连接模式(服务器端发送,客户端接收)

使用方式:

iperf3 -c 192.168.3.15 -u -R

--bidir test in both directions (normal and reverse), with both the client and server sending and receiving data simultaneously

这个参数未完成,待更新

-w, --window n[KMGT]

Sets the socket buffer sizes to the specified value. For TCP, this sets the TCP window size. (this gets sent to the server and used on that side too)

设置socket缓冲的大小。对TCP来说,这个用于设置 TCP 窗口接收的大小(这个选项会被发送到服务器端,同样的参数会在服务器端生效)

iperf3 -c 192.168.3.15 -w 100k

对于UDP来说,通常不需要设置这个参数,这个数设置得太小了,会导致发送端发送速度慢,

对于TCP来说,这个参数的设置值的计算和选择方法详见:TCP滑动窗口协议与流量控制

-w使用参数详解可以见:

iPerf3 -w参数详细图文分析

-M, --set-mss n

Attempt to set the TCP maximum segment size (MSS). The MSS is usually the MTU - 40 bytes for the TCP/IP header. For ethernet, the MSS is 1460 bytes (1500 byte MTU).

尝试去设置TCP的MSS最大分片长度。MSS通常是MTU减去40字节的TCP/IP首部。对以达网来说MSS是1460(MTU是1500字节)

使用方式:

iperf3 -c 192.168.3.15 -M 100

MSS设置得很小,会导致TCP分成很多个小包进行发送,过小会导致带宽测试结果偏小。

MSS的说明见:TCP的MSS的计算与详解

-M参数如何设置见:iPerf3 -M参数详细图文分析

-N, --no-delay

Set the TCP no delay option, disabling Nagle's algorithm. Normally this is only disabled for interactive applications like telnet.

设置TCP的不延时选项,关闭Nagle's算法,通常这个选项只用于交互式人机对话的应用程序中,比如Telnet

使用方式:

iperf3 -c 192.168.3.26 -N

其实这个在小报文测试场景里(测试的目标就是看网络对大量小报文的处理能力)时,非常有用,这个测试场景里就应该关闭Nagle算法和TCP_CORK,保证每个小报文都被及时送出。

原理见:

TCP的Nagle算法和delayed ack(延时发送和延时应答与稍带应答)

TCP_CORK选项

使用场景分析见:

iPerf3 -N参数详细图文分析

-4, --version4

only use IPv4.

只使用IPv4

-6, --version4

only use IPv6.

只使用IPv6, 注意这个要配合IPv6的地址一起使用

-S, --tos n

The type-of-service for outgoing packets. (Many routers ignore the TOS field.) You may specify the value in hex with a '0x' prefix, in octal with a '0' prefix,

or in decimal. For example, '0x10' hex = '020' octal = '16' decimal. The TOS numbers specified in RFC 1349 are: 

    IPTOS_LOWDELAY     minimize delay        0x10

    IPTOS_THROUGHPUT   maximize throughput   0x08

    IPTOS_RELIABILITY  maximize reliability  0x04

    IPTOS_LOWCOST      minimize cost         0x02

设置被发送出去的报文的TOS字段。(目前很多路由器是不处理TOS字段的),可以用0x打头输入16进制数,0打头输入8进制数,或者不需要前缀则默认是10进制数。

比如: 16进制的"0x10"表示8进制的"020"表示十进制的16。

TOS定义如下:

    IPTOS_LOWDELAY     最小延时        0x10

    IPTOS_THROUGHPUT   最大带宽   0x08

    IPTOS_RELIABILITY  可靠性最好  0x04

    IPTOS_LOWCOST      最便宜         0x02

使用方式:

iperf3 -c 192.168.3.15 -S 0x10

--dscp dscp set  the IP DSCP bits.  Both numeric and symbolic values are accepted. Numeric values can be specified in decimal, octal and hex (see --tos above). To set both the DSCP bits and the ECN bits, use --tos.
这个参数未完成,待更新
-L, --flowlabel n

Set the IPv6 flow label (currently only supported on Linux).

设置IPv6的流标签(目前只有Linux版本的iperf3能支持)

-X, --xbind name

Bind SCTP associations to a specific subset of links using sctp_bindx(3).  The --B flag will be ignored if this flag is specified.  Normally SCTP will include the protocol  addresses  of  all active  links  on the local host when setting up an association. Specifying at least one --X name will disable this behaviour.  This flag must be specified for each link to be included in the  association, and is supported for both iperf servers and clients (the latter are supported by passing the first --X argument to bind(2)).  Hostnames are accepted as arguments and are resolved using getaddrinfo(3).  If the --4 or --6 flags are specified, names which do not resolve to addresses within the specified protocol family will be ignored.

这个参数未完成,待更新

--nstreams n

Set number of SCTP streams.

这个参数未完成,待更新

-Z, --zerocopy

Use a "zero copy" method of sending data, such as sendfile(2), instead of the usual write(2). This uses much less CPU.

使用“零拷贝”办法来发送数据,比如使用sendfile(2)代替write(2).这会减少CPU的占用率

使用方式:

iperf3 -c 192.168.3.15 -u -Z

-O, --omit n

Omit the first n seconds of the test, to skip past the TCP TCP slowstart period.

忽略最前面n秒的测试结果,通常用来跳过TCP慢启动过程

使用方式:

iperf3 -c 192.168.3.15 -O 20 -t 40

忽略最前面的20秒,然后再打40秒的流(见-t参数)

TCP在启动阶段,会有一个慢启动与拥塞避免的吞吐量爬坡过程,这个过程中吞吐量比较低,忽略这个时间可以测试出网络的真正的吞吐量情况。

详见:TCP慢启动与拥塞控制

-T, --title str

Prefix every output line with this string.

每行打印输出内容前加一个前缀

使用方式:

iperf3 -c 192.168.3.15 -T 这是前缀

在每行输入前面加了“这是前缀”这4个字,不知道这个功能有什么用

--extra-data str

Specify an extra data string field to be included in JSON output.

这个参数未完成,待更新

-C, --linux-congestion algo

Set the congestion control algorithm (Linux only for iPerf 3.0, Linux and FreeBSD for iPerf 3.1).

设置TCP拥塞控制算法(在LINUX上3.0以上支持,在LINUX和FREEBSD上3.1以下版本支持)

在开始设置这个参数之前,需要对TCP流量控制与拥塞控制算法有基本的理解,并对自己的网络状态有清楚的认知的情况下,才能正确设置本参数

--cport n

Option to specify the client-side port. (new in iPerf 3.1)

本参数提供了一个指定客户端本地端口的选项,区分于-p指定的是服务端的远端端口

使用方式:

iperf3 -s --cport 8888,  从测试结果看,这个选项在服务端不起任何作用,但执行命令不会报错

iperf3 -c 192.168.0.1 --cport 8888,指定客户端选择本地端口为8888

--get-server-output

Get  the output from the server.  The output format is determined by the server (in particular, if the server was invoked with the --json flag, the output will be in JSON format, otherwise it will be in human-readable format).  If the client is run with --json, the server output is included in a JSON object; otherwise it is appended at the bottom of the human-readable output.       

这个参数未完成,待更新

--udp-counters-64bit

Use 64-bit counters in UDP test packets.  The use of this option can help prevent counter overflows during long or high-bitrate UDP tests.  Both client and server need to be running at  least version 3.1 for this option to work.  It may become the default behavior at some point in the future.       

这个参数未完成,待更新

--repeating-payload

Use  repeating  pattern  in  payload, instead of random bytes.  The same payload is used in iperf2 (ASCII '0..9' repeating).  It might help to test and reveal problems in networking gear with hardware compression (including some WiFi access points), where iperf2 and iperf3 perform differently, just based on payload entropy.

这个参数未完成,待更新       

--dont-fragment

Set the IPv4 Don't Fragment (DF) bit on outgoing packets.  Only applicable to tests doing UDP over IPv4.

这个参数未完成,待更新

--username username

username to use for authentication to the iperf server (if built with OpenSSL support).  The password will be prompted for interactively when the test is run.  Note, the password to  use  can also be specified via the IPERF3_PASSWORD environment variable. If this variable is present, the password prompt will be skipped.

这个参数未完成,待更新

--rsa-public-key-path file

path to the RSA public key used to encrypt authentication credentials (if built with OpenSSL support)

This parameter is not completed, to be updated

Guess you like

Origin blog.csdn.net/meihualing/article/details/112322683