speedtest-cli一键安装脚本

linux admin 11个月前 (06-26) 390次浏览 0个评论

前言

之前一直使用P3TERX大佬的脚本安装speedtest的cli版本,最近发现大佬的脚本已经无法运行speedtest测速了:

大佬的speedtest版本还是1.0.0,去speedtest官网看了下,最新的版本已经是1.2.0,于是就把大佬的脚本更新了下。

安装

Install Ookla Speedtest CLI

  • Install Ookla Speedtest CLI
curl -fsSL https://raw.githubusercontent.com/vpsxb/script-P3TERX/master/speedtest-cli.sh | sudo bash
  • Uninstall Ookla Speedtest CLI
sudo rm -f /usr/local/bin/speedtest

使用

speedtest 

   Speedtest by Ookla

      Server: 1010 - Hong Kong (id: 43356)
         ISP: AKILE LTD
Idle Latency:     2.26 ms   (jitter: 0.03ms, low: 2.22ms, high: 2.30ms)
    Download:  1445.10 Mbps (data used: 669.0 MB)                                                   
                  9.65 ms   (jitter: 0.85ms, low: 2.29ms, high: 12.66ms)
      Upload:  1514.78 Mbps (data used: 681.3 MB)                                                   
                  2.20 ms   (jitter: 0.13ms, low: 2.15ms, high: 4.60ms)
 Packet Loss: Not available.
  Result URL: https://www.speedtest.net/result/c/cf3c2e90-ddb5-44f0-acc4-d3499c86eed7
speedtest -h
Speedtest by Ookla is the official command line client for testing the speed and performance of your internet connection.

Version: speedtest 1.2.0.84

Usage: speedtest [<options>]
  -h, --help                        Print usage information
  -V, --version                     Print version number
  -L, --servers                     List nearest servers
  -s, --server-id=#                 Specify a server from the server list using its id
  -I, --interface=ARG               Attempt to bind to the specified interface when connecting to servers
  -i, --ip=ARG                      Attempt to bind to the specified IP address when connecting to servers
  -o, --host=ARG                    Specify a server, from the server list, using its host's fully qualified domain name
  -p, --progress=yes|no             Enable or disable progress bar (Note: only available for 'human-readable'
                                    or 'json' and defaults to yes when interactive)
  -P, --precision=#                 Number of decimals to use (0-8, default=2)
  -f, --format=ARG                  Output format (see below for valid formats)
      --progress-update-interval=#  Progress update interval (100-1000 milliseconds)
  -u, --unit[=ARG]                  Output unit for displaying speeds (Note: this is only applicable
                                    for ‘human-readable’ output format and the default unit is Mbps)
  -a                                Shortcut for [-u auto-decimal-bits]
  -A                                Shortcut for [-u auto-decimal-bytes]
  -b                                Shortcut for [-u auto-binary-bits]
  -B                                Shortcut for [-u auto-binary-bytes]
      --selection-details           Show server selection details
      --ca-certificate=ARG          CA Certificate bundle path
  -v                                Logging verbosity. Specify multiple times for higher verbosity
      --output-header               Show output header for CSV and TSV formats

 Valid output formats: human-readable (default), csv, tsv, json, jsonl, json-pretty

 Machine readable formats (csv, tsv, json, jsonl, json-pretty) use bytes as the unit of measure with max precision

 Valid units for [-u] flag: 
   Decimal prefix, bits per second:  bps, kbps, Mbps, Gbps
   Decimal prefix, bytes per second: B/s, kB/s, MB/s, GB/s
   Binary prefix, bits per second:   kibps, Mibps, Gibps
   Binary prefix, bytes per second:  kiB/s, MiB/s, GiB/s
   Auto-scaled prefix: auto-binary-bits, auto-binary-bytes, auto-decimal-bits, auto-decimal-bytes

 


VPS小白 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:speedtest-cli一键安装脚本
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址