After so many years, you think the
ping command couldn't get any better, right? Well, it may be common knowledge for a lot of sysadmins out there, but I sure as hell didn't know it yet: ping can make a sound when it can or can't ping a target.
This is super useful if you're reconfiguring a server's networking stack, and want to have immediate feedback when the server starts or stops ping'ing.
You can leave this ping running in the background and focus on your main task, it'll give you a clear but subtle beep when the server starts/stops replying to ping requests.
Note: this works natively on Mac OSX, for Windows you'll need something like bping and on Linux there's only limited audible support (ping can only make a sound when it can ping the target).
Beep when a server starts ping'ing
Situation: a server is down, you're trying to fix the networking and want an immediate heads-up when it starts to ping.
$ ping -a 22.214.171.124
-a (lower case a) causes an audible bell whenever the target replies to a ping.
Include a bell (ASCII 0x07) character in the output when any packet
is received. This option is ignored if other format options are present.
Beep when a server stops ping'ing
Note: only supported on Mac OSX as far as I'm aware.
Situation: you're reconfiguring a server that's currently online, and want to know it the moment one IP stops replying (because you shutdown an interface that didn't come up, for instance).
ping -A 126.96.36.199
In this case we use the uppercase
A parameter to send us a beep sound whenever the target stops replying to our ping.
Output a bell (ASCII 0x07) character when no packet is received
before the next packet is transmitted. To cater for round-trip times that
are longer than the interval between transmissions, further missing packets
cause a bell only if the maximum number of unreceived packets has increased.
Now I no longer need to keep a visual eye on the status of my ping's, I can just rely on the sound coming through my headset.
Hooray for obsessive efficiency!