Re: [systemd-devel] How to get hardware watchdog status when using systemd
Hi Lennart, On 28.05.2019 14:02, Lennart Poettering wrote: The kernel devices are currently single-use only. Most of these fields are exported via sysfs too however: grep . /sys/class/watchdog/watchdog0/* Oh, that's very useful and indeed, there is timeleft property there and it's changing. 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! The bug has been filed under this URL: https://github.com/karelzak/util-linux/issues/804 Thank you for your assistance! Kind regards, Wiktor -- https://metacode.biz/@wiktor ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to get hardware watchdog status when using systemd
On 28.05.2019 14:00, Zbigniew Jędrzejewski-Szmek wrote: This currently isn't exported by systemd, and there's even no log message at debug level. I guess this could be exposed, but I don't think it'd be very useful. If the watchdog ping works, most people don't need to look at it. If it doesn't, the machine should reboot... Yes. Maybe I should be more clear in my goal: enabling the systemd option to ping the watchdog doesn't have any visible effects until the system hangs. I wanted to see an "effect" without resorting to "echo c > /proc/sysrq-trigger". If this is just for debugging, you can do something like sudo strace -e ioctl -p 1 and look for WDIOC_KEEPALIVE. Yes, this is exactly what I was looking for! As far as I can see adding "-r" to strace prints nice relative times that correspond to the "RuntimeWatchdogSec" value. Thank you very much! Kind regards, Wiktor -- https://metacode.biz/@wiktor ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] How to get hardware watchdog status when using systemd
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 Kind regards, Wiktor [0]: https://karelzak.blogspot.com/2012/05/eject1-sulogin1-wdctl1.html -- https://metacode.biz/@wiktor ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] How to get hardware watchdog status when using systemd
Hello, I've enabled "RuntimeWatchdogSec=30" in /etc/systemd/system.conf (after reading excellent "systemd for Administrators" series [0]). Before enabling that "wdctl" printed nice statistics but now it only informs that the "watchdog already in use, terminating." I guess this is obvious as systemd is using /dev/watchdog now but is there a way to get more statistics about watchdog from systemd? Journal has only basic info that the setting is enabled: $ journalctl | grep watchdog kernel: NMI watchdog: Enabled. Permanently consumes one hw-PMU counter. systemd[1]: Hardware watchdog 'iTCO_wdt', version 0 systemd[1]: Set hardware watchdog to 30s. Thank you in advance! Kind regards, Wiktor [0]: http://0pointer.de/blog/projects/watchdog.html -- https://metacode.biz/@wiktor ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel