如何 ping 计算机/服务器并分别获取传输和接收时间,而不是获取一个往返时间。我正在使用 hrping,我可以从本地网络上的计算机获取传输和接收时间。
D:\Portable\hrping>hrping 192.168.1.1 -M
This is hrPING v5.07.1148 by cFos Software GmbH -- http://www.cfos.de
Source address is 192.168.1.17; using ICMP timestamp, ID=801c
Pinging 192.168.1.1 [192.168.1.1]
with 0 bytes data (40 bytes IP):
From 192.168.1.1: bytes=40 seq=0001 TTL=64 ID=62f3 time=0.626ms tx=1ms rx=0ms
From 192.168.1.1: bytes=40 seq=0002 TTL=64 ID=62f4 time=0.923ms tx=1ms rx=0ms
From 192.168.1.1: bytes=40 seq=0003 TTL=64 ID=62f5 time=0.336ms tx=1ms rx=-1ms
From 192.168.1.1: bytes=40 seq=0004 TTL=64 ID=62f6 time=0.320ms tx=1ms rx=-1ms
Packets: sent=4, rcvd=4, error=0, lost=0 (0.0% loss) in 1.502086 sec
RTTs in ms: min/avg/max/dev: 0.320 / 0.551 / 0.923 / 0.246
Bandwidth in kbytes/sec: sent=0.106, rcvd=0.106
但它不适用于互联网上的任何东西。
D:\Portable\hrping>hrping google.com -M
This is hrPING v5.07.1148 by cFos Software GmbH -- http://www.cfos.de
Source address is 192.168.1.17; using ICMP timestamp, ID=082b
Pinging google.com [172.217.16.238]
with 0 bytes data (40 bytes IP):
Timeout waiting for seq=0001
Timeout waiting for seq=0002
Timeout waiting for seq=0003
Timeout waiting for seq=0004
Packets: sent=4, rcvd=0, error=0, lost=4 (100.0% loss) in 1.503945 sec
RTTs in ms: min/avg/max/dev: 0.000 / 0.000 / 0.000 / 0.000
Bandwidth in kbytes/sec: sent=0.106, rcvd=0.000
我从 hrping 收到此消息,并设置了防火墙规则。仍然一无所有。
hrPing did not get any replies. This might be due to a firewall setting.
If you use Windows firewall with default settings, you need to add a rule to
allow hrPing full incoming ICMP traffic:
Go to Control Panel, Windows Firewall and click on Advanced settings on the
left. A new dialog appears: on its left pane right-click 'Inbound Rules' and
select 'New rule...' In the following wizard select 'Custom', click Next,
select 'All programs', click Next, select 'ICMPv4' as 'Protocol type', click
Next 4 times and enter 'hrPing' as 'Name' and click 'Finish'.
Don't forget to disable or delete this rule when you no longer need it!