iperf如何计算网络统计数据 [英] How iperf calculates network statistics

查看:327
本文介绍了iperf如何计算网络统计数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iperf是衡量网络统计信息(例如损耗,吞吐量,抖动)的好工具.我已经用了很多.但是,我只是想知道它如何计算这些统计数据.对于吞吐量,它可以简单地测量在一定时间段内接收到的字节数.对于抖动,它只能测量数据包的到达时间.但是,对于UDP丢失,如何计算.我的猜测是,它专门通过嵌入序列号来构造其有效负载.因此,服务器可以预测丢失了哪些数据包.有人知道iperf数据包有效载荷的内容是什么吗?

iperf is a great tool to measure network statistics, such as loss, throughput, jitter. I have used it a lot. But, I am just wondering how it calculates those statistics. For throughput, it can simply measure the number of bytes it received in a certain period of time; For jitter, it can just measure the packet arrival time. But, for UDP loss, how it can calculate. My guess is that it construct its payload specifically by embedding sequence numbers. So, the server can predict what packets are lost. Does anyone know what is the content of iperf packet payload?

另一件事是,在连接结束时,iperf客户端(发送者)将收到服务器报告(具有统计信息).此报告发送到哪个端口号?此报告使用TCP还是UDP?我无法使用tcpdump捕获它.

The other thing is that, in the end of connection, the iperf client (sender) will receive a server report (which has the statistics). Which port number this report is sent? This report uses TCP or UDP? I cannot capture it using tcpdump.

我试图在线搜索以找到上述问题的答案.但是,我只能找到如何使用iperf.似乎没有文档/网站解释iperf的工作原理.有人可以提供一些见解或指向某些文档吗?

I tried to search online to find the answers to my above questions. But, I can only find how to USE iperf. Looks like no document/website explain how iperf WORKs. Can someone give some insight or point to some documents?

推荐答案

我不是iperf开发人员,但查看源代码,很容易找到将数据包计数复制到udp消息的位置,在此处查找packet_count: https://github.com/esnet/iperf/blob/master/src/iperf_udp.c

I am not an iperf developer, but looking at the source code, it was quite easy to find the place where the packet count is copied to the udp message, look for packet_count here: https://github.com/esnet/iperf/blob/master/src/iperf_udp.c

这篇关于iperf如何计算网络统计数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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