Linux 计算 TCP 重传

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16842118/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 23:05:35  来源:igfitidea点击:

Counting TCP retransmissions

linuxunit-testingnetworkingtcp

提问by M10TheMist

I would like to know if there is a way to count the number of TCP retransmissions that occurred in a flow, in LINUX. Either on the client side or the server side.

我想知道在 LINUX 中是否有一种方法可以计算流中发生的 TCP 重传次数。无论是在客户端还是服务器端。

采纳答案by Christian Hudon

You can see TCP retransmissions for a single TCP flow using Wireshark. The "follow TCP stream" filter will allow you to see a single TCP stream. And the tcp.analysis.retransmissionone will show retransmissions.

您可以使用 Wireshark 查看单个 TCP 流的 TCP 重传。“跟随 TCP 流”过滤器将允许您查看单个 TCP 流。而tcp.analysis.retransmission一个会显示重传。

For more details, this serverfault question may be useful: https://serverfault.com/questions/318909/how-passively-monitor-for-tcp-packet-loss-linux

有关更多详细信息,此服务器故障问题可能有用:https: //serverfault.com/questions/318909/how-passively-monitor-for-tcp-packet-loss-linux

回答by M10TheMist

Looks like netstat -ssolves my purpose.

看起来netstat -s解决了我的目的。