This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
connectivity_watchdog [2021/02/22 21:49] – edited for clarity hogwild | connectivity_watchdog [2023/07/02 16:47] – [Notes about Connectivity Watchdog] -changed to Connectivity Watchdog Notes 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 custom task script | + | For various reasons, you might want to monitor your Internet connectivity. The simplest way to do this is to run a custom task script. The basic command structure might look something like this: |
- | The basic command would be something like: | + | For example, in the [[admin-sched|Scheduler]] menu, in the** **//Custom 1 field:// |
- | **/ | + | \\ |
- | (8.8.4.4. is a google DNS server) which would cover the monitoring part without performing any action. | + | <code -> |
+ | /bin/ping -q -c1 8.8.4.4 | ||
+ | </ | ||
- | In order to link an action to a success (&& | + | \\ The 8.8.4.4. IP address is a google DNS server. This scheduled command would allow monitoring without requiring any further interaction with the user. |
+ | |||
+ | Next, in order to link an action to a success (&& | ||
+ | |||
+ | \\ | ||
For example: | For example: | ||
+ | \\ | ||
+ | | ||
+ | <code -> | ||
+ | #if ping fails, restart the wan. | ||
+ | /bin/ping -q -c1 8.8.4.4 || / | ||
+ | |||
+ | # 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 && / | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | |||
+ | \\ | ||
- | **/bin/ping -q -c1 8.8.4.4 || / | ||
- | **/bin/ping -q -c1 8.8.4.4 || / | + | ===== Connectivity Watchdog Notes ===== |
- | **/bin/ping -q -c1 8.8.4.4 && | + | This script is a custom one. Please note that there is also a setting in FreshTomato' |