Ping results with timestamp
It's sometimes useful to debug an issue to know when a host, which responds to ping, stops responding to pings and starts again.
Unfortunately the standard Linux ping tool does not have such functionality directly, but the following one-liner will do the trick:
HOST="yahoo.com" ; ping ${HOST} | while read pong; do echo "$(date): $pong"; done
The output looks like the following:
Unfortunately the standard Linux ping tool does not have such functionality directly, but the following one-liner will do the trick:
HOST="yahoo.com" ; ping ${HOST} | while read pong; do echo "$(date): $pong"; done
The output looks like the following:
Comments
Post a Comment