Use Terminal to Ping With Timestamp - Purple Computing
network

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 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 page.

Date Comments
Sep 15th Jack and Diogo were very supportive and tried a few methods to solve the issues on my macbook. Gabi was also very supportive and resolved the issue with my macbook.
Sep 11th Super quick which was greatly appreciated given the time pressure, thank you.
Sep 10th It took too long to get it sorted. Phillip was the one who fixed the issue. Thank you.
Sep 8th Chris was fantastic
Sep 4th Issue was rectified quickly and the person who helped me politely and gave me great confidence
Sep 4th Jack sorted in no time. Thank you Jack!
Sep 4th Jack was fast straight to the point and he solved everything.
Sep 2nd Jack is always awesome!! Always solves the issue and goes above and beyond to sort the problem out. Can't fault!
Aug 27th I did have to wait but in the end it was very professional support, thank you.
Aug 26th Jack was fab as always, thank you. Response time was slower than usual though.