My remote Glinet-B1300 OpenWRT router is stuck for some unknown reason and I just recall that some OpenWRT routers have hardware watchdog. So when I visit my sumerhouse. I will manually reboot and enable the watchdog.
I'm not familiar with this at all but it has got my attention
Might be missing something but it looks like:
procd starts watchdogd, then watchdogd pokes procd at the configured or default intervals.
When poked, procd checks all the services it has started, restarting each service if failed.
There does not seem to be a mechanism to soft or hard reboot the device.
It would be easy to write a service (init.d) script to check parameters of choice and [soft] reboot as required. How to do a hard reset by software?
But there can be many different "freezes".
A full on hardware freeze will stop watchdogd as well.
My question is what criteria does watchdog use to determine when to hard reset, and how does it do a hard reset? This must be hardware dependent and openwrt does not have hwreset command.
(This is where the usb monitor devices come into play)
I already tried that but i am not sure if this is the correct way and I will write down why i have my doubts. I tried the
echo c > /proc/sysrq-trigger in three cases:
Ubuntu 20.04 (VirtualBox) -> system crashed
OpenWRT (19.07.5 - APU2) with the watchdog enabled -> system rebooted 5 seconds afte the panic command, watchdog timeout=30sec
OpenWRT 19.07.5(VirtualBox) complete absence of watchdog -> exact same behavior as in OpenWRT case above.
By testing the last case it should crash just like in Ubuntu case, right ?
Am i missing something ?