Search code examples
linuxtcp

How to monitor cwnd and ssthresh values for a TCP connection?


I wish to ascertain these values when a packet is sent or received over a socket connection. Is there any existing tool which does this?


Solution

  • I disagree with the answer given by Nemo. Wireshark (as well as dumpcap, tcpdump) are not capable of measuring/logging the cwnd and the ssthresh, as those are not field in the tcp datagrams but are only values that reside inside the kernel as kernel structures. Congestion control data is not transmitted over the wire, only flow control data is.

    To monitor those values, either implement get_info and sample the data periodically, or take a look at the tcp_probe kernel module (see: http://www.linuxfoundation.org/collaborate/workgroups/networking/tcptesting)

    UPDATE: I've created a patched version of the tcp_probe module that can be used for monitoring the cwnd and ssthread, see https://github.com/Dynalon/tcp_probe_fixed