Linux 命令行利用 speedtest 测速
1、下在 OOKLA 测速工具
wget --no-check-certificate -qO speedtest.tgz https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-$(uname -m)-linux.tgz
2、解压 OOKLA 测速工具
tar xvf speedtest.tgz
3、执行测速命令行,自动选择服务器
./speedtest -p no --accept-license
如果,需要测试指定服务器:
可以先通过 ./speedtest -L 或者 ./speedtest --servers 命令行,列出一部分可选的测试节点服务器。
Closest servers:
    ID  Name                           Location             Country
 ==============================================================================
   1536  STC                            Hong Kong            Hong Kong
  44340  Telstra International          Hong Kong            Hong Kong
  28912  fdcservers.net                 Hong Kong            Hong Kong
  44745  Misaka Network, Inc.           Hong Kong            Hong Kong
  57779  ラタトスク                Hong Kong            Hong Kong
  60177  Club SIM by HKT                Hong Kong            Hong Kong
  60178  Sun Mobile                     Hong Kong            Hong Kong
  69119  RFCHOST                        Hong Kong            Hong Kong
  62191  Finovy Pte. Ltd.               Hong Kong            Hong Kong
  68983  RETN                           Hong Kong            Hong Kon
然后,执行测试命令行:
speedtest-cli/speedtest -p no -s 69119 --accept-license
但正确命令行,执行方式应为:
speedtest-cli/speedtest -p no --server-id=69119 --accept-license
测试成都移动:
./speedtest -p no -s 4575 --accept-license
测试报告结果:
[2025-04-28 05:18:17.171] [error] Trying to get interface information on non-initialized socket.
Speedtest by Ookla
     Server: China Mobile Group Sichuan - Chengdu (id = 4575)
         ISP: DMIT
     Latency:    54.51 ms   (0.03 ms jitter)
    Download:  3133.09 Mbps (data used: 3.7 GB)                               
      Upload:  3115.47 Mbps (data used: 5.4 GB)                               
 Packet Loss: Not available.
  Result URL: https://www.speedtest.net/result/c/26818e0c-27c5-4e2a-b040-bc5f82eeffab
  
