[systemd-devel] How to get hardware watchdog status when using systemd

Lennart Poettering lennart at poettering.net
Tue May 28 12:02:33 UTC 2019


On Di, 28.05.19 13:50, Wiktor Kwapisiewicz (wiktor at metacode.biz) wrote:

> Hi Zbyszek,
>
> On 28.05.2019 13:43, Zbigniew Jędrzejewski-Szmek wrote:
> > What kind of information are you after?
>
> One interesting statistic I'd like to see changing is the time when the
> watchdog was notified last.
>
> For example, there is Timeleft in this wdctl output [0]:
>
>   # wdctl
>   Identity:      iTCO_wdt [version 0]
>   Timeout:       30 seconds
>   Timeleft:       2 seconds
>
>   FLAG           DESCRIPTION               STATUS BOOT-STATUS
>   KEEPALIVEPING  Keep alive ping reply          0           0
>   MAGICCLOSE     Supports magic close char      0           0
>   SETTIMEOUT     Set timeout (in seconds)       0           0
>

The kernel devices are currently single-use only. Most of these fields
are exported via sysfs too however:

    grep . /sys/class/watchdog/watchdog0/*

I think it might make sense if util-linux' wdctl would alternatively
use the sysfs API for querying these bits, it should be fairly easy to
add, please file a bug requesting that on util-linux github page!

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list