This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| connectivity_watchdog [2021/02/22 21:35] – hogwild | connectivity_watchdog [2024/03/02 18:03] (current) – Fix scheduler link hogwild | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Connectivity Watchdog ====== | ====== Connectivity Watchdog ====== | ||
| - | You might want to monitor your Internet connectivity. The simplest way to do this is to run a regular  | + | For various reasons, you might want to monitor your Internet connectivity. The simplest way to do this is to run a custom  | 
| - | The besic command would be something like: | + | For example, in the [[:admin-sched|Scheduler]] menu, in the** **//Custom 1 field:// | 
| - | **/ | + | \\ | 
| - | (8.8.4.4. being the a google DNS) which would cover the monitoring part without perform any action. | + | <code -> | 
| + | /bin/ping -q -c1 8.8.4.4 | ||
| + | </ | ||
| - | To link an action to success (&& | + | \\ The 8.8.4.4. IP address is a google DNS server. This scheduled  | 
| - | Examples: | + | Next, in order to link an action to a success (&& | 
| - | **/bin/ping -q -c1 8.8.4.4 || / | + | \\ | 
| - | **/bin/ping -q -c1 8.8.4.4 || / | + | For example:  | 
| - | **/bin/ping -q -c1 8.8.4.4  | + | <code -> | 
| + | #if ping fails, restart the wan. | ||
| + | /bin/ping -q -c1 8.8.4.4 || /sbin/service wan restart | ||
| - | etc | + | # if ping fails, reboot the device. | 
| + | /bin/ping -q -c1 8.8.4.4 || / | ||
| + | |||
| + | # successful pings will log " | ||
| + | /bin/ping -q -c1 8.8.4.4 && / | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | ===== Connectivity Watchdog Notes ===== | ||
| + | |||
| + | This script is a custom one. Please note that there is also a setting in FreshTomato' | ||