关于结构 tcp_info 的良好文档 [英] Good documentation on structure tcp_info

查看:18
本文介绍了关于结构 tcp_info 的良好文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在获取 tcp 连接的性能参数,其中一个参数是带宽.我打算使用从 linux 2.6 开始支持的 tcp_info 结构,它保存有关 tcp 连接的元数据.可以使用 tcp_info 上的 getsockopt() 函数调用来检索信息.我花了很多时间找到一个很好的文档来解释该结构中的所有参数,但找不到.

I am working on getting the performance parameters of a tcp connection and one these parameters is the bandwidth. I am intending to use the tcp_info structure supported from linux 2.6 onwards, which holds the meta data about a tcp connection. The information can be retrieved using the getsockopt() function call on tcp_info. I have spent lot of time finding a good documentation which explains all the parameters in that structure, but couldn't find one.

此外,我测试了一个小程序,从 tcp_info 中检索 tcp 连接的值,在那里我发现测量的 MSS 值大部分时间为零.长话短说 - 有没有要遵循的链接具有关于tcp_info 的完整详细信息,并且使用这些值是否可靠.

Also I tested a small program to retrieve the values from tcp_info for a tcp connection where I found the measured MSS values for most of the time as zero.To make long story short-Is there a link to follow for which has complete details ontcp_info and also is it reliable to use these values.

推荐答案

这是一篇相当全面的文章 由 René Pfeiffer 撰写的 linux tcp_info 的结构和使用,但有几点值得注意:

Here is a fairly comprehensive write-up of the structure and use of the linux tcp_info by René Pfeiffer but there are a couple of things worth noting:

  • 作者需要反复查看这些数据,因为该结构中没有汇总统计数据.
  • 作者将您引导至 tcp.c 源,它是任何这些数据含义的最终权威.
  • 我不确定您希望从最大分段大小中得到什么,但希望您认为它意味着其他含义.

如果您真的对带宽的精确测量感兴趣,则需要使用被测试系统之外的测量设备,因为即使拉动 ioctls 也会影响您有兴趣了解的现象.无源线嗅探器是获得真正准确结果的唯一方法.最后,根据您的应用,带宽"是一个非常广泛的保护伞,它将许多测量(例如延迟、往返时间、可变性、抖动等)归为一类.

If you are truly interested in exact measurements of bandwidth you need to use a measurement device which is outside the system being tested as even pulling the ioctls will affect the phenomenon you are interested in knowing about. A passive wire sniffer is the only way to get truly accurate results. Finally, depending on your application, "bandwidth" is a really broad umbrella which flattens many measurements (e.g. latency, round-trip-time, variability, jitter, etc.) into one category.

这篇关于关于结构 tcp_info 的良好文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆