带宽计算(以 Mbps 为单位)

发布于 2024-10-20 12:00:19 字数 316 浏览 6 评论 0原文

有人可以检查这个计算吗?

我想通过从远程服务器下载文件来计算互联网连接的速度。

我的时间单位是 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 =
ticks

Mbps = ( 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

此生挚爱伱 2024-10-27 12:00:19

不知道顶部的确切命令可以执行您想要的操作。
但是,根据此测试,您可能无法非常准确地读取您的互联网带宽。

我发现有两个问题:

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

十二 2024-10-27 12:00:19

您的计算不太正确,缺少一些括号。

Mbps = ( size of file * 8) / ( ( timeEnd - timeBegin ) / 60 ) / 1048576

我看到 DasBoot 已经指出了该方法中一些潜在的不准确来源。我将补充#2,关键带宽限制也可能存在于您和服务器之间的某个跃点。

Your calculation is not quite correct, you are missing some parentheses.

Mbps = ( size of file * 8) / ( ( timeEnd - timeBegin ) / 60 ) / 1048576

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.

时间你老了 2024-10-27 12:00:19

我用来检查服务器之间“带宽”的一种方法是查看远程和本地之间的 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

浪荡不羁 2024-10-27 12:00:19

尝试使用 IPTRAF 来监控它。

Try to use IPTRAF to monitor it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文