> iperf -c 127.0.0.1 -t 2 -i 0.5 -f m | tee log1
------------------------------------------------------------
Client connecting to 127.0.0.1, TCP port 5001
TCP window size: 2.50 MByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 42200 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 0.5 sec 449 MBytes 7537 Mbits/sec
[ 3] 0.5- 1.0 sec 578 MBytes 9697 Mbits/sec
[ 3] 1.0- 1.5 sec 575 MBytes 9649 Mbits/sec
[ 3] 1.5- 2.0 sec 587 MBytes 9848 Mbits/sec
[ 3] 0.0- 2.0 sec 2190 MBytes 9183 Mbits/sec
> awk -F'[ -]+' '/sec/{print $3"-"$4" "$8}' log1
0.0-0.5 7537
0.5-1.0 9697
1.0-1.5 9649
1.5-2.0 9848
0.0-2.0 9183
> iperf -c 127.0.0.1 -t 2 -i 0.5 -f m |\
> awk -Wi -F'[ -]+' '/sec/{print $3"-"$4" "$8}'
# interactive results follow #
> iperf -c 127.0.0.1 -t 2 -i 0.5 -xc -yc | tee log2
20180515044354,,,,,3,0.0-0.5,536084480,8577351680
20180515044355,,,,,3,0.5-1.0,602537984,9640607744
20180515044355,,,,,3,1.0-1.5,621805568,9948889088
20180515044356,,,,,3,1.5-2.0,620888064,9934209024
20180515044356,,,,,3,0.0-2.0,2381447168,9524874284
> awk -F, '{print $7" "$9/1e6}' log2
0.0-0.5 8577.35
0.5-1.0 9640.61
1.0-1.5 9948.89
1.5-2.0 9934.21
0.0-2.0 9524.87
> iperf -c 127.0.0.1 -t 2 -i 0.5 -xc -yc | awk -Wi -F, '{print $7" "$9/1e6}'
# interactive results follow #