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 Toby McConnell | 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
Nov 13th Sue T Excellent service and very prompt.
Nov 13th Craig B The quality of support recieved was fantastic again, They got back to me in good time, I have spoken to a couple of different people in the company and I must say the communication is great within the company. Thanks again James Hart for a brilliant set up.
Nov 11th george.... Prompt, polite and gave us confidence. Thanks
Nov 6th Darryl A Good job. Thanks
Oct 25th Debbie H Always helpful
Oct 17th helen.h... Thank you Lochie for your support with this and for making sure that the problem was resolved (even though it can't be)
Oct 16th Stuart T Very helpful and was exactly what I needed. Thanks Dean.
Oct 16th Sally H Thank you for the prompt action - I was stuck!!
Oct 16th Longcroft B Working perfectly, thanks Lochie
Oct 15th Craig B The support I received was fantastic and the issue was resolved in a great time. Thank you for all your time and efforts, it has been much appreciated.