network

How To: Use Terminal to Ping With Timestamp (For Network Troubleshooting)

Tech How-To Troubleshooting How To: Use Terminal to Ping With Timestamp (For Network Troubleshooting)
By James Hart | Posted in Troubleshooting

On macOS, this is a useful Terminal command to ping a network device repeatedly at a set internal, and log the timestamp with the ping reply.

This technique is good to evaluate the availability of a network device over a period time, if for example you suspect that a device or server is dropping off the network randomly (or not responding) at certain times of day.

You can use the -i flag to set a longer interval in seconds, which makes the ping output log easier to look through over an extended period. By default, ping will run every second, which can make it rather tedious when looking back through your ping results to find any significant dropouts.

ping -i 10 8.8.8.8 |¬†while read pong; do echo “$(date): $pong”; done

The above command will ping the IP address 8.8.8.8 (Google DNS) every 10 seconds (-i 10) and will timestamp the corresponding pongs.

Real-Time Feedback

When we solve a support ticket, clients are given the choice of leaving good or bad feedback along with an optional comment. We post the 10 most recent comments here automatically and in real-time. You can view even more on our reviews page.

Date Name Comments
Feb 19th Jack T Thank you!
Feb 18th Account... Lochie always sorts my queries out, thanks
Feb 14th Craig B Always a quick reponse time, always willing to help. Thanks Craig
Feb 6th Emily C Quick and very helpful service as always, thank you Lochie
Jan 23rd maddock... What a relief ! Extremely professional, friendly and above all knowledgeable...thank you so much James for helping to unravel our Mac mystery! We hope we won't need you again, but you are know our go to! Joyce & David Maddocks
Jan 22nd Lynn H Very efficient service. problem identified and rectified quickly. PC all up and running again. Many thanks Lynn
Jan 16th Jacqui F Fast and efficient.
Jan 8th Karen W Thank you so much Happy New Year Kind regards Karen
Dec 31st Laura D Exceptional support yet again had me back up and running in 15 minutes from me discovering problem and you were meant to be closed for Christmas. Thank you Lochie
Dec 19th Emily C Helpful and quick service as always, thank you