首先是安装
wget git.io/bench.sh
详细使用参数:
Arguments: -info - Check basic system information -io - Run I/O test with or w/ cache -cdn - Check download speed from CDN -northamercia - Download speed from North America -europe - Download speed from Europe -asia - Download speed from asia -a - Test and check all above things at once -b - System info, CDN speedtest and I/O test -ispeed - Install speedtest-cli (python 2.4-3.4 required) -speed - Check internet speed using speedtest-cli -about - Check about this script Parameters share - upload results (default to ubuntu paste) Available option for share: ubuntu # upload results to ubuntu paste (default) haste # upload results to hastebin clbin # upload results to clbin ptpb # upload results to ptpb
举个例子,我们有时候有国内小鸡,大多都是1M带宽,所以对网速测试可以跳过,使用:
wget git.io/bench.sh;bash bench.sh -info #查看系统信息 wget git.io/bench.sh;bash bench.sh -io #测试读写速度 wget git.io/bench.sh;bash bench.sh -speed #speedtest测试服务器速度
如果机器是国外的,那就没啥顾虑,直接全部跑一遍,包括各个地方的下载测试,非常全面:
wget git.io/bench.sh;bash bench.sh -a #测试所有项目
如果想分享跑分结果:
wget git.io/bench.sh;bash bench.sh -a share #测试所有项目并分享
在跑分完成后,会给出Ubuntu的在线地址,分享给别人即可。
这个脚本可以配合superbench.sh来测试国内速度,这样的测试结果我们能对整个服务器的网络情况也就非常了解。
本文转自刺客博客