开发者

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

开发者 https://www.devze.com 2023-03-19 12:39 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to开发者_运维问答 attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question

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?


The ss utility will generate this output for sockets:

# ss -i
State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port   
ESTAB      0      2054000          1.2.3.4:34069          1.2.3.5:ssh     
     htcp wscale:11,11 rto:247 rtt:47/0.75 ato:40 cwnd:1542 ssthresh:742 send 380.1Mbps rcv_rtt:14 rcv_space:64240

You can check the cwnd/ssthresh values from it.


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


Depending on what you mean by "monitor", Wireshark might do the trick.

See also the /proc/net/tcp documentation. (No, I do not really follow it; you might need to dig into the kernel sources to make sense of it...)


I found a tool that can monitor these values. http://www.umic-mesh.net/downloads/flowgrind.html

0

精彩评论

暂无评论...
验证码 换一张
取 消