The JSON output reports total bytes received to 0 and total bitrate to 0.
The default output reports the total bitrate and bytes received correctly.
{
"start": {
"connected": [{
"socket": 6,
"local_host": "192.168.0.4",
"local_port": 5201,
"remote_host": "192.168.2.3",
"remote_port": 50720
}],
"version": "iperf 3.5",
"system_info": "Linux labo-VirtualBox 4.13.0-45-generic #50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018 x86_64",
"timestamp": {
"time": "Fri, 15 Jun 2018 13:49:02 GMT",
"timesecs": 1529070542
},
"accepted_connection": {
"host": "192.168.2.3",
"port": 53250
},
"cookie": "wal54elil5zyamwx2kjwfbiv2ye4inht4aef",
"sock_bufsize": 0,
"sndbuf_actual": 212992,
"rcvbuf_actual": 212992,
"test_start": {
"protocol": "UDP",
"num_streams": 1,
"blksize": 1448,
"omit": 0,
"duration": 10,
"bytes": 0,
"blocks": 0,
"reverse": 0,
"tos": 0
}
},
"intervals": [{
"streams": [{
"socket": 6,
"start": 0,
"end": 1.0005419254302979,
"seconds": 1.0005419254302979,
"bytes": 56472,
"bits_per_second": 451531.30370394728,
"jitter_ms": 5.4631684203400441,
"lost_packets": 0,
"packets": 39,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 0,
"end": 1.0005419254302979,
"seconds": 1.0005419254302979,
"bytes": 56472,
"bits_per_second": 451531.30370394728,
"jitter_ms": 5.4631684203400441,
"lost_packets": 0,
"packets": 39,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 1.0005419254302979,
"end": 2.0001649856567383,
"seconds": 0.99962306022644043,
"bytes": 131768,
"bits_per_second": 1054541.4986337041,
"jitter_ms": 1.6919598513460861,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 1.0005419254302979,
"end": 2.0001649856567383,
"seconds": 0.99962306022644043,
"bytes": 131768,
"bits_per_second": 1054541.4986337041,
"jitter_ms": 1.6919598513460861,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 2.0001649856567383,
"end": 3.000032901763916,
"seconds": 0.99986791610717773,
"bytes": 130320,
"bits_per_second": 1042697.7235743667,
"jitter_ms": 1.5736765527118337,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 2.0001649856567383,
"end": 3.000032901763916,
"seconds": 0.99986791610717773,
"bytes": 130320,
"bits_per_second": 1042697.7235743667,
"jitter_ms": 1.5736765527118337,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 3.000032901763916,
"end": 4.0004148483276367,
"seconds": 1.0003819465637207,
"bytes": 130320,
"bits_per_second": 1042161.9498244241,
"jitter_ms": 1.5316822491530364,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 3.000032901763916,
"end": 4.0004148483276367,
"seconds": 1.0003819465637207,
"bytes": 130320,
"bits_per_second": 1042161.9498244241,
"jitter_ms": 1.5316822491530364,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 4.0004148483276367,
"end": 5.0005488395690918,
"seconds": 1.0001339912414551,
"bytes": 130320,
"bits_per_second": 1042420.3248065611,
"jitter_ms": 1.80109779831896,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 4.0004148483276367,
"end": 5.0005488395690918,
"seconds": 1.0001339912414551,
"bytes": 130320,
"bits_per_second": 1042420.3248065611,
"jitter_ms": 1.80109779831896,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 5.0005488395690918,
"end": 6.000154972076416,
"seconds": 0.99960613250732422,
"bytes": 131768,
"bits_per_second": 1054559.3566496815,
"jitter_ms": 1.683127610266788,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 5.0005488395690918,
"end": 6.000154972076416,
"seconds": 0.99960613250732422,
"bytes": 131768,
"bits_per_second": 1054559.3566496815,
"jitter_ms": 1.683127610266788,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 6.000154972076416,
"end": 7.0003039836883545,
"seconds": 1.0001490116119385,
"bytes": 131768,
"bits_per_second": 1053986.9437065562,
"jitter_ms": 1.6203054576171958,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 6.000154972076416,
"end": 7.0003039836883545,
"seconds": 1.0001490116119385,
"bytes": 131768,
"bits_per_second": 1053986.9437065562,
"jitter_ms": 1.6203054576171958,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 7.0003039836883545,
"end": 8.000424861907959,
"seconds": 1.0001208782196045,
"bytes": 130320,
"bits_per_second": 1042433.9924349393,
"jitter_ms": 1.3385075006647031,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 7.0003039836883545,
"end": 8.000424861907959,
"seconds": 1.0001208782196045,
"bytes": 130320,
"bits_per_second": 1042433.9924349393,
"jitter_ms": 1.3385075006647031,
"lost_packets": 0,
"packets": 90,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 8.000424861907959,
"end": 9.0005559921264648,
"seconds": 1.0001311302185059,
"bytes": 131768,
"bits_per_second": 1054005.7879907144,
"jitter_ms": 2.6760332096776791,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 8.000424861907959,
"end": 9.0005559921264648,
"seconds": 1.0001311302185059,
"bytes": 131768,
"bits_per_second": 1054005.7879907144,
"jitter_ms": 2.6760332096776791,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 9.0005559921264648,
"end": 10.000185012817383,
"seconds": 0.999629020690918,
"bytes": 131768,
"bits_per_second": 1054535.2107438846,
"jitter_ms": 1.4132002938937065,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 9.0005559921264648,
"end": 10.000185012817383,
"seconds": 0.999629020690918,
"bytes": 131768,
"bits_per_second": 1054535.2107438846,
"jitter_ms": 1.4132002938937065,
"lost_packets": 0,
"packets": 91,
"lost_percent": 0,
"omitted": false
}
}, {
"streams": [{
"socket": 6,
"start": 10.000185012817383,
"end": 10.580043792724609,
"seconds": 0.57985877990722656,
"bytes": 73848,
"bits_per_second": 1018841.1738708542,
"jitter_ms": 1.5506041746410271,
"lost_packets": 0,
"packets": 51,
"lost_percent": 0,
"omitted": false
}],
"sum": {
"start": 10.000185012817383,
"end": 10.580043792724609,
"seconds": 0.57985877990722656,
"bytes": 73848,
"bits_per_second": 1018841.1738708542,
"jitter_ms": 1.5506041746410271,
"lost_packets": 0,
"packets": 51,
"lost_percent": 0,
"omitted": false
}
}],
"end": {
"streams": [{
"udp": {
"socket": 6,
"start": 0,
"end": 10.580043792724609,
"seconds": 10.580043792724609,
"bytes": 0,
"bits_per_second": 0,
"jitter_ms": 1.5506041746410271,
"lost_packets": 0,
"packets": 905,
"lost_percent": 0,
"out_of_order": 0
}
}],
"sum": {
"start": 0,
"end": 10.580043792724609,
"seconds": 10.580043792724609,
"bytes": 0,
"bits_per_second": 0,
"jitter_ms": 1.5506041746410271,
"lost_packets": 0,
"packets": 905,
"lost_percent": 0
},
"cpu_utilization_percent": {
"host_total": 0.043347153484469859,
"host_user": 0.0433497330579931,
"host_system": 0,
"remote_total": 0,
"remote_user": 0,
"remote_system": 0
}
}
}
Note that the total bytes received is 0 in the final report whereas it is reported as 130 kB (so around 1 Mb, as expected) in the periodic reports.
Context
Version of iperf3:
iperf 3.5 (cJSON 1.5.2)
Hardware:
VirtualBox VM
Operating system (and distribution, if any):
Ubuntu 18.04
Bug Report
The JSON output reports total bytes received to 0 and total bitrate to 0.
The default output reports the total bitrate and bytes received correctly.
Expected Behavior
The total bytes received should be the sum of the periodic bytes received reports.
The total bitrate should be the total bytes received divided by the duration of the connection.
Actual Behavior
Client command:
Server default output (this is what is expected):
Server JSON output (this is NOT what is expected):
Note that the total bytes received is 0 in the final report whereas it is reported as 130 kB (so around 1 Mb, as expected) in the periodic reports.
Steps to Reproduce
Send UDP data from the client. Output in JSON with the server.
Possible Solution
Set the number of bytes received equal to the sum of the number of bytes received in the periodic reports.
Set the bitrate equal to the number of bytes received divided by the connection duration.