linux下使用speedtest测速

Speedtest测试网络上传/下载速度还是挺不错的,windows下非常方便。Linux下也可以很方便的使用命令行speedtest来测试。speedtest是一个用Python编写的轻量级Linux命令行工具,在Python2.4至3.4版本下均可运行。它基于Speedtest.net的基础架构来测量网络的上/下行速率。安装speedtest很简单——只需要下载其Python脚本文件。以下步骤参考了linuxtoday的文章。

wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py
chmod a+rx speedtest.py
mv speedtest.py /usr/local/bin/speedtest
chown root:root /usr/local/bin/speedtest

  

执行以上几个命令就安装好了,然后运行的时候只要输入
speedtest

[root@hongkong-k8s-node02 ~]# speedtest
Retrieving speedtest.net configuration...
Testing from Alibaba (47.75.223.169)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by China Mobile Group Beijing Co.Ltd (Beijing) [1.67 km]: 41.884 ms
Testing download speed................................................................................
Download: 135.38 Mbit/s
Testing upload speed................................................................................................
Upload: 1.97 Mbit/s

  

同时也通过wget的方式来测试下载的速度 

[root@hongkong-k8s-node02 ~]# wget http://mirrors.163.com/archlinux/iso/latest/archlinux-2018.11.01-x86_64.iso
--2018-11-29 17:11:29--  http://mirrors.163.com/archlinux/iso/latest/archlinux-2018.11.01-x86_64.iso
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 614465536 (586M) [application/octet-stream]
Saving to: ‘archlinux-2018.11.01-x86_64.iso’

13% [===========>                                                                                      ] 80,947,883  12.0MB/s  eta 41s 

  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值