iPerf3 命令通用选项

简介: iPerf3 命令通用选项

iPerf3 命令通用选项

同时适用于客户端与服务器端

命令选项 命令描述
-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.
–cport n Option to specify the client-side port. (new in iPerf 3.1)
-f, --format [kmgKMG] 格式化带宽数输出。支持的格式有:

‘k’ = Kbits/sec ‘K’ = KBytes/sec

‘m’ = Mbits/sec ‘M’ = MBytes/sec

‘g’ = Gbits/sec ‘G’ = GBytes/sec

自适应格式是kilo-和mega-二者之一。除了带宽之外的字段都输出为字节,除非指定输出的格式,默认的参数是a。

注意:在计算字节byte时,Kilo = 1024, Mega = 1024^2,Giga = 1024^3。通常,在网络中,Kilo = 1000, Mega = 1000^2, and Giga = 1000^3,所以,Iperf也按此来计算比特(位)。如果这些困扰了你,那么请使用-f b参数,然后亲自计算一下。
-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 zero.
- 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.
-A, --affinity n/n,m-F 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).
- B , --bind host 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.
-V, --verbose give more detailed output
-J, --json output in JSON format
–logfile file send output to a log file. (new in iPerf 3.1)
–d, --debug emit debugging output. Primarily (perhaps exclusively) of use to developers.
-v, --version Show version information and quit.
-h , --help Show a help synopsis and quit.

iPerf3 服务端命令特有选项

命令选项 命令描述
-s, --server Run iPerf in server mode. (This will only allow one iperf connection at a time)
-D, --daemon Run the server in background as a daemon.
- I, --pidfilefile write a file with the process ID, most useful when running as a daemon.

iPerf3 客户端命令特有选项

命令选项 命令描述
-c, --client host Run iPerf in client mode, connecting to an iPerf server running on host .
–sctp Use SCTP rather than TCP (Linux, FreeBSD and Solaris). (new in iPerf 3.1)
-u , --udp Use UDP rather than TCP. See also the -b option.
-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.
-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.
-n , --num n[KM] 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.
-k, --blockcount n[KM] The number of blocks (packets) to transmit. (instead of -t or -n) See also the -t, - l and -n options.
-l, --length n[KM] 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.
- P, --parallel n The number of simultaneous connections to make to the server. Default is 1.
- R, --reverse Run in reverse mode (server sends, client receives).
-w , --window n[KM] 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)
- 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).
- N, --no-delay Set the TCP no delay option, disabling Nagle’s algorithm. Normally this is only disabled for interactive applications like telnet.
-4 , --version4 only use IPv4.
-6 , --version4 only use 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
-O, --omit n specified in RFC 1349 are:Omit the first n seconds of the test, to skip past the TCP TCP slowstart period.


常用参数

-f [kmKM] 分别表示以Kbits, Mbits, KBytes, MBytes显示报告,默认以Mbits为单位

eg:iperf -c 222.35.11.23 -f K

-i sec 以秒为单位显示报告间隔

eg:iperf -c 222.35.11.23 -i 2

-l 缓冲区大小,默认是8KB

eg:iperf -c 222.35.11.23 -l 16

-m 显示tcp最大mtu值

-o 将报告和错误信息输出到文件

eg:iperf -c 222.35.11.23 -o ciperflog.txt

-p 指定服务器端使用的端口或客户端所连接的端口

eg:iperf -s -p 9999;iperf -c 222.35.11.23 -p 9999

-u 使用udp协议

-w 指定TCP窗口大小,默认是8KB

-B 绑定一个主机地址或接口(当主机有多个地址或接口时使用该参数)

-C 兼容旧版本(当server端和client端版本不一样时使用)

-M 设定TCP数据包的最大mtu值

-N 设定TCP不延时

-V 传输ipv6数据包

相关文章
|
Java API 开发工具
得物开放平台接入得物SDK
得物开放平台、得物SDK、得物PUSH、获取订单、虚拟发货
2017 1
 得物开放平台接入得物SDK
|
自然语言处理 数据格式
【DSW Gallery】基于ModelScope的中文GPT-3模型(1.3B)的微调训练
本文基于ModelScope,以GPT-3(1.3B)为例介绍如何使用ModelScope-GPT3进行续写训练与输入输出形式的训练,训练方式不需要额外指定,训练数据集仅包含 src_txt 时会进行续写训练,同时包含 src_txt 和 tgt_txt 时会进行输入输出形式的训练。
【DSW Gallery】基于ModelScope的中文GPT-3模型(1.3B)的微调训练
|
7月前
|
运维 监控 网络协议
一线网络工程师必备:用 iperf3 快速测试 UDP 带宽的实战指南
本文面向企业网络工程师,详解如何使用 iperf3 进行 UDP 打流测试:涵盖服务端/客户端命令、关键参数(-u、-b、-t 等)、8 大核心性能指标(带宽、丢包率、延迟、抖动、RTT 等)解读及实战示例,助力精准排查网络性能瓶颈。(239字)
|
Linux 网络安全 开发工具
在Linux下配置gitee与Github的远程仓库
注意,git push后,是输入你的账号与密码。这个步骤可以通过特殊设置省去,但是一开始还是不要太省。
709 0
|
前端开发 数据可视化 API
Python实现智能家居设备的统一控制平台
【10月更文挑战第6天】 Python实现智能家居设备的统一控制平台
1049 11
|
Java Linux Shell
centos7内网离线安装face_recognition、python、pip、CMake、dlib,离线升级gcc/切换gcc,文末有face_recognition的docker版本
公司项目需要人脸识别,本来app自带人脸识别,结果api支持的设备试了一圈就一个同事的华为Mate40Pro可以,所以使用无望。接着找了一下免费的java离线人脸识别sdk,发现虹软的确实简单好用,一会就在linux上弄好并测试通过了,然而在准备集成进去开写代码时,不小心看到了一眼首次激活需联网,后续方可离线使用,好吧,我们内网机器首次都不可能的,接着看了下离线激活方法,首先需要企业认证,这一步我们肯定没法做的,毕竟不是之前的小公司了,营业执照啥的随便给我肯定不行,直接放弃了。后来在同事推荐下看了下face_recognition这个项目,之前基本没用过python,于是有了漫长的踩坑之旅。
1845 1
|
算法
重磅!2025年中科院预警期刊名单正式发布!
中国科学院文献情报中心定期发布《国际期刊预警名单》,旨在防范学术不端和不当出版行为。2025年最新名单聚焦两大问题:一是引用操纵、论文工厂等破坏科研生态的行为;二是中国作者占比过高或APC费用不合理,影响学术成果国际化传播。自2022年起,预警名单调整至年初发布,便于科研人员规划投稿。名单结合定量数据与专家评估,动态反映期刊风险。被列预警期刊可能影响职称评审及科研经费认可,建议优先选择中科院分区表推荐期刊,警惕快速代发陷阱,并关注期刊官网声明。未来,强化学术自律和技术工具应用将助力科研规范化,推动中国学术走向全球。
1701 0
|
网络协议
iperf3的常用命令样例
iperf3是一个用于测量网络带宽的工具,以下是一些常用的iperf3命令样例: 1. 在服务器模式下启动iperf3: ``` iperf3 -s ``` 2. 在客户端通过TCP连接测试带宽: ``` iperf3 -c <服务器IP地址> ``` 3. 在客户端通过UDP连接测试带宽: ``` iperf3 -c <服务器IP地址> -u ``` 4. 指定连接端口号: ``` iperf3 -c <服务器IP地址> -p <端口号> ``` 5. 设置测试时间: ``` iperf3 -c <
3293 0
|
算法 安全 数据安全/隐私保护
加密和解密数据
【10月更文挑战第6天】加密和解密数据
536 2
|
运维 程序员 项目管理
一份【软件工程】的学习指南已到达,请注意查收!!
该文章提供了一份软件工程的学习指南,包括学习软件工程的重要性、基本内容概览以及建议的学习方法和路径。
一份【软件工程】的学习指南已到达,请注意查收!!