How to verify if node reboot was triggered by the watchdog?
0
votes
1
answer
2186
views
I have created software watchdog device using command:
$ sudo modprobe softdog soft_margin=60
In OS log it is visible that software watchdog was initialized:
Jul 12 09:49:00 patroni4 kernel: softdog: Software Watchdog Timer: 0.08 initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
To trigger node reboot by the watchdog I have executed echo a | sudo tee /dev/watchdog
.
Node rebooted but in the logs there is no info that reboot was triggered by the watchdog.
If I set option soft_noboot=1
in the OS log there is message softdog: Triggered - Reboot ignored
.
Based on the watchdog implementation there should be log message when node reboot was triggered by the watchdog.
https://github.com/spacex/kernel-centos7/blob/master/drivers/watchdog/softdog.c
static void watchdog_fire(unsigned long data)
{
if (soft_noboot)
pr_crit("Triggered - Reboot ignored\n");
else if (soft_panic) {
pr_crit("Initiating panic\n");
panic("Software Watchdog Timer expired");
} else {
pr_crit("Initiating system reboot\n");
emergency_restart();
pr_crit("Reboot didn't ?????\n");
}
}
OS: CentOS Linux release 7.9.2009 (Core)
Linux lin1 3.10.0-1160.62.1.el7.x86_64
How can I verify if reboot was triggered by the watchdog?
Why this information is not logged? Can I enable logging somehow?
Thank you for the info
Asked by msutic
(1 rep)
Jul 12, 2022, 09:07 PM
Last activity: Jul 9, 2025, 12:04 PM
Last activity: Jul 9, 2025, 12:04 PM