Linux Watchdog?

I would like to have Linux watchdog in my Clear Linux. Is it possible?

1 Like

That would be nice, good idea.

I have been looking for some information and in bundle openstack-common | Clear Linux* Project watchdogd is added. But trying to deploy it I can’t. It is still unavailable?

systemd is the main system and process supervisor in Clear Linux. systemd has support for hardware and software watchdogs. Can that fit your needs?

I am able to launch watchdogd with systemctl, but it is necessary to use a “/dev/watchdog” to make it active/running. The issue is due to find this watchdog.

What I meant was that systemd has its own hardware watchdog functionality, separate from watchdogd.

You’ll need to create a /etc/systemd/system.conf.d/*.conf
See systemd-system.conf

To be honest I have never used either personally though. It looks like # CONFIG_WATCHDOG is not set in our kernel is not set. I’m guessing that is required here. @miguelinux is this something we can enable without impacting other things?

To be honest I have never used either personally though. It looks like # CONFIG_WATCHDOG is not set in our kernel is not set. I’m guessing that is required here. @miguelinux is this something we can enable without impacting other things?

Yes, CL disabled kernel watchdog, because the hardware watchdog will reset the system (causing a reboot) after the timeout occurs,
and sometimes is better to get the platform “alive” after an incident.

So It is not possible to enable kernel watchdog? Is there any way to obtain watchdog functionality?

In particular, I would like to implement iTCO_wdt module for Intel chipsets.

Well, I am trying to modify property

#CONFIG_WATCHDOG is not set to CONFIG_WATCHDOG=y

in .config file. After that I

make build

and the following error appears.

Finish: dnf install
ERROR: Exception(linux.spec) Config(clear) 0 minutes 23 seconds
INFO: Results and/or logs in: results/
ERROR: Command failed:
/usr/bin/systemd-nspawn -q -M d71b1149a2424c24bf085e25a3911213 -D /var/lib/mock/clear-linux/root -a --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf “\033]0;\007” --setenv=PS1= \s-\v$ --setenv=LANG=en_US.UTF-8 /usr/sbin/useradd -m -u 0 -g 302 -d /builddir mockbuild
make: *** […/common/Makefile.common:117: results/linux-5.4.6-883.src.rpm] Error 4

What can I do to solve this error?

I created a request on GitHub to evaluate enabling CONFIG_WATCHDOG here so it doesn’t get forgotten about: enable CONFIG_WATCHDOG · Issue #1618 · clearlinux/distribution · GitHub

As far as compiling your own kernel with this change, are you following the steps here? https://docs.01.org/clearlinux/latest/guides/kernel/kernel-development.html I just tried with 5.4.6 and it worked.

I solved the problem related including watchdog module, using kernel modules. So now, /dev/watchdog exists.
Having it, I installed the bundle openstack-common which includes watchdogd daemon via systemctl
Before that, I included the file watchdogd.conf with the following content (I want to monitorize pinging to an IP address)

admin@clr-aa34762852fd4e658857ba0b2c6e5``5cf/etc $ cat watchdogd.conf
ping = 192.168.3.197
watchdog-device = /dev/watchdog
watchdog-timeout = 14
interval = 1

As a result, when I starts watchdogd the following error appears:

admin@clr-aa34762852fd4e658857ba0b2c6e55cf/etc $ sudo systemctl start watchdogd.service 
admin@clr-aa34762852fd4e658857ba0b2c6e55cf/etc $ sudo systemctl status watchdogd.service 
â—Ź watchdogd.service - Advanced watchdog daemon
     Loaded: loaded (/usr/lib/systemd/system/watchdogd.service; enabled; vendor preset: disabled)
    Drop-In: /etc/systemd/system/watchdogd.service.d
             └─override.conf
     Active: active (running) since Fri 2020-01-17 12:33:08 CET; 2s ago
       Docs: man:watchdogd(8)
             man:watchdogctl(1)
             man:watchdogd.conf(5)
             file:/usr/share/doc/watchdogd/README.md
             https://github.com/troglobit/watchdogd
             http://troglobit.com/project/watchdogd
   Main PID: 2714 (watchdogd)
      Tasks: 1 (limit: 4548)
     Memory: 308.0K
     CGroup: /system.slice/watchdogd.service
             └─2714 @usr/bin/watchdogd -nsx

ene 17 12:33:08 clr-aa34762852fd4e658857ba0b2c6e55cf systemd[1]: Started Advanced watchdog daemon.
ene 17 12:33:08 clr-aa34762852fd4e658857ba0b2c6e55cf watchdogd[2714]: /etc/watchdogd.conf:1: no such option 'ping'
ene 17 12:33:08 clr-aa34762852fd4e658857ba0b2c6e55cf watchdogd[2714]: Parse error in /etc/watchdogd.conf
ene 17 12:33:08 clr-aa34762852fd4e658857ba0b2c6e55cf watchdogd[2714]: watchdogd v3.3 starting ...
ene 17 12:33:08 clr-aa34762852fd4e658857ba0b2c6e55cf watchdogd[2714]: WDT does not support PWR fail condition, treating as card reset.

As a consequence, Watchdog behaviour is not expected, basically It does not work, but when I stop It, the system crashes and reboots after a few seconds.