Skip to content

Conversation

@pratikb2805
Copy link
Contributor

@pratikb2805 pratikb2805 commented Oct 10, 2025

Description of code change

Adding tcp restransmits(--show-tcp-retrans) metrics to xml log output(-x) and json log output(-j)
The metrics include

  • retrans segs
  • retrans_segments/sec
  • lost_retrans/sec
  • syn_retrans/sec
  • fast_retrans/sec
  • forward_retrans/sec
  • slowStart_retrans/sec
  • retrans_fail/sec

List of Test cases tested

  1. Tested with -x and --show-tcp-retrans
    Output:
	...
	<bufferLen>0</bufferLen>
	<tcp_retransmits metric="retrans_segs">1119</tcp_retransmits>
	<tcp_retransmits metric="retrans_segments_per_sec">109.00</tcp_retransmits>
	<tcp_retransmits metric="lost_retrans_per_sec">1.07</tcp_retransmits>
	<tcp_retransmits metric="syn_retrans_per_sec">0.00</tcp_retransmits>
	<tcp_retransmits metric="fast_retrans_per_sec">36.82</tcp_retransmits>
	<tcp_retransmits metric="forward_retrans_per_sec">0.00</tcp_retransmits>
	<tcp_retransmits metric="slowStart_retrans_per_sec">13.34</tcp_retransmits>
	<tcp_retransmits metric="retrans_fail_per_sec">0.00</tcp_retransmits>
	<cpu_cores metric="cpu cores">12</cpu_cores>
	<cpu_speed metric="MHz">2295.702</cpu_speed>
	...
  1. Tested with -x and without --show-tcp-retrans
	...
	<bufferCount>0</bufferCount>
	<bufferLen>0</bufferLen>
	<cpu_cores metric="cpu cores">12</cpu_cores>
	<cpu_speed metric="MHz">2295.702</cpu_speed>
	...
  1. Tested without either of -x and --show-tcp-retrans
17:26:21 INFO: test duration    :10.59 seconds
17:26:21 INFO: total bytes      :94057136128
17:26:21 INFO:   throughput     :71.08Gbps
17:26:21 INFO:   retrans segs   :1357
17:26:21 INFO: cpu cores        :12
17:26:21 INFO:   cpu speed      :2295.702MHz
17:26:21 INFO:   user           :1.51%
17:26:21 INFO:   system         :71.20%
17:26:21 INFO:   idle           :0.00%
17:26:21 INFO:   iowait         :0.00%
17:26:21 INFO:   softirq        :27.29%
17:26:21 INFO:   cycles/byte    :3.10
17:26:21 INFO: cpu busy (all)   :922.73%
  1. Tested with -j and --show-tcp-retrans
        ...
        "io" : "0",
        "tcp_retransmits" : [
            {
                "metric" : "retrans_segs",
                "value" : "237"
            },
            {
                "metric" : "retrans_segments_per_sec",
                "value" : "3.95"
            },
            {
                "metric" : "lost_retrans_per_sec",
                "value" : "0.18"
            },
            {
                "metric" : "syn_retrans_per_sec",
                "value" : "0.07"
            },
            {
                "metric" : "fast_retrans_per_sec",
                "value" : "3.72"
            },
            {
                "metric" : "forward_retrans_per_sec",
                "value" : "0.00"
            },
            {
                "metric" : "slowStart_retrans_per_sec",
                "value" : "0.00"
            },
            {
                "metric" : "retrans_fail_per_sec",
                "value" : "0.00"
            }
        ],
        "os" : "Linux IDCREDBOX1000 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux"
        ...
  1. Without --show-tcp-retrans and with -j
        ...
        "io" : "0",
        "os" : "Linux IDCREDBOX1000 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux"
        ...

@pratikb2805 pratikb2805 marked this pull request as ready for review October 10, 2025 11:45
Copy link

@kalvdans kalvdans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me to add xml output of (machine-wide?) TCP statistics.

@pratikb2805
Copy link
Contributor Author

pratikb2805 commented Oct 15, 2025 via email

@simonxiaoss simonxiaoss merged commit e0af8fd into microsoft:master Oct 16, 2025
6 of 9 checks passed
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

Successfully merging this pull request may close these issues.

5 participants