technical:network:iperf
iperf3
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
Server or Client:
-p, --port # server port to listen on/connect to
指定服務器端使用的端口或客戶端所連接的端口eg:iperf -s -p 9999;iperf -c 222.35.11.23 -p 9999
-f, --format [kmgKMG] format to report: Kbits, Mbits, KBytes, MBytes
分別表示以Kbits, Mbits, KBytes, MBytes顯示報告,預設以Mbits為單位
eg:iperf -c 222.35.11.23 -f K
-i, --interval # seconds between periodic bandwidth reports
以秒為單位顯示報告間隔,
eg:iperf -c 222.35.11.23 -i 2)
-F, --file name xmit/recv the specified file
-B, --bind <host> bind to a specific interface
綁定一個主機地址或通訊埠(當主機有多個地址或通訊埠時使用該參數)
-V, --verbose more detailed output
-J, --json output in JSON format
--logfile f send output to a log file
-d, --debug emit debugging output
-v, --version show version information and quit
-h, --help show this message and quit
Server specific:
-s, --server run in server mode
-D, --daemon run the server as a daemon
以服務方式運行ipserf,eg:iperf -s -D
-I, --pidfile file write PID file
-1, --one-off handle one client connection then exit
Client specific:
-c, --client <host> run in client mode, connecting to <host>
-u, --udp use UDP rather than TCP
用udp協議
-b, --bandwidth #[KMG][/#] target bandwidth in bits/sec (0 for unlimited)
(default 1 Mbit/sec for UDP, unlimited for TCP)
(optional slash and packet count for burst mode)
-t, --time # time in seconds to transmit for (default 10 secs)
測試時間,預設10秒,eg: iperf -c 222.35.11.23 -t 5
-n, --bytes #[KMG] number of bytes to transmit (instead of -t)
指定傳輸的位元組數,eg: iperf -c 222.35.11.23 -n 100000
-k, --blockcount #[KMG] number of blocks (packets) to transmit (instead of -t or -n)
-l, --len #[KMG] length of buffer to read or write
(default 128 KB for TCP, 8 KB for UDP)
緩衝區大小,預設是8KB,eg:iperf -c 222.35.11.23 -l 16
--cport <port> bind to a specific client port (TCP and UDP, default: ephemeral port)
-P, --parallel # number of parallel client streams to run
-R, --reverse run in reverse mode (server sends, client receives)
-w, --window #[KMG] set window size / socket buffer size
指定TCP窗口大小,預設是8KB
-M, --set-mss # set TCP/SCTP maximum segment size (MTU - 40 bytes)
設定TCP資料封包的最大mtu值
-N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm
設定TCP不延時
-4, --version4 only use IPv4
-6, --version6 only use IPv6
-S, --tos N set the IP 'type of service'
-Z, --zerocopy use a 'zero copy' method of sending data
-O, --omit N omit the first n seconds
-T, --title str prefix every output line with this string
--get-server-output get results from server
--udp-counters-64bit use 64-bit counters in UDP test packets
[KMG] indicates options that support a K/M/G suffix for kilo-, mega-, or giga-
iperf3 homepage at: http://software.es.net/iperf/
Report bugs to: https://github.com/esnet/iperf
technical/network/iperf.txt · 上一次變更: 2020/02/06 11:53 由 127.0.0.1
