while true ; do echo "`date`: `ping -qc1 domain-name | grep round-trip`"; sleep 5; done
A one-liner that does, in order:
- show the date/time
- show the *results* of a single ping (or nothing), on the same line
- wait 5 seconds
- do it all over again
And it simply does this til you kill it.
Why? Simply ping'ing doesn't give you any info on *when* things are happening - like when the server that you're waiting to reboot, did; or when the node you're testing stopped responding.
2 comments:
LOVELY! Just what I was looking for. Thank you.
Terrific; one does attempt to give back a little. :)
Post a Comment