The Ping That Makes a Sound

Mattias Geniar, Monday, October 5, 2015

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

The -a (lower case a) causes an audible bell whenever the target replies to a ping.

-a Audible.

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

In this case we use the uppercase A parameter to send us a beep sound whenever the target stops replying to our ping.

-A Audible.

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!

Hi! My name is Mattias Geniar. I'm a Support Manager at Nucleus Hosting in Belgium, a general web geek & public speaker. Currently working on DNS Spy & Oh Dear!. Follow me on Twitter as @mattiasgeniar.

Share this post

Did you like this post? Will you help me share it on social media? Thanks!


kyokorn Friday, March 2, 2018 at 17:36 - Reply

I looking for a program to monitoring with a sound a server down, but is not necessary with this command! thank you so much for this

Leave a Reply

Your email address will not be published. Required fields are marked *