2

Linux supports several types of watchdog hardware.

Is there a way to detect the available hardware watchdogs and load the appropriate kernel module (and "softdog" as fallback solution)?

I guess, just trying all available kernel modules is not an optimal solution.


EDIT:

I am surprised that modern systems do not have some kind of watchdog timer built into the CPU (at least no module is loaded for an AMD Athlon II). Are hardware watchdogs rare on consumer/prosumer systems?

Black
  • 188
  • 1
  • 13

1 Answers1

2

Typically, if they are available, the kernel does load all modules that correspond to hardware found in the system during boot-up. If, for some reason, these devices are blacklisted or otherwise ignored during boot-up, you could use the lspci/lsusb utilities to see what hardware is attached to the system and respond accordingly.

As far as loading "softdog", that's a matter of some proper scripting around the tools above.

Kyle Smith
  • 9,683
  • 1
  • 31
  • 32
  • If the kernel does load such a driver, will it show up in the kernel message buffer? – Black Mar 30 '12 at 13:12
  • 1
    It should show up in `dmesg` and `/var/log/messages` (depending on your syslog configuration). `dmesg` does have a maximum length, though. You should also be able to see it in the output of `lsmod`. – Kyle Smith Mar 30 '12 at 13:17
  • `dmesg | grep wd` should show you something sensible if your system actually loaded the driver automatically. My system seems to support `iTCO_wdt` but that was not automatically loaded. – Mikko Rantalainen Aug 16 '22 at 20:46