Package Name
watchcat
Maintainer
Roger D rogerdammit@gmail.com (@roger- )
OpenWrt Version
24.10.4
OpenWrt Target/Subtarget
x86/64
Steps to Reproduce
- Install and enable
watchcat.
- Configure a rule with:
mode='restart_iface'
period='5'
pingperiod='1s'
pinghosts='203.0.113.1'
interface='br-lan'
- Restart the service:
/etc/init.d/watchcat restart
- Observe the logs:
Actual Behaviour
When the host remains unreachable, watchcat keeps restarting the
interface repeatedly during the same outage.
Example log output:
Wed May 6 14:46:55 2026 daemon.info watchcat[22624]: Could not reach 203.0.113.1 via "br-lan" for "10" seconds. Restarting "br-lan" after reaching "5" seconds
Wed May 6 14:46:55 2026 daemon.info watchcat[22624]: Restarting network interface: "br-lan".
Wed May 6 14:47:05 2026 daemon.info watchcat[22624]: Could not reach 203.0.113.1 via "br-lan" for "10" seconds. Restarting "br-lan" after reaching "5" seconds
Wed May 6 14:47:05 2026 daemon.info watchcat[22624]: Restarting network interface: "br-lan".
Wed May 6 14:47:15 2026 daemon.info watchcat[22624]: Could not reach 203.0.113.1 via "br-lan" for "10" seconds. Restarting "br-lan" after reaching "5" seconds
Wed May 6 14:47:15 2026 daemon.info watchcat[22624]: Restarting network interface: "br-lan".
This continues roughly once per check cycle while the outage persists.
The issue appears to be that restart_iface resets the failure timer
using a timestamp taken before the recovery action runs. If the restart
itself takes longer than the configured period (the time taken for interface
down and up in simple words), the next failed check can
immediately exceed the threshold again and trigger another restart.
Confirmation Checklist
Package Name
watchcat
Maintainer
Roger D rogerdammit@gmail.com (@roger- )
OpenWrt Version
24.10.4
OpenWrt Target/Subtarget
x86/64
Steps to Reproduce
watchcat.mode='restart_iface'period='5'pingperiod='1s'pinghosts='203.0.113.1'interface='br-lan'logread | grep watchcatActual Behaviour
When the host remains unreachable,
watchcatkeeps restarting theinterface repeatedly during the same outage.
Example log output:
This continues roughly once per check cycle while the outage persists.
The issue appears to be that
restart_ifaceresets the failure timerusing a timestamp taken before the recovery action runs. If the restart
itself takes longer than the configured period (the time taken for interface
down and up in simple words), the next failed check can
immediately exceed the threshold again and trigger another restart.
Confirmation Checklist