是否可以将系统时间放在每个 ping 数据包的 ping 前面?
例如,当我每秒 ping 1000 次时,我们会看到如下内容:
# ping 9.0.0.150 -i 0.001
PING 9.0.0.150 (9.0.0.150) 56(84) bytes of data.
64 bytes from 9.0.0.150: icmp_req=1 ttl=64 time=0.531 ms
64 bytes from 9.0.0.150: icmp_req=2 ttl=64 time=0.473 ms
64 bytes from 9.0.0.150: icmp_req=3 ttl=64 time=0.472 ms
64 bytes from 9.0.0.150: icmp_req=4 ttl=64 time=0.497 ms
我想要的是这样的:
# ping 9.0.0.150 -i 0.001
PING 9.0.0.150 (9.0.0.150) 56(84) bytes of data.
12345123.122122 64 bytes from 9.0.0.150: icmp_req=1 ttl=64 time=0.531 ms
12345123.123122 64 bytes from 9.0.0.150: icmp_req=2 ttl=64 time=0.473 ms
12345123.124122 64 bytes from 9.0.0.150: icmp_req=3 ttl=64 time=0.472 ms
12345123.125122 64 bytes from 9.0.0.150: icmp_req=4 ttl=64 time=0.497 ms
其中前缀中的数字是系统时间。