Use Terminal to Ping With Timestamp - Purple Computing

How To: Use Terminal to Ping With Timestamp (For Network 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 | while read pong; do echo “$(date): $pong”; done

The above command will ping the IP address (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 page.

Date Name Comments
Nov 24th Andy K Exceptional service as always from the whole team, thank you Megan, Dean, Michael and Lochie : ) Many thanks, Chris and Andy
Nov 23rd Will Lochie, as always, was friendly, professional and fixed the problem (which was a dodgy virgin connection)
Nov 21st Walter O Purple Computing is our go too computer consultant. Competent, responsive, and focused on fixing our challenges permanently. I could not recommend Dean and his team more highly. They function as our IT department at a fraction of the cost.
Nov 20th Yvonne C Thanks Dean I didn’t expect such a prompt reply on a Sunday.! Much appreciated
Nov 18th Nigel T - well done James, great speedy service...
Nov 17th Sabira S very thorough and just one thing missed, which was fixed within 2 minutes of mentioning by email, top score...
Nov 15th Mark K Quick response that answered my question!
Nov 11th Leah E My issue was dealt with quickly and efficiently. I can't fault the service.
Nov 10th Ceri C Excellent service as always
Nov 7th Karen W Thank you Lochie for responding so quickly today Kindest regards Karen Book Keeper Space Kitchens & Bathrooms Ltd