给大家介绍一个常用的 linux 带宽测试工具 speedtest-cli,也给自己做个笔记,方便以后查阅。工具使用方式很简单,具体步骤如下。
1 下载 speedtest-cli 工具
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli
2 开始测试网速
[root@localhost ~]# ./speedtest-cli Retrieving speedtest.net configuration... Testing from China Unicom Liaoning (122.97.178.118)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Shanghai Huajuan Information Technology Co., Ltd. (Hong Kong) [15.42 km]: 140.576 ms Testing download speed................................................................................ Download: 42.58 Mbit/s Testing upload speed.................................................................................. Upload: 17.13 Mbit/s
3 通过 wget 和服务器下载测试 vps 真实上传下载速度
我们也可以在 vps 上执行 wget 测试 vps 真实流入带宽
Wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz
在 vps 上安装 apache,在浏览器上下载 apache 上的文件,测试流出带宽