Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json-stream: UDP misleading / bad reporting on end packet #1784

Open
rytiszig opened this issue Oct 14, 2024 · 3 comments
Open

json-stream: UDP misleading / bad reporting on end packet #1784

rytiszig opened this issue Oct 14, 2024 · 3 comments

Comments

@rytiszig
Copy link

Iper Version

iperf 3.17.1 (cJSON 1.7.15)

Problem

Different key names / different keys in end json. In tcp i see only sum_received / sum_sent. In udp I also see sum key with is not clear for what purpose. Also sender information is mixed in UDP mode.

TCP keys

$ iperf3 -c spc1  -t1  --json-stream | jq 'select(.event=="end")|.data|keys'
[
  "cpu_utilization_percent",
  "receiver_tcp_congestion",
  "sender_tcp_congestion",
  "streams",
  "sum_received",
  "sum_sent"
]

UDP keys

iperf3 -c spc1  -u -b 2G  -t1  --json-stream | jq 'select(.event=="end")|.data|keys'
[
  "cpu_utilization_percent",
  "streams",
  "sum",
  "sum_received",
  "sum_sent"
]

TCP sender

iperf3 -c spc1  -t1   --json-stream | jq 'select(.event=="end") | .data | {sum: {sender: .sum.sender, bits_per_second: .sum.bits_per_second}, sum_received: {sender: .sum_received.sender, bits_per_second: .sum_received.bits_per_second}, sum_sent: {sender: .sum_sent.sender, bits_per_second: .sum_sent.bits_per_second}}'
{
  "sum": {
    "sender": null,
    "bits_per_second": null
  },
  "sum_received": {
    "sender": true,
    "bits_per_second": 1269823821.06185
  },
  "sum_sent": {
    "sender": true,
    "bits_per_second": 1296456879.8836708
  }
}

UDP sender

iperf3 -c spc1  -t1 -u -b 2G  --json-stream | jq 'select(.event=="end") | .data | {sum: {sender: .sum.sender, bits_per_second: .sum.bits_per_second}, sum_received: {sender: .sum_received.sender, bits_per_second: .sum_received.bits_per_second}, sum_sent: {sender: .sum_sent.sender, bits_per_second: .sum_sent.bits_per_second}}'
{
  "sum": {
    "sender": true,
    "bits_per_second": 1997990120.9538348
  },
  "sum_received": {
    "sender": false,
    "bits_per_second": 1671880802.3470123
  },
  "sum_sent": {
    "sender": true,
    "bits_per_second": 1997990120.9538348
  }
}
@swlars
Copy link
Contributor

swlars commented Oct 14, 2024

Thank you for the bug report! It does look like "sum" should be removed from UDP, as it was in TCP. We're a little unclear on what you meant by "sender information is mixed in UDP mode." Do you mean the number of bits per second is reported incorrectly for sender and receiver?

@rytiszig
Copy link
Author

rytiszig commented Oct 14, 2024

No i meant direction (.sender flag) was incorrect in UDP case.
Traffic was generated to spc1 in both cases (no -R flag). So .sender flags should be true like in TCP case.

@rytiszig
Copy link
Author

Here more examples hope this will make more clear. In TCP direction (.sender) reports correct state. However in UDP only in "sum" object report correct state.

TCP

iperf3 -c spc1 -t1 --json-stream | jq 'select(.event=="end") | .data | {sum: {sender: .sum.sender, bits_per_second: .sum.bits_per_second}, sum_received: {sender: .sum_received.sender, bits_per_second: .sum_received.bits_per_second}, sum_sent: {sender: .sum_sent.sender, bits_per_second: .sum_sent.bits_per_second}}'
{
  "sum": {
    "sender": null,
    "bits_per_second": null
  },
  "sum_received": {
    "sender": true,
    "bits_per_second": 1439884257.097405
  },
  "sum_sent": {
    "sender": true,
    "bits_per_second": 1470496286.6561515
  }
}

TCP Reversed

iperf3 -c spc1 -t1 -R --json-stream | jq 'select(.event=="end") | .data | {sum: {sender: .sum.sender, bits_per_second: .sum.bits_per_second}, sum_received: {sender: .sum_received.sender, bits_per_second: .sum_received.bits_per_second}, sum_sent: {sender: .sum_sent.sender, bits_per_second: .sum_sent.bits_per_second}}'
{
  "sum": {
    "sender": null,
    "bits_per_second": null
  },
  "sum_received": {
    "sender": false,
    "bits_per_second": 1514642947.6901867
  },
  "sum_sent": {
    "sender": false,
    "bits_per_second": 1524969078.3049507
  }
}

UDP

iperf3 -c spc1  -t1 -u -b 2G  --json-stream | jq 'select(.event=="end") | .data | {sum: {sender: .sum.sender, bits_per_second: .sum.bits_per_second}, sum_received: {sender: .sum_received.sender, bits_per_second: .sum_received.bits_per_second}, sum_sent: {sender: .sum_sent.sender, bits_per_second: .sum_sent.bits_per_second}}'
{
  "sum": {
    "sender": true,
    "bits_per_second": 1998962266.3580604
  },
  "sum_received": {
    "sender": false,
    "bits_per_second": 1616139545.6026447
  },
  "sum_sent": {
    "sender": true,
    "bits_per_second": 1998962266.3580604
  }
}

UDP Reversed

iperf3 -c spc1 -t1 -u -b 2G -R --json-stream | jq 'select(.event=="end") | .data | {sum: {sender: .sum.sender, bits_per_second: .sum.bits_per_second}, sum_received: {sender: .sum_received.sender, bits_per_second: .sum_received.bits_per_second}, sum_sent: {sender: .sum_sent.sender, bits_per_second: .sum_sent.bits_per_second}}'
{
  "sum": {
    "sender": false,
    "bits_per_second": 1999547778.939142
  },
  "sum_received": {
    "sender": false,
    "bits_per_second": 1704701869.0683227
  },
  "sum_sent": {
    "sender": true,
    "bits_per_second": 1999547778.939142
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants