在Linux中获取TCP RTT [英] Fetching the TCP RTT in Linux
本文介绍了在Linux中获取TCP RTT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要获取RTT以获取TCP流. 我已经研究了proc文件系统,但无法获取TCP的RTT值.如果有人对此有任何想法,将在其中存储RTT文件.
提前谢谢.
解决方案
也许iproute实用程序中提供的ss
(套接字统计信息)实用程序可以为您提供帮助.
# ss -i 'src 1.1.1.1:1234 and dst 2.2.2.2:1234'
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 0 1.1.1.1:1234 2.2.2.2:1234
reno wscale:2,7 rto:3380 rtt:855/602.5 ato:40 ssthresh:2 send 27.3Kbps rcv_space:5840
如果您想更多地了解rtt
字段是什么,我认为最好看看 解决方案
Maybe the ss
(socket statistics) util available in the iproute utils can help you with this.
# ss -i 'src 1.1.1.1:1234 and dst 2.2.2.2:1234'
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 0 1.1.1.1:1234 2.2.2.2:1234
reno wscale:2,7 rto:3380 rtt:855/602.5 ato:40 ssthresh:2 send 27.3Kbps rcv_space:5840
If you want more information what the rtt
field is i think it is best to take a look at ss.c.
这篇关于在Linux中获取TCP RTT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文