Linux下如何测试网速

论坛 期权论坛 脚本     
匿名网站用户   2020-12-20 07:57   144   0

在Linux下如何测量下载和上传的速度?

这里用到一个Python工具speedtest,speedtest是一个用Python编写的轻量级Linux命令行工具,在Python2.4至3.4版本下均可运行。它基于Speedtest.net的基础架构来测量网络的上/下行速率。安装speedtest很简单——只需要下载其Python脚本文件。

1、安装speedtest

$ wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
$ chmoda+rx speedtest.py
$ mvspeedtest.py /usr/local/bin/speedtest
$ chownroot:root /usr/local/bin/speedtest

2、调用speedtest命令

$ speedtest

输入这个命令后,它会自动发现离你最近的Speedtest.net服务器(地理距离),然后打印出测试的网络上/下行速率


分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1136255
帖子:227251
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP