iperf 网络链路参数
- 看 srt 的 大神文档,看到大神使用的网络链路探测工具是iperf
- 一直向找一个这样的工具
- web gui
- qt gui
- sdn
- 发现一个iperf的qt 工程 这里
iperf
iPerf - The ultimate speed test tool for TCP, UDP and SCTP
Test the limits of your network + Internet neutrality test
zhangbin@pb6a80114 ~/tet/webrtc_build ./iperf3 -s -u -i 1 -p 12345
iperf3: parameter error - some option you are trying to set is client only
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
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
-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
-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
-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)
-n, --bytes #[KMG] number of bytes to transmit (instead of -t)
-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)
--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
-M, --set-mss # set TCP/SCTP maximum segment size (MTU - 40 bytes)
-N, --no-delay set TCP/SCTP no delay, disabling Nagle's Algorithm
-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
mac
- 下了mac 上的 这里
- iPerf 3.1.3 (8 jun 2016 - 50.0 KiB) by VincentAlex
- 服务器端
- 间隔 传输 带宽(Mbits/秒)jitter(15微秒)丢包率
✘ zhangbin@pb6a80114 ~/tet/webrtc_build ./iperf3 -s -i 1 -p 12345
-----------------------------------------------------------
Server listening on 12345
-----------------------------------------------------------
Accepted connection from 127.0.0.1, port 59642
[ 5] local 127.0.0.1 port 12345 connected to 127.0.0.1 port 51227
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 5] 0.00-1.00 sec 608 KBytes 4.97 Mbits/sec 0.015 ms 0/76 (0%)
[ 5] 1.00-2.00 sec 672 KBytes 5.51 Mbits/sec 0.014 ms 0/84 (0%)
[ 5] 2.00-3.01 sec 672 KBytes 5.48 Mbits/sec 0.015 ms 0/84 (0%)
[ 5] 3.01-4.01 sec 672 KBytes 5.50 Mbits/sec 0.015 ms 0/84 (0%)
[ 5] 4.01-5.01 sec 672 KBytes 5.51 Mbits/sec 0.018 ms 0/84 (0%)
[ 5] 5.01-6.01 sec 672 KBytes 5.51 Mbits/sec 0.018 ms 0/84 (0%)
[ 5] 6.01-7.00 sec 672 KBytes 5.51 Mbits/sec 0.018 ms 0/84 (0%)
[ 5] 7.00-8.01 sec 672 KBytes 5.50 Mbits/sec 0.016 ms 0/84 (0%)
[ 5] 8.01-9.01 sec 672 KBytes 5.51 Mbits/sec 0.015 ms 0/84 (0%)
[ 5] 9.01-10.01 sec 672 KBytes 5.51 Mbits/sec 0.015 ms 0/84 (0%)
[ 5] 10.01-10.01 sec 8.00 KBytes 449 Mbits/sec 0.016 ms 0/1 (0%)
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 5] 0.00-10.01 sec 0.00 Bytes 0.00 bits/sec 0.016 ms 0/833 (0%)
-----------------------------------------------------------
Server listening on 12345
-----------------------------------------------------------
- 客户端
zhangbin@pb6a80114 ~/tet/webrtc_build ./iperf3 -c 127.0.0.1 -u -b 5.5m -i 1 -p 12345
Connecting to host 127.0.0.1, port 12345
[ 4] local 127.0.0.1 port 51227 connected to 127.0.0.1 port 12345
[ ID] Interval Transfer Bandwidth Total Datagrams
[ 4] 0.00-1.00 sec 616 KBytes 5.04 Mbits/sec 77
[ 4] 1.00-2.00 sec 672 KBytes 5.51 Mbits/sec 84
[ 4] 2.00-3.01 sec 672 KBytes 5.48 Mbits/sec 84
[ 4] 3.01-4.01 sec 672 KBytes 5.50 Mbits/sec 84
[ 4] 4.01-5.01 sec 672 KBytes 5.51 Mbits/sec 84
[ 4] 5.01-6.01 sec 672 KBytes 5.51 Mbits/sec 84
[ 4] 6.01-7.00 sec 672 KBytes 5.51 Mbits/sec 84
[ 4] 7.00-8.01 sec 672 KBytes 5.50 Mbits/sec 84
[ 4] 8.01-9.01 sec 672 KBytes 5.51 Mbits/sec 84
[ 4] 9.01-10.01 sec 672 KBytes 5.50 Mbits/sec 84
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-10.01 sec 6.51 MBytes 5.46 Mbits/sec 0.016 ms 0/833 (0%)
[ 4] Sent 833 datagrams
iperf Done.