丢包与时延定位60 条

网卡计数速查

驱动与协议栈各自记录丢弃:ethtool -S 看 rx_dropped/tx_dropped(驱动层),netstat -s 看协议层统计,先分层再归因。

用途分层查看本机丢包计数
命令ethtool -S eth0 / netstat -s / ip -s link

速查

速查
ethtool -S eth0 | grep -Ei 'drop|error|miss'
ip -s link show eth0
netstat -s | grep -Ei 'drop|overflow|pruned'
上电累计计数要取差值:两次采样间隔与业务窗口对齐。

易错点

  • 计数含历史累计,不看差值会对着老数据下结论
  • 虚拟网卡计数含义与物理网卡不同,对照宿主机侧才准

数据来源与参考

  • man 8 ethtool
  • procfs netstat 文档
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌