带宽计算(以 Mbps 为单位)
有人可以检查这个计算吗?
我想通过从远程服务器下载文件来计算互联网连接的速度。
我的时间单位是 1/60 秒。假设远程服务器上的文件大小为 32K。
timeBegin = 刻度 <- 自开始后的 1/60 秒 某个日期
get.url( 文件 )
时间结束 = 蜱Mbps = ( 文件大小 * 8) / ( 结束时间 - 开始时间) / 60 / 1048576
有谁知道从命令行(unix)测试带宽(上传/下载)的方法吗?
Can someone check this calculation?
I want to calculate the speed of my internet connection by downloading a file from a remote server.
My time unit is in 1/60th of a second. Let's say the file on the remote server is 32K.
timeBegin = ticks <- 1/60th of a second since beginning
of some date
get.url( file )
timeEnd =
ticksMbps = ( size of file * 8) / ( timeEnd -
timeBegin ) / 60 / 1048576
Does anyone know of a way to test bandwidth (upload/download) from the command line (unix)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不知道顶部的确切命令可以执行您想要的操作。
但是,根据此测试,您可能无法非常准确地读取您的互联网带宽。
我发现有两个问题:
1)您可能会受到延迟的限制。下载时间是延迟(数据包在源和目标之间往返的时间)和带宽的一个因素。
2)服务器而不是你可能有有限的BW。
您可能可以通过查看如下景点来获得更准确的数字:
speakeasy
Don't know the exact command off the top to do what you want.
But, you may not get a very accurate reading of your internet BW based on this test.
There are 2 issues I see:
1) You could be limited by latency. Download time is a factor of both latency (the amount of time for a packet to do a round trip between source and destination) and BW.
2) The server and not you may have limited BW.
You probably can get a more accurate number by checking out sights like this:
speakeasy
您的计算不太正确,缺少一些括号。
我看到 DasBoot 已经指出了该方法中一些潜在的不准确来源。我将补充#2,关键带宽限制也可能存在于您和服务器之间的某个跃点。
Your calculation is not quite correct, you are missing some parentheses.
I see DasBoot already pointed out some of the potential sources of inaccuracy in this method. I'll just add to #2 that the critical bandwidth limitation may also exist at some hop in between you and the server.
我用来检查服务器之间“带宽”的一种方法是查看远程和本地之间的 scp 结果(反之亦然)。您还可以考虑使用像 30-40MB 这样的大文件...
另一种方法是使用 wget 命令,它也显示下载速度(如 1Mb/s)
希望它有帮助
One way I use to check "bandwidth" between servers is to look at the results from scp between remote and local (and vice versa). You could also consider using a large file like 30-40MB...
Another way is to use the wget command which show the speed of download too (like 1Mb/s)
hope it helps
尝试使用 IPTRAF 来监控它。
Try to use IPTRAF to monitor it.