ping with timestamps

Use this snippet Show archive.org snapshot by Achu Show archive.org snapshot from Ask Ubuntu Show archive.org snapshot :

ping hostname.tld | while read pong; do echo "$(date): $pong"; done

This gives you lines like:

Wed Nov  4 10:32:31 CET 2015: 64 bytes from 1.2.3.4: icmp_seq=298 ttl=61 time=0.673 ms
Wed Nov  4 10:32:32 CET 2015: 64 bytes from 1.2.3.4: icmp_seq=299 ttl=61 time=0.616 ms
Wed Nov  4 10:32:33 CET 2015: 64 bytes from 1.2.3.4: icmp_seq=300 ttl=61 time=1.04 ms
Henning Koch Over 8 years ago