linux - 以 Mbps 为单位的带宽计算

标签 linux unix bandwidth

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

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

我的时间单位是 1/60 秒。假设远程服务器上的文件是 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

有人知道从命令行 (unix) 测试带宽(上传/下载)的方法吗?

最佳答案

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

我看到了 2 个问题:

1) 您可能会受到延迟的限制。下载时间是延迟(数据包在源和目标之间往返的时间量)和 BW 的一个因素。

2) 服务器而非您的 BW 可能有限。

您可能可以通过查看以下景点来获得更准确的数字: speakeasy

关于linux - 以 Mbps 为单位的带宽计算,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5215201/

相关文章:

c - 如何读取acct文件?

Linux replace 从字符串中删除字符并保存到 var

linux - 如何查看有关新加载的外部 Linux 内核模块的信息?

bash - 如何列出我的 shell 中定义的函数?

linux - 转换格式 HH :MM:SS to seconds in a column with AWK

c++ - libcurl : output of network upload download speed is not accurate

c - 为什么此代码包含 case 0 和 default?

Apache:代理到 URL 中命名的 unix 套接字

linux - 我需要帮助来使用 gnuplot 创建图表

iPhone sdk 套接字 - 使用的带宽