News for hackers. Stuff that matters.
Re:Use This Kernel Parameter in Your Kiosk by noodlesUK on Friday November 18, 2022 @08:55PM (#33665889)
Is there some way of accessing this from user space on Linux?
Re:Use This Kernel Parameter in Your Kiosk by jesse_cureton on Friday November 18, 2022 @09:05PM (#33665959)
Yes! There’s an ioctl interface for managing the watchdog, and a character device at /dev/watchdog. The kernel docs[1] are a decent jumping off point to learn more.

Upon reading these I did realize on Linux it’s implemented as a kernel device, but it’s usually a userspace task that has to notify the kernel watchdog interface to actually kick the timer. This makes sense, since userspace being functional is probably what you really care about.

[1] https://www.kernel.org/doc/html/latest/watchdog/watchdog-api...

Re:Use This Kernel Parameter in Your Kiosk by touisteur on Saturday November 19, 2022 @02:49AM (#33668026)
One of the preternal problems of such hardware watchdogs was the inability to discriminate whether a sudden reboot was due a reset-button, hw security (e.g. temperature), ECC problem, or (micro) loss of power, or HW watchdog.

On most IPMI-capable BIOS/firmware there's now (been for 10 years but I'm old) an option to log 'system' events (ipmi failures like fan speeds if you've set threshold, but also reboot reasons). It's call the System Event Log. Very useful.

And on IPMI-plugged watchdogs, you can also see the state of the HW watchdog (is it running, how many seconds are left). Very useful too.

Re:Use This Kernel Parameter in Your Kiosk by amluto on Friday November 18, 2022 @09:04PM (#33665955)
https://www.kernel.org/doc/html/latest/watchdog/watchdog-api...

Many x86 systems have a built in hardware watchdog.

Re:Use This Kernel Parameter in Your Kiosk by AnssiH on Saturday November 19, 2022 @03:37AM (#33668303)
In addition to those already mentioned, one way is to enable it in systemd:

  # /etc/systemd/system.conf.d/foobar.conf
  [Manager]
  RuntimeWatchdogSec=60
When used in this manner, if systemd fails to ping the watchdog for 60 seconds, the system resets.

https://www.freedesktop.org/software/systemd/man/systemd-sys...