iperf3 使用

iperf 分client 和 server算法

server:   iperf3 -s -p 5000 -i 1 json

client: iperf3 -c 192.168.31.11 -p 5000 服務器

Server or Client:
-p, --port # server port to listen on/connect to   端口
-f, --format [kmgKMG] format to report: Kbits, Mbits, KBytes, MBytes 格式化帶寬數輸出
-i, --interval # seconds between periodic bandwidth reports  設置每次報告之間的時間間隔,單位爲秒。若是設置爲非零值,就會按照此時間間隔輸出測試報告。默認值爲零。
-F, --file name xmit/recv the specified file 
-A, --affinity n/n,m set CPU affinity
-B, --bind <host> bind to a specific interface 主機綁定指定接口
-V, --verbose more detailed output 更詳細的輸出
-J, --json output in JSON format  輸出JSON格式
--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  將服務器做爲守護進程運行
-I, --pidfile file write PID file         寫PID文件
-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而不是TCP
-b, --bandwidth #[KMG][/#] target bandwidth in bits/sec (0 for unlimited)   目標帶寬(比特/秒)
(default 1 Mbit/sec for UDP, unlimited for TCP)    UDP默認爲1 Mbit/秒,TCP沒有限制
(optional slash and packet count for burst mode)
-t, --time # time in seconds to transmit for (default 10 secs)   傳輸時間(默認爲10秒)
-n, --bytes #[KMG] number of bytes to transmit (instead of -t)   要傳輸的字節數(而不是-t)
-k, --blockcount #[KMG] number of blocks (packets) to transmit (instead of -t or -n)  要傳輸的塊(包)數量(而不是-t或-n)
-l, --len #[KMG] length of buffer to read or write  讀取或寫入緩衝區的長度
(default 128 KB for TCP, 8 KB for UDP)  TCP默認爲128 KB, UDP默認爲8 KB
--cport <port> bind to a specific client port (TCP and UDP, default: ephemeral port)   綁定到特定的客戶端端口(TCP和UDP,默認:臨時端口)
-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  設置窗口大小/套接字緩衝區大小
-C, --congestion <algo> set TCP congestion control algorithm (Linux and FreeBSD only)  設置TCP擁塞控制算法(只支持Linux和FreeBSD)
-M, --set-mss # set TCP/SCTP maximum segment size (MTU - 40 bytes)   設置TCP/SCTP最大段大小(MTU - 40字節)
-N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm  設置TCP/SCTP沒有延遲,禁用Nagle的算法
-4, --version4 only use IPv4
-6, --version6 only use IPv6
-S, --tos N set the IP 'type of service'  設置IP「服務類型」
-L, --flowlabel N set the IPv6 flow label (only supported on Linux)   設置IPv6流標籤(只支持Linux)
-Z, --zerocopy use a 'zero copy' method of sending data   使用「零拷貝」方法發送數據
-O, --omit N omit the first n seconds  省略前N秒
-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   在UDP測試包中使用64位計數器
--no-fq-socket-pacing disable fair-queuing based socket pacing
(Linux only)socket

相關文章
相關標籤/搜索