Linux下使用Speedtest测试网速教程
Linux下使用Speedtest测试网速教程
文章目录:
- 一、通过Speedtest官网直接测试网络速度
- 二、通过下载源码,在命令行中测试网速
- 1、下载安装
- 2、Speedtest的参数使用:
有时候我们会需要测试一下当前本机的下载速度和上行速度,但是不行,Linux并没有自带这种技能,那就只能借助外力get此技能啦!!!
这里我们使用的是Speedtest工具,下面介绍该工具的两种测试网速的方法
- 通过浏览器测试网速
- 通过下载源码,在命令行中测试网速
一、通过Speedtest官网直接测试网络速度
- Speedtest的官方网址
网址: https://www.speedtest.net/
通过浏览器打开该网址,点击Go
即可开启网速测试之旅
2、测试效果如下:
二、通过下载源码,在命令行中测试网速
这里用到一个Python工具speedtest,speedtest是一个用Python编写的轻量级Linux命令行工具,目前支持几乎所有的python版本
Python 2.4-3.7
。它基于Speedtest.net的基础架构来测量网络的上/下行速率。安装speedtest很简单——只需要下载其Python脚本文件。
1、下载安装
Speedtest的github的下载地址:
https://github.com/sivel/speedtest-cli
Speedtest有多种安装方式,选一种你喜欢的方式去安装它吧!方法如下:
- 直接用pip安装
pip install speedtest-cli
- 用easy_install 安装
easy_install speedtest-cli
- 用pip结合git下载安装
pip install git+https://github.com/sivel/speedtest-cli.git
- 用git先下载,然后在用python执行安装程序安装
git clone https://github.com/sivel/speedtest-cli.git
python speedtest-cli/setup.py install
- 用wget下载,不安装
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli
- 用curl下载,不安装
curl -Lo speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli
2、Speedtest的参数使用:
$ speedtest-cli -husage: speedtest-cli [-h] [--no-download] [--no-upload] [--bytes] [--share][--simple] [--csv] [--csv-delimiter CSV_DELIMITER][--csv-header] [--json] [--list] [--server SERVER][--exclude EXCLUDE] [--mini MINI] [--source SOURCE][--timeout TIMEOUT] [--secure] [--no-pre-allocate][--version]Command line interface for testing internet bandwidth using speedtest.net.
-https://github.com/sivel/speedtest-clioptional arguments:-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 notaffect the image generated by --share, nor output from--json or --csv--share Generate and provide a URL to the speedtest.net shareresults image, not displayed with --csv--simple Suppress verbose output, only show basic information--csv Suppress verbose output, only show basic informationin CSV format. Speeds listed in bit/s and not affectedby --bytes--csv-delimiter CSV_DELIMITERSingle character delimiter to use in CSV output.Default ","--csv-header Print CSV headers--json Suppress verbose output, only show basic informationin JSON format. Speeds listed in bit/s and notaffected by --bytes--list Display a list of speedtest.net servers sorted bydistance--server SERVER Specify a server ID to test against. Can be suppliedmultiple times--exclude EXCLUDE Exclude a server from selection. Can be suppliedmultiple times--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 withspeedtest.net operated servers--no-pre-allocate Do not pre allocate upload data. Pre allocation isenabled by default to improve upload performance. Tosupport systems with insufficient memory, use thisoption to avoid a MemoryError--version Show the version number and exit
Reference:
1、https://blog.csdn.net/catoop/article/details/50350623
2、https://linux.cn/article-9558-1.html
3、https://blog.csdn.net/wh211212/article/details/52735229
4、https://blog.csdn.net/h952520296/article/details/78458072
♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠
Linux下使用Speedtest测试网速教程相关推荐
- Linux下使用Speedtest测试网速
导读 Speedtest是用来测试网络性能的开源软件,在Linux下面安装Speedtest可以用来测试网络出口的上传和下载速度,帮助排查网络方面导致的故障. Speedtest介绍 由于公司几个项目 ...
- linux用ping命令测试网速,linux下面使用命令测试网速
大家都知道在speedtest是市面上最准确最全面的测速工具,但在linux命令行不能直接使用,所以我们就借助脚本调用speedtest的接口来利用他测试网速. 1.下载speedtest-cli脚本 ...
- linux下限制每个IP网速
需求是要限制每个ip单独网速为100kb,服务器在阿里云上,专有网络网卡只有eth0 linux下限制网速的方法有很多种 1.wondershaper # 是一根据网卡来进行限制总网速,操作简单,适合 ...
- linux 脚本 上网限制,Linux_Ubuntu下限制局域网网速教程,为了限制无线路由器上大家的 - phpStudy...
Ubuntu下限制局域网网速教程 为了限制无线路由器上大家的上网速度,减少p2p工具的影响 可以通过arp欺骗和iptables来限制局域网的上网速度 操作系统:Ubuntu 1)sudo apt-g ...
- centos 测试网速(speedtest)
很多时候我们需要测试Linux服务器的上行和下行宽带.在可用于测试宽带速度的网站中,Speedtest.net也许是使用最广泛的应用"之一". Speedtest.net提供了一 ...
- 使用Linux命令行测试网速
2019独角兽企业重金招聘Python工程师标准>>> Speedtest.net的工作原理并不复杂:它在你的浏览器中加载JavaScript代码并自动检测离你最近的Speedtes ...
- python测网速_使用Linux命令行测试网速(示例代码)
当发现上网速度变慢时,人们通常会先首先测试自己的电脑到网络服务提供商(通常被称为"最后一公里")的网络连接速度.在可用于测试宽带速度的网站中,Speedtest.net也许是使用最 ...
- linux服务器如何测试网速
linux服务器如何测试网速 说到测网速我相信很多小伙伴都知道在自己的电脑上操作,但我们平时用的比较多的系统还是Windows系统,那么到了linux系统上你知道怎么测网速吗? 今天还是艾西的服务器小 ...
- Linux命令行测试网速
很多时候我们需要测试Linux服务器的上行和下行宽带.在可用于测试宽带速度的网站中,Speedtest.net也许是使用最广泛的应用"之一". Speedtest.net提供了一个 ...
最新文章
- testem方便的web tdd 测试框架使用
- Android aidl 正确使用 callback的方式
- 每日一皮:2020年度最佳微小说...
- bogofilter 使用
- 【转载】分布式数据库架构--分库、分表、排序、分页、分组、实现
- 解析Integer比较
- Process when we start our testing work
- 区块链 以太坊 每个区块可以包含多少个交易
- AdaBoost(1)
- julia的几种画图方法
- WiFi 802.11可调参数说明---信标间隔(Beacon Interval)
- APP上传照片后台实现方法
- QQ透明头像通用设置教程!不仅简单而且免费!
- [ Linux ] PCF8563数据手册解析 |CSDN创作打卡
- 《交互式程序设计 第2版》一1.2 交互领域中的编程
- 错误处理(包括日志记录)
- 数据库原理——T-SQL、游标
- OUC_软件工程_BLOG1
- 金山WPS升级后导致用友输出Excel表格打不开
- python文件开头# coding=gbk的用途
热门文章
- [poj] 2318 TOYS || 判断点在多边形内
- 嵌入式linux下如何尽快播放开机音乐
- HDU-1316 How Many Fibs? Java
- 如何为WCF应用添加X509证书和安全验证
- Windows Phone + VB 程序员=好的移动应用程序
- sql,nolock
- lucene.net 某些类的介绍
- iview构建基本html页面,使用vue-cli创造基于vue.js的iview工程
- python100个必背知识-python编程面试中必考的知识点,数据类型全解,笔记超全面...
- 学习python是干嘛的-学 Python 都用来干嘛的?