当前位置:   article > 正文

全网最完整的iperf测试工具使用说明_iperf测试命令详解

iperf测试命令详解


前言

iPerf - TCP、UDP 和 SCTP 的终极速度测试工具。常用的的网络限制 + 互联网中立性测试工具。被广为认可。
但是国内网站上的iperf使用说明都含糊不清甚至是错的,没办法只能自己手动翻译和搬运了官网上的iperf手册。

iPerf 2.0、iPerf 3.0 和 iPerf 3.1 之间的变化

  • iPerf3 当前支持的 iPerf2 功能:
    TCP 和 UDP 测试
    设置端口 (-p)
    设置 TCP 选项:无延迟、MSS 等。
    设置 UDP 带宽 (-b)
    设置套接字缓冲区大小 (-w)
    报告间隔 (-i)
    设置 iPerf 缓冲区 (-l)
    绑定到特定接口 (-B)
    IPv6 测试 (-6)
    要传输的字节数 (-n)
    测试长度 (-t)
    并行流 (-P)
    设置 DSCP/TOS 位向量 (-S)
    更改数字输出格式 (-f)
  • iPerf 3.0 的新功能:
    动态服务器(客户端/服务器参数交换) – iPerf2 中的大多数服务器选项现在都可以由客户端动态设置
    客户端/服务器结果交换
    iPerf3 服务器同时接受单个客户端(iPerf2 同时接受多个客户端)
    iPerf API (libiperf) – 提供一种使用、自定义和扩展 iPerf 功能的简单方法
    -R,反向测试模式 – 服务器发送,客户端接收
    -O, --omit N :省略前 n 秒(忽略 TCP 慢启动)
    TCP 为 -b, --bandwidth n[KM](IPERF 2 仅为 UDP):将目标带宽设置为 n 位/秒(UDP 默认为 1 Mbit/秒,TCP 无限制)。
    -V, --verbose :比以前更详细的输出
    -J, --json :JSON 格式的输出
    -Z, --zerocopy :使用“零复制”sendfile() 方法发送数据。这使用的 CPU 要少得多。
    -T, --title str :在每个输出行前加上此字符串的前缀
    -F, --file name : xmit/recv 指定的文件
    -A, --affinity n/n,m : 设置 CPU 亲和力(内核编号从 0 - 仅限 Linux 和 FreeBSD)
    -k, --blockcount #[KMG] :要传输的块数(数据包)(而不是 -t 或 -n)
    -4, --version4 : 仅使用 IPv4
    -6, --version6 : 仅使用 IPv6
    -L, --flowlabel : 设置 IPv6 流标签(仅限 Linux)
    -C, --linux-congestion : 设置拥塞控制算法(仅限 Linux 和 FreeBSD)(iPerf2 中的 -Z)
    -d, --debug :发出调试输出。主要(也许是唯一)供开发人员使用。
    -s, --server :iPerf2 可以处理多个客户端请求。iPerf3 一次只允许一个 iperf 连接。
  • iPerf 3.1 的新功能:
    -I, --pidfile 文件写入一个带有进程 ID 的文件,在作为守护程序运行时最有用。
    –cport :指定客户端端口。
    –sctp 使用 SCTP 而不是 TCP(Linux、FreeBSD 和 Solaris)。
    –udp-counters-64bit :支持运行时间非常长的 UDP 测试,这可能会导致计数器溢出
    –logfile file :将输出发送到日志文件。
  • iPerf3 不支持的 iPerf2 功能
    双向测试 (-d / -r)
    从 stdin (-I) 传输的数据
    TTL : 生存时间,用于组播 (-T)
    排除 C(连接) D(数据) M(组播) S(设置) V(服务器) 报告 (-x)
    以逗号分隔值 (-y) 的形式报告
    兼容模式允许与旧版本的 iPerf (-C) 一起使用

iPerf 3 用户文档

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
另请参阅 https://github.com/esnet/iperf

iPerf 2.0.6、iPerf 2.0.7 和 iPerf 2.0.8 之间的更改

  • 2.0.6 更改集 (rjmcmahon@rjmcmahon.com) 2014 年 3 月:
    增加报表标头的共享内存,减少互斥锁争用。需要提高性能。应与平台/操作系统无关的次要代码更改
  • 2.0.7 更改集 (rjmcmahon@rjmcmahon.com) 2014 年 8 月:
    仅限 Linux 的版本,支持结束/结束延迟(假设时钟同步)
    支持更小的报告间隔(5 毫秒或更大)
    UDP 的结束/结束延迟(平均值/最小值/最大值),以毫秒为单位显示,分辨率为微秒
    套接字读取超时(仅限服务器),因此无论是否未收到数据包,都会发生 iperf 报告
    报表时间戳现在显示毫秒分辨率
    本地绑定支持使用冒号作为分隔符的端口值 (-B 10.10.10.1:60001)
    使用 linux 实时调度程序和数据包级时间戳来提高延迟准确性
    建议在客户端和服务器上使用 PTP 将时钟同步到微秒
    建议 PTP 大师的质量参考,例如来自 Spectracom 等公司的 GPS 训练振荡器
  • 2.0.8 更改集(截至 2015 年 1 月 12 日):
    修复可移植性,使用 Linux、Win10、Win7、WinXP、MacOS 和 Android 进行编译和测试
    客户端现在需要 UDP 的 -u(不再默认为 UDP 和 -b)
    维护旧版报告格式
    支持 -e 获取增强的报告
    支持使用令牌存储桶的 TCP 速率限制流(通过 -b)
    支持每秒数据包数 (UDP) 通过 pps 作为单位,(例如 -b 1000pps)
    在客户端和服务器报表 (UDP) 中显示 PPS
    支持实时调度程序作为命令行选项(–realtime 或 -z)
    改进客户端 tx 代码路径,使实际 tx 报价速率收敛到 -b 值
    提高微秒级延迟调用的准确性(以与平台无关的方式)
    (使用卡尔曼滤波来预测延迟误差,并根据预测误差调整延迟)
    在初始客户端标头 (UDP) 中显示目标循环时间
    修复从服务器发送到客户端 (UDP) 的最终延迟报告
    在延迟输出中包括标准偏差
    抑制不切实际的延迟输出 (-/-/-/-)
    支持发送SO_SNDTIMEO,因此套接字写入不会阻止超过 -t (TCP)
    如果可用,请使用 clock_gettime(优先于 gettimeofday())
    TCP 写入和错误计数(适用于 Linux 的 TCP 重试和 CWND)
    TCP 读取计数、TCP 读取直方图(8 个箱)
    服务器将在 -t 秒无流量后关闭套接字

另请参阅 https://sourceforge.net/projects/iperf2/

iPerf 2 用户文档

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

调整 TCP 连接

iPerf 的主要目标是帮助调整特定路径上的 TCP 连接。最 TCP 的基本调整问题是 TCP 窗口大小,它控制网络中任何一点的数据量。 如果它太小,发送方有时会处于空闲状态,性能不佳。用于 TCP窗口大小是带宽延迟乘积,
瓶颈带宽 * 往返时间
在下面的 modi4/cyclops 示例中,瓶颈链路是 45 Mbit/秒的 DS3 链路,使用 ping 测量的往返时间为 42 ms。 带宽延迟乘积为
45 Mbit/秒 * 42 ms
= (45e6) * (42e-3)
= 1890000 位
= 230 KB
这是确定最佳窗口大小的起点;将其设置得更高或更低可能会产生更好的结果。 在我们的示例中,尽管带宽延迟乘积为 230K,但超过 130K 的缓冲区大小并没有提高性能。
请注意,许多操作系统和主机对 TCP 窗口大小有上限。 这些可能低至 64 KB,也可能高达几 MB。iPerf 尝试检测何时发生这些情况,并发出警告,指出实际和请求的窗口大小为 不相等(如下所示,尽管这是由于 IRIX 中的四舍五入)。 有关 TCP 窗口大小的详细信息,请参阅 LaFibre.info。 下面是伊利诺伊州 node1 和北卡罗来纳州 node2 之间的示例会话。它们通过 vBNS 主干网和 45 Mbit/秒 DS3 链路连接。 请注意,我们使用适当的 TCP 窗口大小将带宽性能提高了 3 倍。 在允许以字节粒度设置窗口大小的平台上使用自适应窗口大小功能。

node2> iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 60.0 KByte (default)
------------------------------------------------------------
[  4] local <IP Addr node2> port 5001 connected with <IP Addr node1> port 2357
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.1 sec   6.5 MBytes   5.2 Mbits/sec

node1> iperf -c node2
------------------------------------------------------------
Client connecting to node1, TCP port 5001
TCP window size: 59.9 KByte (default)
------------------------------------------------------------
[  3] local <IP Addr node1> port 2357 connected with <IP Addr node2> port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   6.5 MBytes   5.2 Mbits/sec
node2> iperf -s -w 130k
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  130 KByte
------------------------------------------------------------
[  4] local <IP Addr node 2> port 5001 connected with <IP Addr node 1> port 2530
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.1 sec  19.7 MBytes  15.7 Mbits/sec

node1> iperf -c node2 -w 130k
------------------------------------------------------------
Client connecting to node2, TCP port 5001
TCP window size:  129 KByte (WARNING: requested  130 KByte)
------------------------------------------------------------
[  3] local <IP Addr node1> port 2530 connected with <IP Addr node2> port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  19.7 MBytes  15.8 Mbits/sec
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 另一个要做的测试是运行并行 TCP 流。 如果总聚合带宽大于单个流获得的带宽,则说明有问题。 要么是 TCP 窗口大小太小,要么是操作系统的 TCP 实现有错误,要么是网络本身有缺陷。 有关 TCP 窗口大小,请参阅上文;否则诊断有些困难。 如果 iPerf 是使用 pthreads 编译的,则单个客户端和服务器可以对此进行测试,否则会在不同的端口上设置多个客户端和服务器。 下面是一个示例,其中单个流获得 16.5 Mbit/秒,但两个并行流 总共得到 16.7 + 9.4 = 26.1 Mbit/秒,即使使用较大的 TCP 窗口大小:
node2> iperf -s -w 300k
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  300 KByte
------------------------------------------------------------
[  4] local <IP Addr node2> port 5001 connected with <IP Addr node1> port 6902
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.2 sec  20.9 MBytes  16.5 Mbits/sec

[  4] local <IP Addr node2> port 5001 connected with <IP Addr node1> port 6911
[  5] local <IP Addr node2> port 5001 connected with <IP Addr node2> port 6912
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-10.1 sec  21.0 MBytes  16.7 Mbits/sec
[  4]  0.0-10.3 sec  12.0 MBytes   9.4 Mbits/sec

node1> ./iperf -c node2 -w 300k
------------------------------------------------------------
Client connecting to node2, TCP port 5001
TCP window size:  299 KByte (WARNING: requested  300 KByte)
------------------------------------------------------------
[  3] local <IP Addr node2> port 6902 connected with <IP Addr node1> port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.2 sec  20.9 MBytes  16.4 Mbits/sec

node1> iperf -c node2 -w 300k -P 2
------------------------------------------------------------
Client connecting to node2, TCP port 5001
TCP window size:  299 KByte (WARNING: requested  300 KByte)
------------------------------------------------------------
[  4] local <IP Addr node2> port 6912 connected with <IP Addr node1> port 5001
[  3] local <IP Addr node2> port 6911 connected with <IP Addr node1> port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.1 sec  21.0 MBytes  16.6 Mbits/sec
[  3]  0.0-10.2 sec  12.0 MBytes   9.4 Mbits/sec
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34

TCP 的次要调整问题是最大传输单元 (MTU)。 为了最有效,两个主机都应支持路径 MTU 发现。 没有路径 MTU 发现的主机通常使用 536 作为 MSS,这会浪费带宽和处理时间。 使用 -m 选项显示正在使用的 MSS,并查看这是否符合您的预期。 以太网通常约为 1460 字节。

node3> iperf -s -m
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 60.0 KByte (default)
------------------------------------------------------------
[  4] local <IP Addr node3> port 5001 connected with <IP Addr node4> port 1096
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 2.0 sec   1.8 MBytes   6.9 Mbits/sec
[  4] MSS size 1448 bytes (MTU 1500 bytes, ethernet)
[  4] Read lengths occurring in more than 5% of reads:
[  4]   952 bytes read   219 times (16.2%)
[  4]  1448 bytes read  1128 times (83.6%)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

下面是不支持路径 MTU 发现的主机。它只会发送和接收 576 字节的小数据包。

node4> iperf -s -m
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 32.0 KByte (default)
------------------------------------------------------------
[  4] local <IP Addr node4> port 5001 connected with <IP Addr node3> port 13914
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 2.3 sec   632 KBytes   2.1 Mbits/sec
WARNING: Path MTU Discovery may not be enabled.
[  4] MSS size 536 bytes (MTU 576 bytes, minimum)
[  4] Read lengths occurring in more than 5% of reads:
[  4]   536 bytes read   308 times (58.4%)
[  4]  1072 bytes read    91 times (17.3%)
[  4]  1608 bytes read    29 times (5.5%)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

iPerf 支持其他调优选项,这些选项是针对特殊网络情况(如 HIPPI-to-HIPPI over ATM)添加的。


调整 UDP 连接

iPerf 创建恒定比特率 UDP 流。这是一个非常人工的流,类似于语音通信,但没有太多其他内容。

您需要将数据报大小 (-l) 调整为应用程序使用的大小。

服务器通过数据报中的 ID 号检测 UDP 数据报丢失。 通常,一个 UDP 数据报会变成多个 IP 数据包。丢失单个 IP 数据包将丢失整个数据报。 要测量数据包丢失而不是数据报丢失,请使用 -l 选项使数据报足够小以适合单个数据包。 默认大小为 1470 字节,适用于以太网。还会检测到无序数据包。 (无序数据包会导致丢失的数据包计数出现一些歧义; iPerf 假定它们不是重复的数据包,因此它们被排除在丢失的数据包计数之外。 由于 TCP 不会向用户报告丢失,因此我发现 UDP 测试有助于查看路径上的数据包丢失情况。

抖动计算由服务器连续计算,如下所示 RFC 1889 中的 RTP。客户端在 包。服务器将相对传输时间计算为 (服务器的接收时间 - 客户端的发送时间)。客户端和服务器的时钟不需要 同步;在抖动计算中减去任何差异。抖动 是连续运输时间之间差值的平滑平均值。

node2> iperf -s -u -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 1470 byte datagrams
UDP buffer size: 60.0 KByte (default)
------------------------------------------------------------
[  4] local <IP Addr node2> port 5001 connected with <IP Addr node1> port 9726
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  4]  0.0- 1.0 sec   1.3 MBytes  10.0 Mbits/sec  0.209 ms    1/  894 (0.11%)
[  4]  1.0- 2.0 sec   1.3 MBytes  10.0 Mbits/sec  0.221 ms    0/  892 (0%)
[  4]  2.0- 3.0 sec   1.3 MBytes  10.0 Mbits/sec  0.277 ms    0/  892 (0%)
[  4]  3.0- 4.0 sec   1.3 MBytes  10.0 Mbits/sec  0.359 ms    0/  893 (0%)
[  4]  4.0- 5.0 sec   1.3 MBytes  10.0 Mbits/sec  0.251 ms    0/  892 (0%)
[  4]  5.0- 6.0 sec   1.3 MBytes  10.0 Mbits/sec  0.215 ms    0/  892 (0%)
[  4]  6.0- 7.0 sec   1.3 MBytes  10.0 Mbits/sec  0.325 ms    0/  892 (0%)
[  4]  7.0- 8.0 sec   1.3 MBytes  10.0 Mbits/sec  0.254 ms    0/  892 (0%)
[  4]  8.0- 9.0 sec   1.3 MBytes  10.0 Mbits/sec  0.282 ms    0/  892 (0%)
[  4]  0.0-10.0 sec  12.5 MBytes  10.0 Mbits/sec  0.243 ms    1/ 8922 (0.011%)

node1> iperf -c node2 -u -b 10m
------------------------------------------------------------
Client connecting to node2, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 60.0 KByte (default)
------------------------------------------------------------
[  3] local <IP Addr node1> port 9726 connected with <IP Addr node2> port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  12.5 MBytes  10.0 Mbits/sec
[  3] Sent 8922 datagrams
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29

请注意,当使用较大的 32 KB 数据报时,由于数据报重组而导致的抖动较高,每个数据报拆分为 23 个 1500 字节的数据包。 此处看到的较高数据报丢失可能是由于流量的突发性,即 23 个背靠背数据包,然后是长数据包 暂停,而不是均匀分布的单个数据包。

node2> iperf -s -u -l 32k -w 128k -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Receiving 32768 byte datagrams
UDP buffer size:  128 KByte
------------------------------------------------------------
[  3] local <IP Addr node2> port 5001 connected with <IP Addr node1> port 11303
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec   1.3 MBytes  10.0 Mbits/sec  0.430 ms    0/   41 (0%)
[  3]  1.0- 2.0 sec   1.1 MBytes   8.5 Mbits/sec  5.996 ms    6/   40 (15%)
[  3]  2.0- 3.0 sec   1.2 MBytes   9.7 Mbits/sec  0.796 ms    1/   40 (2.5%)
[  3]  3.0- 4.0 sec   1.2 MBytes  10.0 Mbits/sec  0.403 ms    0/   40 (0%)
[  3]  4.0- 5.0 sec   1.2 MBytes  10.0 Mbits/sec  0.448 ms    0/   40 (0%)
[  3]  5.0- 6.0 sec   1.2 MBytes  10.0 Mbits/sec  0.464 ms    0/   40 (0%)
[  3]  6.0- 7.0 sec   1.2 MBytes  10.0 Mbits/sec  0.442 ms    0/   40 (0%)
[  3]  7.0- 8.0 sec   1.2 MBytes  10.0 Mbits/sec  0.342 ms    0/   40 (0%)
[  3]  8.0- 9.0 sec   1.2 MBytes  10.0 Mbits/sec  0.431 ms    0/   40 (0%)
[  3]  9.0-10.0 sec   1.2 MBytes  10.0 Mbits/sec  0.407 ms    0/   40 (0%)
[  3]  0.0-10.0 sec  12.3 MBytes   9.8 Mbits/sec  0.407 ms    7/  401 (1.7%)

node1> iperf -c node2 -b 10m -l 32k -w 128k
------------------------------------------------------------
Client connecting to node2, UDP port 5001
Sending 32768 byte datagrams
UDP buffer size:  128 KByte
------------------------------------------------------------
[  3] local <IP Addr node2> port 11303 connected with <IP Addr node1> port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  12.5 MBytes  10.0 Mbits/sec
[  3] Sent 401 datagrams

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

组 播

要测试多播,请运行多个服务器,并设置了 bind 选项 (-B, --bind) 到组播组地址。运行客户端,连接到多播 组地址并根据需要设置 TTL(-T、–ttl)。与普通的 TCP 和 UDP测试后,客户端可以启动组播服务器。在这种情况下, 在服务器启动之前发送的数据报在第一个周期中显示为丢失 报告(下面有 61 个关于 ARNO 的数据报)。

node5> iperf -c 224.0.67.67 -u --ttl 5 -t 5
------------------------------------------------------------
Client connecting to 224.0.67.67, UDP port 5001
Sending 1470 byte datagrams
Setting multicast TTL to 5
UDP buffer size: 32.0 KByte (default)
------------------------------------------------------------
[  3] local <IP Addr node5> port 1025 connected with 224.0.67.67 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec   642 KBytes   1.0 Mbits/sec
[  3] Sent 447 datagrams

node5> iperf -s -u -B 224.0.67.67 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 224.0.67.67
Joining multicast group  224.0.67.67
Receiving 1470 byte datagrams
UDP buffer size: 32.0 KByte (default)
------------------------------------------------------------
[  3] local 224.0.67.67 port 5001 connected with <IP Addr node5> port 1025
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec   131 KBytes   1.0 Mbits/sec  0.007 ms    0/   91 (0%)
[  3]  1.0- 2.0 sec   128 KBytes   1.0 Mbits/sec  0.008 ms    0/   89 (0%)
[  3]  2.0- 3.0 sec   128 KBytes   1.0 Mbits/sec  0.010 ms    0/   89 (0%)
[  3]  3.0- 4.0 sec   128 KBytes   1.0 Mbits/sec  0.013 ms    0/   89 (0%)
[  3]  4.0- 5.0 sec   128 KBytes   1.0 Mbits/sec  0.008 ms    0/   89 (0%)
[  3]  0.0- 5.0 sec   642 KBytes   1.0 Mbits/sec  0.008 ms    0/  447 (0%)

node6> iperf -s -u -B 224.0.67.67 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 224.0.67.67
Joining multicast group  224.0.67.67
Receiving 1470 byte datagrams
UDP buffer size: 60.0 KByte (default)
------------------------------------------------------------
[  3] local 224.0.67.67 port 5001 connected with <IP Addr node5> port 1025
[ ID] Interval       Transfer     Bandwidth       Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec   129 KBytes   1.0 Mbits/sec  0.778 ms   61/  151 (40%)
[  3]  1.0- 2.0 sec   128 KBytes   1.0 Mbits/sec  0.236 ms    0/   89 (0%)
[  3]  2.0- 3.0 sec   128 KBytes   1.0 Mbits/sec  0.264 ms    0/   89 (0%)
[  3]  3.0- 4.0 sec   128 KBytes   1.0 Mbits/sec  0.248 ms    0/   89 (0%)
[  3]  0.0- 4.3 sec   554 KBytes   1.0 Mbits/sec  0.298 ms   61/  447 (14%)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44

如上所述启动多个客户端或服务器,将数据发送到同一组播服务器。 (如果有多个服务器侦听组播地址,则每个服务器都将获取数据)

IPv6 模式

使用“ifconfig”命令获取节点的 IPv6 地址。
使用 -V 选项指示您正在使用 IPv6 地址 请注意,我们还需要显式绑定服务器地址。

服务端:
$ iperf -s -V

客户端:
$ iperf -c <服务器IPv6地址> -V>
  • 1
  • 2
  • 3
  • 4
  • 5

注意:iPerf 版本 1.6.2 和 eariler 需要显式绑定 IPv6 地址 替换为 -B 选项。

使用代表性流测量带宽

使用 -F-I 选项。如果要测试网络的性能 对于压缩/未压缩的流,只需创建具有代表性的流和 使用 -F 选项对其进行测试。这通常是由于链路层造成的 压缩数据。
-F 选项用于文件输入。
-I 选项用于来自 stdin 的输入。

例如,

客户端:$ iperf -c <服务器地址> -F <文件名>

客户端:$ iperf -c <服务器地址> -I
  • 1
  • 2
  • 3

将服务器作为守护程序运行

使用 -D 命令行选项将服务器作为守护程序运行。重定向 输出到文件。
例如 iperf -s -D > iperflog。这将使 iPerf 服务器运行 作为守护程序,服务器消息将记录在文件 iperfLog 中。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/酷酷是懒虫/article/detail/856560
推荐阅读
  

闽ICP备14008679号