我在两个终端之间执行iperf并能够获得如下输出:
2017-01-09 16:43:03: Connecting to host 192.168.234.2, port 5201
2017-01-09 16:43:03: [ 4] local 192.168.234.1 port 36544 connected to 192.168.234.2 port 5201
2017-01-09 16:43:03: [ ID] Interval Transfer Bandwidth Retr Cwnd
2017-01-09 16:43:03: [ 4] 0.00-1.00 sec 553 KBytes 4.53 Mbits/sec 1 29.7 KBytes
2017-01-09 16:43:03: [ 4] 1.00-2.00 sec 499 KBytes 4.09 Mbits/sec 1 26.9 KBytes
2017-01-09 16:43:03: [ 4] 2.00-3.00 sec 515 KBytes 4.22 Mbits/sec 0 32.5 KBytes
2017-01-09 16:43:03: [ 4] 3.00-4.00 sec 508 KBytes 4.16 Mbits/sec 1 31.1 KBytes
2017-01-09 16:43:03: [ 4] 4.00-5.00 sec 496 KBytes 4.07 Mbits/sec 1 26.9 KBytes
2017-01-09 16:43:03: [ 4] 5.00-6.00 sec 515 KBytes 4.22 Mbits/sec 0 33.9 KBytes
2017-01-09 16:43:03: [ 4] 6.00-7.00 sec 513 KBytes 4.21 Mbits/sec 1 31.1 KBytes
2017-01-09 16:43:03: [ 4] 7.00-8.00 sec 495 KBytes 4.05 Mbits/sec 1 28.3 KBytes
2017-01-09 16:43:03: [ 4] 8.00-9.00 sec 501 KBytes 4.10 Mbits/sec 1 32.5 KBytes
2017-01-09 16:43:03: [ 4] 9.00-10.00 sec 513 KBytes 4.20 Mbits/sec 0 32.5 KBytes
2017-01-09 16:43:03: - - - - - - - - - - - - - - - - - - - - - - - - -
2017-01-09 16:43:03: [ ID] Interval Transfer Bandwidth Retr
2017-01-09 16:43:03: [ 4] 0.00-10.00 sec 4.99 MBytes 4.18 Mbits/sec 7 sender
2017-01-09 16:43:03: [ 4] 0.00-10.00 sec 4.97 MBytes 4.17 Mbits/sec receiver
2017-01-09 16:43:03: iperf Done.

现在问题是时间戳一直保持不变。谁能建议我如何每秒更新一次时间戳?
答案 0 :(得分:0)
您必须安装" moreutils"。
sudo apt-get install moreutils
iperf -c [server_ip] -i 1 -u -b 1G -t 5 |的 TS 强>
May 31 10:28:00 ------------------------------------------------------------
May 31 10:28:00 Client connecting to x.x.x.x, UDP port 5001
May 31 10:28:00 Sending 1470 byte datagrams
May 31 10:28:00 UDP buffer size: 208 KByte (default)
May 31 10:28:00 ------------------------------------------------------------
May 31 10:28:00 [ 3] local y.y.y.y port 53225 connected with x.x.x.x port 5001
May 31 10:28:01 [ ID] Interval Transfer Bandwidth
May 31 10:28:01 [ 3] 0.0- 1.0 sec 96.9 MBytes 812 Mbits/sec
May 31 10:28:02 [ 3] 1.0- 2.0 sec 96.9 MBytes 813 Mbits/sec
May 31 10:28:03 [ 3] 2.0- 3.0 sec 96.9 MBytes 813 Mbits/sec
May 31 10:28:04 [ 3] 3.0- 4.0 sec 97.0 MBytes 814 Mbits/sec
May 31 10:28:05 [ 3] 0.0- 5.0 sec 485 MBytes 813 Mbits/sec
May 31 10:28:05 [ 3] Sent 345642 datagrams
May 31 10:28:05 [ 3] Server Report:
May 31 10:28:05 [ 3] 0.0- 5.0 sec 484 MBytes 812 Mbits/sec 0.001 ms 443/345641 (0.13%)