Sometimes for troubleshooting purpose, we need timestamp with ping results.
Normal ping result
$ping www.google.com
Reply from 216.58.196.196: bytes=32 time=4ms TTL=57
Reply from 216.58.196.196: bytes=32 time=8ms TTL=57
Reply from 216.58.196.196: bytes=32 time=6ms TTL=57
Reply from 216.58.196.196: bytes=32 time=5ms TTL=57
Reply from 216.58.196.196: bytes=32 time=4ms TTL=57
Reply from 216.58.196.196: bytes=32 time=5ms TTL=57
Reply from 216.58.196.196: bytes=32 time=1089ms TTL=57
Reply from 216.58.196.196: bytes=32 time=5ms TTL=57
Reply from 216.58.196.196: bytes=32 time=195ms TTL=57
Ping Result with time stamp
$ping www.google.com | while read pong; do echo "$(date): $pong"; done
Tue Mar 27 13:00:00 IST 2018: 64 bytes from 216.58.196.196: icmp_seq=24707 ttl=62 time=0.377 ms
Tue Mar 27 13:00:01 IST 2018: 64 bytes from 216.58.196.196: icmp_seq=24708 ttl=62 time=0.428 ms
Tue Mar 27 13:00:02 IST 2018: 64 bytes from 216.58.196.196: icmp_seq=24709 ttl=62 time=0.380 ms
Tue Mar 27 13:00:03 IST 2018: 64 bytes from 216.58.196.196: icmp_seq=24710 ttl=62 time=0.408 ms
Tue Mar 27 13:00:04 IST 2018: 64 bytes from 216.58.196.196: icmp_seq=24711 ttl=62 time=0.549 ms
Tue Mar 27 13:00:05 IST 2018: 64 bytes from 216.58.196.196: icmp_seq=24712 ttl=62 time=0.382 ms
No comments:
Post a Comment