How To Install watchdog on Rocky Linux 8

In this tutorial we learn how to install watchdog on Rocky Linux 8. watchdog is Software and/or Hardware watchdog daemon

Introduction

In this tutorial we learn how to install watchdog on Rocky Linux 8.

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 sysconfig 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 Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install watchdog.

Install watchdog on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install watchdog

Install watchdog on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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 Rocky Linux 8

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

sudo dnf remove watchdog

watchdog Package Contents on Rocky Linux 8

/etc/sysconfig/watchdog
/etc/watchdog.conf
/etc/watchdog.d
/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/48148d560f75c227a48972d6ff87e7f3bd40b6
/usr/lib/.build-id/5a
/usr/lib/.build-id/5a/008ce7f9f481d7d8d4779e0fe482775ec242d4
/usr/lib/.build-id/d0
/usr/lib/.build-id/d0/81ad567147b360e098ad720b6bb23409eb66e8
/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.RHEL
/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 Rocky Linux 8 using yum and dnf.