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