Linux 使用 Speedtest 测速网速

文章
林里克斯

Speedtest 它是用 Python 写成的,像类似工具还有 fastiper 工具也能测速。

实验平台:CentOS 7.7.1908

speedtest version:1.0.2



一、安装命令


1.yum 安装

$ yum -y install python2-speedtest-cli

2.源码

$ git clone https://github.com/sivel/speedtest-cli.git
#若没有 git 命令,yum -y install git 安装

二、工具使用


1.测速

$ cd speedtest-cli/
$ python speedtest.py 
Retrieving speedtest.net configuration...
Testing from China Telecom (219.141.26.130)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by yunnan telecom (Yunnan) [432.65 km]: 49.254 ms
Testing download speed................................................................................
Download: 285.68 Mbit/s
Testing upload speed................................................................................................
Upload: 38.91 Mbit/s

2.speedtest-cl

$ speedtest-cli --help

  -h, --help            #显示帮助信息
  --bytes               #以单位 bytes 而不是 bits 显示
  --share               #生成并提供指向速度测试.netshar结果图像
  --simple              #禁止详细输出,只显示基本信息
  --csv                 #取消详细输出,仅以CSV格式显示基本信息 
  --list                #显示列表速度测试.net服务器排序依据(按照离你的地理距离由近及远排序)
  --server SERVER       #指定要测试的服务器ID
  --source SOURCE       #要绑定到的源IP地址
  --timeout TIMEOUT     #HTTP超时(秒)。默认值10
  --secure              #与通信时使用HTTPS而不是HTTP速度测试.net操作服务器
  --version             #显示版本信息

Over~

版权协议须知!

本篇文章来源于 Uambiguous ,如本文章侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意

922 0 2020-09-23


分享:
icon_mrgreen.gificon_neutral.gificon_twisted.gificon_arrow.gificon_eek.gificon_smile.gificon_confused.gificon_cool.gificon_evil.gificon_biggrin.gificon_idea.gificon_redface.gificon_razz.gificon_rolleyes.gificon_wink.gificon_cry.gificon_surprised.gificon_lol.gificon_mad.gificon_sad.gificon_exclaim.gificon_question.gif
博主卡片
林里克斯 博主大人
一个致力于Linux的运维平台
运维时间
搭建这个平台,只为分享及记载自己所遇之事和难题。

现在时间 2024-05-18

今日天气
站点统计
  • 文章总数:240篇
  • 分类总数:29个
  • 评论总数:10条
  • 本站总访问量 222972 次

@奥奥

@Wong arrhenius 牛比

@MakerFace 厉害了!