connectivity_watchdog [FreshTomato Wiki]

Site Tools


Connectivity Watchdog

You might want to monitor your Internet connectivity. To do so the simpliest way is to run a regular task under Administration/Scheduler/Custom 1 e.g.

The besic command would be something like:

/bin/ping -q -c1

( being the a google DNS) which would cover the monitoring part without perform any action.

To link an action to success (&&) or failure (||) or both append the wanted condition + command


/bin/ping -q -c1 || /sbin/service wan restart #if ping fails restart the wan

/bin/ping -q -c1 || /sbin/reboot # if ping fails reboot the device

/bin/ping -q -c1 && /usr/bin/logger “Internet available” || /usr/bin/logger “Internet unavailable” # successful ping will log “Internet Available” where ping failure logs “Internet unavailable”


connectivity_watchdog.txt · Last modified: 2020/08/14 14:07 by rs232