以下是一个详细的 ping 命令示例:

1
ping -n 10 example.com

这个命令会向 example.com 发送 10 个 ICMP 请求。你可以将 example.com 替换为你要测试的 VPS 的域名或 IP 地址。

运行这个命令后,你会看到类似以下的输出:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Pinging example.com [93.184.216.34] with 32 bytes of data:
Reply from 93.184.216.34: bytes=32 time=30ms TTL=54
Reply from 93.184.216.34: bytes=32 time=29ms TTL=54
Reply from 93.184.216.34: bytes=32 time=31ms TTL=54
Reply from 93.184.216.34: bytes=32 time=30ms TTL=54
Reply from 93.184.216.34: bytes=32 time=28ms TTL=54
Reply from 93.184.216.34: bytes=32 time=32ms TTL=54
Reply from 93.184.216.34: bytes=32 time=30ms TTL=54
Reply from 93.184.216.34: bytes=32 time=29ms TTL=54
Reply from 93.184.216.34: bytes=32 time=31ms TTL=54
Reply from 93.184.216.34: bytes=32 time=30ms TTL=54

Ping statistics for 93.184.216.34:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 28ms, Maximum = 32ms, Average = 30ms

解释和参考范围值

  1. time(延迟时间):

    • 范围值
      • 0-30ms:非常好,适用于对延迟要求高的应用。
      • 30-50ms:良好,适用于大多数实时应用。
      • 50-100ms:中等,适用于一般的互联网应用。
      • 100ms以上:较差,可能影响实时应用体验。
    • 示例time=30ms 表示延迟为 30 毫秒。
  2. TTL(Time To Live):

    • 范围值
      • 50-64:路径较短,网络性能较好。
      • 30-50:路径中等,网络性能一般。
      • 30以下:路径较长,可能有较高延迟。
    • 示例TTL=54 表示数据包经过了 10 个路由器(假设初始 TTL 值为 64)。
  3. Packets: Sent, Received, Lost(数据包发送、接收和丢失):

    • 范围值
      • 丢包率 0%:非常好,网络连接稳定。
      • 丢包率 1-2%:良好,网络连接较稳定。
      • 丢包率 2%以上:较差,网络连接不稳定。
    • 示例Packets: Sent = 10, Received = 10, Lost = 0 (0% loss) 表示没有数据包丢失,网络连接非常稳定。
  4. Approximate round trip times(往返时间):

    • 范围值
      • Minimum, Maximum, Average:参考上面的延迟时间范围值。
    • 示例Minimum = 28ms, Maximum = 32ms, Average = 30ms 表示最小延迟为 28 毫秒,最大延迟为 32 毫秒,平均延迟为 30 毫秒。

通过这些信息,你可以全面了解 VPS 的网络性能,并根据参考范围值选择一个网络速度和稳定性较好的 VPS。