帮助与文档

当前位置: 主页 > 系统相关 > 正文

Centos7.6使用speedtest进行网络测速

时间:2024/4/25 8:50:11   来源:米安网络   作者:云主机配置专家   点击:8次
orphans: 2; widows: 2; background: #ffffff;">Speedtest不仅是windows下的优秀网站测速选择,也可以在Linux中使用,小巧快捷方便,适合快速测量机器带宽。

orphans: 2; widows: 2; background: #ffffff;">centos系统如何使用speedtest命令监控网卡流量?本教程以centos 7.6系统为例进行图文说明

orphans: 2; widows: 2; background: #ffffff;">本配置适用于centos7.x 和centos 6.x版本

orphans: 2; widows: 2; background: #ffffff;">

orphans: 2; widows: 2; background: #ffffff;">以下为操作步骤:

orphans: 2; widows: 2; background: #ffffff;">1.使用wget下载github上的speedtest python脚本工具(wget若是使用不了没有更新到最新版本的可以使用yum update后yum install wget)(若更新不了yum的话编辑vi/etc/apt/sources.list 在末尾添加源,保存退出。)

orphans: 2; widows: 2; background: #ffffff;">

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

e

orphans: 2; widows: 2; background: #ffffff;">2.给脚本添加权限

chmod a rx speedtest.py
orphans: 2; widows: 2; background: #ffffff;">

orphans: 2; widows: 2; background: #ffffff;">3.移动脚本文件

mv speedtest.py /usr/local/bin/speedtest
orphans: 2; widows: 2; background: #ffffff;">

orphans: 2; widows: 2; background: #ffffff;">4.给脚本文件划分用户和用户组

sudo chown root:root /usr/local/bin/speedtest-cli

orphans: 2; widows: 2; background: #ffffff;">5.执行以上几个命令后即已安装,运行的时候键入speedtest,脚本则自动发现最近的Speedtest.net服务器(地理距离),然后打印出测试的网络上/下行速率。

orphans: 2; widows: 2; background: #ffffff;">speedtest

orphans: 2; widows: 2; background: #ffffff;">

orphans: 2; widows: 2; background: #ffffff;">6. 若愿意分享测试结果,可以使用参数“--share”。它将会把测试结果形成图片上传到Speedtest.net服务器并以图形的方式分享给其他人。

orphans: 2; widows: 2; background: #ffffff;">speedtest - -share

orphans: 2; widows: 2; background: #ffffff;">

orphans: 2; widows: 2; background: #ffffff;">

orphans: 2; widows: 2; background: #ffffff;">

orphans: 2; widows: 2; background: #ffffff;">7.如果对目前所有可用的Speedtest.net服务器感兴趣,可以使用参数“list”。它会打印出所有的Speedtest.net服务器(按照离你的地理距离由近及远排序

orphans: 2; widows: 2; background: #ffffff;">



版权保护: 本文「Centos7.6使用speedtest进行网络测速」由 云主机配置专家 原创,转载请保留链接: https://www.miandns.com/docs/system/897.html

联系客服

0312-5535754

微信公众号