centos系统网络带宽测试方法

使用的speedtest的python脚本或工具,因此需要python环境

方法1:执行脚本

1.下载脚本

wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

 

2.赋予可执行权限

chmod +x speedtest.py

3.执行

./speedtest.py

执行后会打印出相关download、upload速率:

Testing download speed................................................................................
Download: 1126.35 Mbit/s
Testing upload speed......................................................................................................
Upload: 1139.01 Mbit/s

注意单位为Mbit/s,   1MB/s等于8Mbit/s

方法2:安装工具

没有安装pip可以执行安装:

pip install --upgrade pip

 

1.开始安装

pip install speedtest-cli

easy_install speedtest-cli

 

2.测试速率

命令行执行 speedtest-cli 命令即可,无需任何也可直接执行,返回结果及查看速率和方法1类似

部分参数如下:

speedtest-cli --bytes  以字节计算的方式来测试上下行速度
speedtest-cli --share  将速度测试的结果生成一张图片链接
speedtest-cli --simple   只显示ping和上下行速度
speedtest-cli --list    列出speedtest.net所有的服务器距离你的物理距离,单位是千米(km)

 

附winows、Android等系统带宽测试方法

浏览器访问Speedtest by Ookla - The Global Broadband Speed Test(或者实际网址https://www.speedtest.net/)

点击页面中央的[go] 按钮即可开始测试速率

posted @ 2022-03-17 16:00  诟笑  阅读(1820)  评论(0编辑  收藏  举报