如何通过 ssh 测试他们的 1gbps 服务器连接?

如何通过 ssh 测试他们的 1gbps 服务器连接?

我的 ubuntu 服务器有 1gbps 连接。如何通过 ssh 终端测试此连接?

答案1

对于一般的命令行互联网速度测试,您可以使用速度测试-cli

单行用法:

python3 <(curl -sL https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py)

笔记:上述命令假定您信任从以下位置检索到的 Python 3 代码https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

示例输出:

deltik@box1 [~]$ python3 <(curl -sL https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py) --server 17394
Retrieving speedtest.net configuration...
Testing from OVH Hosting (167.114.208.99)...
Retrieving speedtest.net server list...
Retrieving information for the selected server...
Hosted by Bell Canada (Toronto, ON) [3.18 km]: 19.545 ms
Testing download speed................................................................................
Download: 2366.49 Mbit/s
Testing upload speed......................................................................................................
Upload: 689.48 Mbit/s

如果你想测试你的服务器和你控制的客户端之间的速度,你可以使用iPerf3

首先在客户端和服务端都安装iPerf3,Ubuntu/Debian安装命令:

sudo apt install -y iperf3

在服务器上,iperf3以服务器模式运行:

iperf3 -s

在客户端上,运行以下命令之一来测试速度:

(替换XXX.XXX.XXX.XXX为您的服务器的 IP 地址。)

  • 客户端到服务器的 TCP 传输:

    iperf3 -c XXX.XXX.XXX.XXX
    
  • 服务器到客户端的 TCP 传输:

    iperf3 -R -c XXX.XXX.XXX.XXX
    

相关内容