Speedtest小工具

  • 介绍
  • `Winodows测试地址`:
  • `Linux测速方法`:
  • 服务器进行下载wget工具
  • 下载脚本
  • 给脚本执行权限
  • 执行脚本出结果
  • 多种参数可供参考



Speedtest.net强大而知名的全球宽带网络速度测试网站,采用Flash载入界面,Alexa世界排名非常高,Speedtest.net在全球有数百个测试节点,国内有测速节点几十个。作为一款在线并且可视化的网速测试工具。使用方法简单,无需下载、安装多余软件,只需有浏览器即可。

介绍

Speedtest是Ookla推出的一款基于全球视图的可视化网速测试工具。与众不同的是它可以在一个世界地图上来选择指定的测试服务器,用绿色三角标记的是建议用来测速的服务器,白点标记的是可用测试点服务器。测试的结果显示了你连接到此服务器的上传及下载速率,网络延时等信息。

Winodows测试地址

中文版:https://www.speedtest.cn/ 英文版:https://www.speedtest.net/

Linux测速方法

服务器进行下载wget工具
yum -y install wget
下载脚本
wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
给脚本执行权限
chmod +x speedtest.py
执行脚本出结果
[root@iZ2zed74kn7q0nv9z9nk4nZ ~]# ./speedtest.py
Retrieving speedtest.net configuration...
Testing from Hangzhou Alibaba Advertising Co.,Ltd. (47.93.40.53)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ChinaUnicom-5G (TianJin) [111.83 km]: 11.578 ms
Testing download speed................................................................................
Download: 105.55 Mbit/s
Testing upload speed................................................................................................
Upload: 1.73 Mbit/s
多种参数可供参考
[root@iZ2zed74kn7q0nv9z9nk4nZ ~]# ./speedtest.py --help
usage: speedtest.py [-h] [--no-download] [--no-upload] [--single] [--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.
用于使用speedtest.net测试internet带宽的命令行界面。
--------------------------------------------------------------------------
https://github.com/sivel/speedtest-cli

optional arguments:
  -h, --help            show this help message and exit  显示此帮助信息并退出
  --no-download         Do not perform download test 不要执行下载测试
  --no-upload           Do not perform upload test  不要执行上传测试
  --single              Only use a single connection instead of multiple. This simulates a typical file transfer. 只使用一个连接,而不是多个连接。这模拟典型的文件传输
  --bytes               Display values in bytes instead of bits. Does not affect the image generated by --share, nor output from --json or --csv  以字节而不是位显示值。不影响 --share 生成的图像
  --share               Generate and provide a URL to the speedtest.net share results image, not displayed with --csv  生成并提供指向 speedtest.net 共享结果图像的 URL
  --simple              Suppress verbose output, only show basic information 抑制详细输出,只显示基本信息
  --csv                 Suppress verbose output, only show basic information in CSV format. Speeds listed in bit/s and not affected by --bytes  抑制详细输出,仅显示基本信息以CSV格式。以位/秒为单位列出且不受影响的速度按--字节
  --csv-delimiter CSV_DELIMITER  Single character delimiter to use in CSV output.Default ","   要在CSV输出中使用的单字符分隔符。默认值“,”
  --csv-header          Print CSV headers  打印CSV标题
  --json                Suppress verbose output, only show basic information in JSON format. Speeds listed in bit/s and not affected by --bytes  抑制详细输出,仅显示基本信息JSON格式。以位/秒为单位列出的速度,而不是受--字节影响
  --list                Display a list of speedtest.net servers sorted by distance  显示按距离排序的 speedtest.net 服务器列表
  --server SERVER       Specify a server ID to test against. Can be supplied multiple times  指定要测试的服务器 ID
  --exclude EXCLUDE     Exclude a server from selection. Can be supplied multiple times 从选择中排除服务器。可以提供多次
  --mini MINI           URL of the Speedtest Mini server  Speedtest Mini 服务器的 URL
  --source SOURCE       Source IP address to bind to  要绑定到的源 IP 地址
  --timeout TIMEOUT     HTTP timeout in seconds. Default 10  HTTP 超时(以秒为单位)。默认 10
  --secure              Use HTTPS instead of HTTP when communicating with speedtest.net operated servers   与speedtest.net运营的服务器通信时使用HTTPS而不是HTTP
  --no-pre-allocate     Do not pre allocate upload data. Pre allocation is enabled by default to improve upload performance. To  support systems with insufficient memory, use this option to avoid a MemoryError 不要预先分配上传数据。预分配是默认情况下启用以提高上载性能。到支持内存不足的系统,请使用此选项避免内存错误的选项
  --version             Show the version number and exit   显示版本号并退出