服务器增加了带宽,总有人要测试一下带宽是否足够,测试服务器峰值带宽工具在github上有工具可以直接使用。
我一般使用这个工具 :https://github.com/sivel/speedtest-cli
这是一个python脚本很好用。
安装 :
pip install speedtest-cli 或者 easy_install speedtest-cli 或者 git clone https://github.com/sivel/speedtest-cli.git cd speedtest-cli python speedtest.py 或者 wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.pychmod + x speedtest-cli
安装方法多种多样,自己选一个顺眼的用就行了。
以前方便我直接用wget下载就开始使用,不过最近发现wget下载后不能用了报错
Cannot retrieve speedtest configuration ERROR: <urlopen error [Errno -2] Name or service not known>\ 或者 Retrieving speedtest.net configuration... Cannot retrieve speedtest configuration ERROR: timed out
总之就是报错了,链接不上配置服务器,获取不到配置。然后用pip安装则可以
先更新一下pip
pip install --upgrade pip
再安装
pip install speedtest-cli
然后直接运行就行了
./speedtest-cli
这个软件功能强大默认会显示出 ping值 以及上行与下行带宽,需要更多功能自己查看官方文档。