How does one check the status of the hardware watchdog with systemd?
With util-linux
you have the wdctl
command which prints some information, however this doesn't always work (e.g. on a Raspberry Pi 3 or later). For example on a Pi 3:
# wdctl /dev/watchdog0
wdctl: cannot read information about /dev/watchdog0: No such file or directory
# wdctl /dev/watchdog
wdctl: cannot read information about /dev/watchdog: No such file or directory
However the watchdog appears to be active:
# dmesg | grep watchdog
[ 6.985782] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 17.190956] systemd[1]: Using hardware watchdog 'Broadcom BCM2835 Watchdog timer', version 0, device /dev/watchdog
[ 17.206391] systemd[1]: Set hardware watchdog to 15s.
So is there a systemd-specific command that can be used to display the current status of the hardware watchdog and what systemd itself is doing with it?
Note that the old watchdog service no longer applies, as this was from before systemd got native hardware watchdog support:
# systemctl status watchdog
Unit watchdog.service could not be found.
I am after a command that provides similar information to wdctl
, in that the watchdog timer is active, in use, and what the timeout is currently set to. Sort of like systemctl list-timers
but for the hardware watchdog.