CentOS release 6.5 (Final)
2.6.32-431.el6.x86_64
2.主机能ping 通外网
PING qq.com (14.17.32.211) 56(84) bytes of data.
64 bytes from 14.17.32.211: icmp_seq=1 ttl=51 time=3.76 ms
64 bytes from 14.17.32.211: icmp_seq=2 ttl=51 time=3.66 ms
64 bytes from 14.17.32.211: icmp_seq=3 ttl=51 time=3.66 ms
64 bytes from 14.17.32.211: icmp_seq=4 ttl=51 time=3.69 ms
3.Speedtest介绍
Speedtest强大而知名的全球宽带网络速度测试工具,采用Flash载入界面,Alexa世界排名非常高,Speedtest.net在全球有数百个测试节点,国内有测速节点几十个。作为一款在线并且可视化的网速测试工具。Speendtest.net官网:http://www.speedtest.net/
工作原理:它在你的浏览器中加载JavaScript代码并自动检测离你最近的Speedtest.net服务器,然后向服务器发送HTTP GET and POST请求来测试上行/下行网速
Speedtest支持Windowst和Linux操作系统
Windows系统直接在浏览器输入 www.speedtest.net进行测试即可
Linux系统需要在对speedtest进行安装
4.在Linux安装speedtest-cli
a.安装pipspeedtest使用的是python写的,没使用过pip的需要先安装pip
安装源:rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
pip安装:yum install python-pip –y
b.安装speedtest-cli
5.speedtest-cli使用
speedtest-cli命令会查找距离最近的Speedtest.net服务器。并打印出你的下行和上行带宽。
Retrieving speedtest.net configuration...
Testing from CNISP-Union Technology (Beijing) Co. (111.201.11.85)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ShenZhen Telecom (Shenzhen) [111.37 km]: 4.567 ms
Testing download speed................................................................................
Download: 1.79 Mbit/s
Testing upload speed................................................................................................
Upload: 1.61 Mbit/s
6.其他参数详解 -h, --help show this help message and exitDisplay values in bytes instead of bits. Does not affect the image generated by --share
--share (加此参数测试后,会有链接产生,在浏览器输入链接会显示图片)
Generate and provide a URL to the speedtest.net share results image
--simple Suppress verbose output, only show basic information
--list (可列举行所有测试点服务器)
Display a list of speedtest.net servers sorted by distance
--server SERVER Specify a server ID to test against
(如果需要测试其中另一个节点speedtest-cli --server 相应服务器编号)
--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
--version Show the version number and exit