I’ve often wished for a way of logging pings when troubleshooting connectivity problems. Today I revisited the problem using fping.
fping6 both have options to run a continuous ping (
-l), and when combined with
-D to insert the unix timestamp, can log the latency and loss to a destination in 1s increments.
When working with unix timestamps, the following one-liner is handy:
perl -pe 's/(\d+)/localtime($1)/e'
This also logs the output to a file named www-pings.
The above commands can also all be combined onto one (modified to handle the precision of the unix timestamp)