用Speedtest-CLI来测试你的上下行网速
来源:互联网 发布:什么是网络编辑 编辑:程序博客网 时间:2024/04/29 13:18
我们经常需要检查服务器的网络状况,于是便了有此文的主题Speedtest-CLI
,这是个十分好用的工具,使用简单的命令就能达到我们的目的。
Speedtest-CLI是什么?
Speedtest-CLI
是基于python开发的脚本程序,利用了speedtest.net的服务来测量出上下行的宽带速度。Speedtest-cli
能根据机房离测速服务器的物理距离来列出测速服务器,或者针对某一服务器进行测速,同时还能为你生成一个URL以便你分享你的测速结果。
在Linux上安装Speedtest-CLI
准备条件
服务器上必须安装了2.4-3.5的python版本
安装方法
pip方式安装
pip install speedtest-cli
或
easy_install speedtest-cli
注:这种安装方式的前提是系统安装了python-pip包管理器,这样你才能使用pip命令安装
通过github方式安装
pip install git+https://github.com/sivel/speedtest-cli.git
或
git clone https://github.com/sivel/speedtest-cli.git
python speedtest-cli/setup.py install注:这种安装方式的前提是系统安装了git客户端,这样你才能使用git命令安装
下载安装
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli或
curl -Lo speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli注:chmod是提权操作
移动脚本到用户下,这样就不用每次输入完整的脚本路径
sudo mv speedtest-cli /usr/bin/
使用Speedtest-CLI
键入speedtest-cli -h
可以得到相关的命令
Usage: speedtest-cli [options]Command line interface for testing internet bandwidth using speedtest.net.--------------------------------------------------------------------------https://github.com/sivel/speedtest-cliOptions: -h, --help show this help message and exit --no-download Do not perform download test --no-upload Do not perform upload test --bytes Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from --json or --csv --share Generate and provide a URL to the speedtest.net share results image, not displayed with --csv --simple Suppress verbose output, only show basic information --csv Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected by --bytes --csv-delimiter=CSV_DELIMITER Single character delimiter to use in CSV output. Default "," --csv-header Print CSV headers --json Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not affected by --bytes --list Display a list of speedtest.net servers sorted by distance --server=SERVER Specify a server ID to test against --mini=MINI URL of the Speedtest Mini server --source=SOURCE Source IP address to bind to --timeout=TIMEOUT HTTP timeout in seconds. Default 10 --secure Use HTTPS instead of HTTP when communicating with speedtest.net operated servers --no-pre-allocate Do not pre allocate upload data. Pre allocation is enabled by default to improve upload performance. To support systems with insufficient memory, use this option to avoid a MemoryError --version Show the version number and exit
命令介绍
speedtest-cli --bytes
以字节计算的方式来测试上下行速度speedtest-cli --share
将速度测试的结果生成一张图片的连接,便于你分享speedtest-cli --simple
只显示ping和上下行速度speedtest-cli --list
列出speedtest.net所有的服务器距离你的物理距离,单位是千米(km)- …
其它命令自己去看文档吧,写得很清楚,传送门
好了,这里就说这么多了.
- 用Speedtest-CLI来测试你的上下行网速
- speedtest-cli测试网速
- Linux安装speedtest-cli测试网速
- Linux上下行网速测试工具_speedtest-cli
- Linux上下行网速测试工具_speedtest-cli
- Linux下用speedtest-cli测网速
- speedtest-cli在CentOS上的安装及其使用
- Linux下使用Speedtest测试网速
- Linux下使用Speedtest测试网速
- speedtest-cli网络测速
- linux mint安装网络流量条显示上下行网速
- 怎样进行网速测试?教你几个网速测试方法
- [Linux OS] Ubuntu 16.04 上实时显示上下行网速、CPU及内存使用率--indicator-sysmonitor
- Ubuntu 16.04 标题栏实时显示上下行网速、CPU及内存使用率
- Ubuntu 14.04 标题栏实时显示上下行网速、CPU及内存
- Ubuntu 14.04 标题栏实时显示上下行网速、CPU及内存状态
- Ubuntu 16.04 标题栏实时显示上下行网速、CPU及内存使用率
- Ubuntu 16.04 标题栏实时显示上下行网速、CPU及内存使用率
- ImageView.ScaleType设置图解
- 事务管理配置与@Transactional注解使用
- Excel VBA简介
- 做数据分析时_你的方法论是什么?
- swagger-ui教程-构建api接口文档工具
- 用Speedtest-CLI来测试你的上下行网速
- 如何判断单链表有环?若有环,找出其入口地址
- 149. Max Points on a Line
- vs2010 release 调试
- 梯度下降算法及Python实现
- 浅谈竞赛中的部分树(块、点、链)【长期更新】
- 64位系统 VS2010 各种问题 及 提示“ORA-06413: 连接未打开”
- java Object t 强转String
- (五)Docker镜像管理2之nginx镜像制作