How To Install watchdog on Fedora 34

watchdog is Software and/or Hardware watchdog daemon

Introduction

In this tutorial we learn how to install watchdog on Fedora 34.

What is watchdog

The watchdog program can be used as a powerful software watchdog daemon or may be alternately used with a hardware watchdog device such as the IPMI hardware watchdog driver interface to a resident Baseboard Management Controller (BMC). watchdog periodically writes to /dev/watchdog; the interval between writes to /dev/watchdog is configurable through settings in the watchdog config file. This configuration file is also used to set the watchdog to be used as a hardware watchdog instead of its default software watchdog operation. In either case, if the device is open but not written to within the configured time period, the watchdog timer expiration will trigger a machine reboot. When operating as a software watchdog, the ability to reboot will depend on the state of the machine and interrupts. When operating as a hardware watchdog, the machine will experience a hard reset (or whatever action was configured to be taken upon watchdog timer expiration) initiated by the BMC.

We can use yum or dnf to install watchdog on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install watchdog.

Install watchdog on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install watchdog using dnf by running the following command:

sudo dnf -y install watchdog

Install watchdog on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install watchdog using yum by running the following command:

sudo yum -y install watchdog

How To Uninstall watchdog on Fedora 34

To uninstall only the watchdog package we can use the following command:

sudo dnf remove watchdog

watchdog Package Contents on Fedora 34

/etc/watchdog.conf
/etc/watchdog.d
/usr/lib/.build-id
/usr/lib/.build-id/02
/usr/lib/.build-id/02/dfd7c75ad1242d819dd263e956c4dc308dcb4b
/usr/lib/.build-id/d7
/usr/lib/.build-id/d7/0930759ee914166936a8112874983a206eb801
/usr/lib/.build-id/f9
/usr/lib/.build-id/f9/6501c66e35809726408e0b25e80f0f482725dd
/usr/lib/systemd/system/watchdog-ping.service
/usr/lib/systemd/system/watchdog.service
/usr/libexec/watchdog/scripts
/usr/sbin/watchdog
/usr/sbin/wd_identify
/usr/sbin/wd_keepalive
/usr/share/doc/watchdog
/usr/share/doc/watchdog/AUTHORS
/usr/share/doc/watchdog/COPYING
/usr/share/doc/watchdog/ChangeLog
/usr/share/doc/watchdog/IAFA-PACKAGE
/usr/share/doc/watchdog/NEWS
/usr/share/doc/watchdog/README
/usr/share/doc/watchdog/README.Fedora
/usr/share/doc/watchdog/README.watchdog.ipmi
/usr/share/doc/watchdog/TODO
/usr/share/doc/watchdog/examples
/usr/share/doc/watchdog/examples/README
/usr/share/doc/watchdog/examples/another-chance.sh
/usr/share/doc/watchdog/examples/dbcheck.sh
/usr/share/doc/watchdog/examples/repair.sh
/usr/share/doc/watchdog/examples/systemcheck.sh
/usr/share/doc/watchdog/examples/uptime.sh
/usr/share/man/man5/watchdog.conf.5.gz
/usr/share/man/man8/watchdog.8.gz
/usr/share/man/man8/wd_identify.8.gz
/usr/share/man/man8/wd_keepalive.8.gz

References

Summary

In this tutorial we learn how to install watchdog on Fedora 34 using yum and dnf.