通过ping计算上传/下载速度 [英] Calculate upload/download speed by ping

查看:518
本文介绍了通过ping计算上传/下载速度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过一些平均ping速率来计算Internet连接的速度.涉及的计算是什么.可以通过ping速率来计算上传/下载限制

How to calculate the speed of an internet connection by some average ping rates.What are the calculations involved in it.IS it possible to calculate upload/download limit by ping rate

编辑 如果ping不能解决问题,那还有什么呢?

EDIT If ping is not a solution what else is?

推荐答案

我使用ping来计算本地网络中的带宽.我认为它与其他测量带宽的方法(例如下载大文件)一样准确.如果您具有对称的Internet链接(即没有adsl),也可以将其用于Internet连接.

I used ping to calculate bandwidth in local network. I think it's as accurate as other means of measuring bandwidth (e.g. downloading a big file). You can use it too for your internet connection if you have a symmetric link to the internet (i.e. not adsl).

这是我的操作方式:

我有一个千兆以太网LAN,我想测量计算机与服务器机房中主机之间的速度.我的MTU是1500,所以我使用的数据包大小为1472.在此测试中,我随机使用83,333个数据包(大约1吉比特).然后:

I have a gigabit ethernet LAN and I want to measure speed between my computer and a host in server room. My MTU is 1500, so I use packet size 1472. Just randomly, I use 83,333 packets in this test (about 1 gigabit). Then:

sudo ping -f -c 83333 -s 1472 192.168.3.103

结果最后我得到:

round-trip min/avg/max/stddev = 0.174/0.219/2.078/0.020 ms

因此,平均而言,发送1500个字节和接收1500个字节(即24 kb)需要0.219毫秒.

so in average it takes 0.219 ms to send 1500 bytes and receive 1500 bytes, that's 24 kb.

24 kb / 0.219 ms = 110 Mb/s

如果要将其用于Internet上的服务器,则需要将数据包大小减小到1464(对于MTU 1492),删除-f选项并降低计数,以免花费太长时间完成.

If you want to use that to a server on the internet, you need to lower the packet size to something like 1464 (for MTU 1492), drop the -f option and lower the count so it won't take too long to finish.

p.s.我认为这应该交给超级用户,而不是stackoverflow.

p.s. I think this should go to superuser, not stackoverflow.

这篇关于通过ping计算上传/下载速度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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