22: Configuring Connection Watch (cwatch)
_______________________________________________________________________________________________________
_______________________________________________________________________________________________________
© Virtual Access 2018
GW2020 Series User Manual
Issue: 2.1
Page 224 of 423
22.3.1
cwatch using UCI
root@VA_router:~# uci show cwatch
cwatch.WATCH_MOBILE=watch
cwatch.WATCH_MOBILE.enabled=1
cwatch.WATCH_MOBILE.test_ifaces=wan
cwatch.WATCH_MOBILE.failure_time_1=1h
cwatch.WATCH_MOBILE.failure_action_1=ifup wan
cwatch.WATCH_MOBILE.failure_time_2=10h
cwatch.WATCH_MOBILE.failure_action_2=/etc/init.d/usb_startup restart
cwatch.WATCH_MOBILE.failure_time_3=24h
cwatch.WATCH_MOBILE.failure_action_3=reboot
22.3.2
cwatch using package options
root@VA_router:~# uci export cwatch
package cwatch
config watch 'WATCH_MOBILE'
option enabled '1'
option test_ifaces wan
option failure_time_1 '1h'
option failure_action_1 'ifup wan
option failure_time_2 '10h'
option failure_action_2 '/etc/init.d/usb_startup restart'
option failure_time_3 '24h'
option failure_action_3 'reboot'
22.4
cwatch diagnostics
22.4.1
Syslog
A syslog message will be generated when cwatch starts:
cwatch[x]: cwatch configuration OK. Entering main loop...
Syslog messages will be generated when the failure action is triggered:
cwatch[x]: Watch WATCH_MOBILE executed action 1
cwatch[x]: Watch WATCH_MOBILE executed action 2
cwatch[x]: Watch WATCH_MOBILE executed action 3