Is there an app for the Mac that will alert me if my Internet connection is lost?

Sometimes I work from home and lose my connection without knowing it.


The following script will alert you when your wireless network no longer has a connection. Though you could modify the script to require a check to locate a specific SSID, the following script simply looks for any wireless network connection. The script can be run via a Launch Daemon (login option preferred) or by simply running the script manually when you decide.

Alert mechanism:

If you do not have a wireless network connection the script will set your volume to be set at its maximum, you will then hear an alert beep and the following phrase "your wireless network has been disconnected".

NOTE: This script contains an internal loop. The loop is designed to sleep for 2 min intervals so as not to constantly beep and verbalize said phrase. This interval can be modified to your liking by modifying the "SLEEP_TIMER" variable found within the script.

ALSO: If you are interested in setting up a Launch Daemon but do not have a lot of experience with Daemons, I recommend using Lingon (was once free but Lingon 3 is $2.99).

Tested on:

  • 10.5.x
  • 10.6.x
  • 10.7.4

Please remember to utilize a testing environment prior to running on your primary environment. Feel free to modify the script in any way that suits you, enjoy.


# MONITOR_SSID set as true will keep a loop going (Loop timer 1 minute delay)



while ( ${MONITOR_SSID} == true ); do

    SSID=$(networksetup -getairportnetwork en1 | sed "s:.*\: ::g" | tr -s "[\n]" "[ ]" | sed 's/.*off.*/OFF/g')

    if [[ ${SSID} == "OFF" ]]; then
        osascript -e 'set volume 10'
        afplay -v 2 /System/Library/Sounds/Sosumi.aiff
        say "Wireless network has been disconected"
    elif [[ ${SSID} != "OFF" ]]; then
        /usr/bin/logger -i Error has occured while 'your_script_name' was attempting to run

    sleep ${SLEEP_TIMER}


You can use ping -A IP, it will automatically give you a beep when their is any timeout, the reverse of it is ping -a IP which keeps beeping until the any timeout.

  • Simple and effective. Nice. – Jeshizaemon Mar 18 at 2:41

Growl manages this as well as alerts from all manner of other events, including from the many apps which support it, quite well.


You might be able to use ControlPlane for this.

If you take a look at the features list, it suggests that you can use the "state of the network link, connected or disconnected" as an "evidence source". Once this indicates its been disconnected (or reconnected again), you can perform a practically limitless set of "actions". Some that immediately spring to mind are to display a Growl notification or speak some text.


I use pingdom for this and they have a free plan for a single monitoring trigger as well as a free iOS app. It's geared to more system administrator, but could be of use to you if you don't mind spending some time to configure a service that would then be free to use.


Open osx terminal and type this:

ping -A <ip_address>

example (with one of google's IP addresses):

ping -A

it will make a beeping sound when ping fails.

Please note that ping might sometimes fail even if network is available, but that should happen less than 1% of the times.

  • For the benefit of the OP and others, you may want to explain how to do the ping. At present, your answer assumes the OP and others will know where to type the ping -A. – Monomeeth Dec 10 '16 at 10:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .