Watchdog Linux

1/6/2022by admin

This page written on


What is this about? This page providesinstructions on how to use Ubuntu live, without actually installingLinux, to test the TCO watchdog feature(see below) included on Intel chipsets andchecks whether it works correctly. The point is to detect thosemotherboards whose faulty hardware or buggy BIOSmake the watchdog dysfunctional. You will need: onedesktop computer with an Intel chipset and one USB thumbdrive or optical medium. No hard disk drives are required. Wegenerally assume that the computer boots followingthe UEFIprotocol (although indications will be given on how to perform thetest with a traditional BIOS).

Background: A hardwarewatchdog is a feature included on many computers, whose purposeis to reboot the computer automatically in case the system hangs: oncethe watchdog is activated, it must receive a ping at regular intervalsfrom the system, and, if it does not, it will cause a hardware reset.All (nearly all?) desktop and server Intel chipsets at least since the2000's have such a hardware watchdog, which, in Intel parlance, isknown as the TCO watchdog, where TCOstands for Total Cost of Ownership (whatever that means). • Onsome motherboards, however, the watchdog fails to reset the systemproperly and causes the motherboard to remain stuckduring POST: this couldbe caused by faulty hardware or a buggy BIOS. Thepoint of this page is to provide simple instructions to test whetherthe watchdog works. • Under Linux, the TCO watchdogdriver is known as iTCO-wdt (this createsa /dev/watchdog device): we will use it to perform thetest. (The instructions on this page do not install Linux,it is only used on a “live” system.)

Scripts or programs in /etc/watchdog.d to be checked by watchdog are listed in 'ps' output as 'defunct' in RHEL 6 KCS Solution updated on 05 Feb 2015, 6:06 PM GMT - 0 - 0. Implementation of Linux watchdog device API. Project description Release history Download files Project links. Homepage Statistics. View statistics.

Please write to me if you perform this test: I amgreatly interested in knowing which motherboards work and which don't.Please report your motherboard manufacturer and model,your BIOS vendor and version (if known), whetherbooting through UEFI, and whether using a graphics cardor CPU-integrated graphics chipset (and what otherextension cards may be present). I am particularly interested in testcases where at least one of the following conditions holds, and evenmore so if several do: (i) the BIOS is writtenby AMI (American Megatrends), (ii) the chipset is of theIntel 100 series or C230 series (a.k.a. Sunrise Point,used for Skylake processors with an LGA1151socket), or (iii) the system is booting under UEFI (asopposed to legacy BIOS).

Cross-references:LKML, Reddit, LKML.

The instructions

(1)DownloadUbuntu desktop from here (then click on the Download link).I will be assuming version 16.04.1 LTS desktop; get the amd64 architecture(the default). Note that Ubuntu is free, you do not need to pay todownload it (although you are encouraged to contribute if you decideto actually use it), there is a Not now, take me to thedownload on the download page.

If you wish to check the integrity of thefile ubuntu-16.04.1-desktop-amd64.iso, it should have thefollowing cryptographichashes: MD5=17643c29e3c4609818f26becf76d29a3, SHA-1=805337c2c3a00ac9b4a59a5c9692903ad30fe3ceand SHA-256=dc7dee086faabc9553d5ff8ff1b490a7f85c379f49de20c076f11fb6ac7c0f34(size=1513308160).

(2) Copy the .iso image downloaded instep (1) to a DVD or USBstick. Ifusing a DVD, you need to burnthe ISO disc image tothe DVD: seehere for further instructions on how to dothis. Ifusing a USB stick (formatted as VFAT),mount the ISO image so as to access the filesinside(theesinstructions might be of use to Windows users) and simply copy allthese files from the ISO image to the thumb drive(so the drive will contain filescalled README.diskdefines and md5sum.txt anddirectories called .disk and EFIand boot and casper and so on).

Note: In the case ofa USB thumb drive, copying the files is enough whenbooting through UEFI. In the case of alegacy BIOS boot, it is not enough: thedrive must additionally be made bootable.See herefor full instructions on how to create a USB bootablestick on Windows. (Instructions from Linux itself: assumingthe USB stick has a single partitioncalled /dev/sdx1, renamethe isolinux directory on the driveas syslinux and rename the isolinux.cfg fileit contains as syslinux.cfg then unmount it andrun syslinux -i -d syslinux /dev/sdx1then dd if=/usr/lib/SYSLINUX/mbr.binof=/dev/sdx and lastly fdisk/dev/sdx and make partition 1 bootable usingthe a command.) Again, this is all required only forlegacy boot: for UEFI, simply copy the files to thedrive.

(3) Boot from the DVDor USB thumb drive created in step (2). (Use F8 on bootto choose whence to boot from.) If booting through UEFI,the screen should appear as shown on right. Press the ekey (while the menu item Try Ubuntu without installing isselected) —

the screen will then appear as shown on the left: use the arrowkeys to move cursor before quiet splash and type thefollowing extra argument: acpi_enforce_resources=lax(leave at least one space around the entire argument, but no spacesaround the = sign). See next screenshot

Now press F10 to boot.

Note: If not bootingthrough UEFI, the boot screen will be different (Syslinuxinstead of Grub). Press the control key to select bootoptions, then press enter to select English, thenpress F6 for Other Options, press escape todismiss the popup, use the arrow keys to edit the boot options line,and add acpi_enforce_resources=lax (surrounded by spaces)before quiet splash, and press enter toboot.

Technical note:The acpi_enforce_resources=lax kernel parameter must bepassed because, on many systems, the ACPI reserves theregion used by the i2cdriver: seehere for a discussion.

(4) Linux will now boot. After a certain time,the screen should look like shown at right. Click on the Ubuntu logoat the top left,

and type terminal in the Search your computerbox, and press enter. This should open a terminal as shownnext:

(the prompt is [email protected]:~$ and the cursor is asquare). Now type sudo su to become administrator andthe prompt should change to [email protected]:/home/ubuntu#(this is the administrator, or “root” prompt).

Linux watchdog service

(5) Now type the followingcommands at the administrator prompt:

(note that capitalization matters: it's iTCO-wdt andnot itco-wdt; on the other hand, the minus sign can bereplaced by an underscore in any or all of these lines if it's somehoweasier to type). The first two load the I²C bus driversand the third loads the watchdog driver itself. None of thesecommands will produce any output.

Optional: check whether the watchdog has correctlybeen detected by typing dmesg to view the Linux kernellogs. Look for lines such as the following (preceded by numericaltimestamps):

If only the first appears, the watchdog was not detected(and it is useless to continue). If all three appear, the watchdogwas correctly detected.

(6) Finally, type thefollowing at the administrator prompt:

and press entertwice. This will cause thewatchdog to start counting down. The prompt will not return (donot press control-cnor control-d), simply wait.

Linux Watchdog Process

After a few minutes (specifically, twice the heartbeatvalue indicated in the above optional step), the system will perform ahard reboot.

Results: If the system performs a successfulreboot (as if the reset button had been pressed), congratulations!,the watchdog is functioning correctly. (Please report a success tome.) If the system fails to reboot (remains forever hungin POST), turn the computer off, disconnect thepower supply for a few minutes, and then perform a cold reboot toreturn to normal operation. Please report this as a failure.

Many thanks to all those who can try this test!

The Watchdog component is a solution that ensures that your server is clean from malware, all services are up and running and there is enough free disk space on the server.

Watchdog can monitor the following services:

  • Web server providing the control panel interface
  • Web server providing WWW service to users’ sites
  • SMTP Server (QMail)
  • IMAP/POP3 Server (Courier-IMAP)
  • DNS Server (BIND)
  • Tomcat
  • MySQL
  • PostgreSQL
  • SpamAssassin
  • Plesk Premium antivirus

It can start, stop, and restart the services it monitors, and it can be configured to take actions depending on the stability of a service over some time period.

It can run other utilities and notify you when disk space usage has reached the specified amount.

For the purpose of monitoring services and disk space usage, Watchdog uses the monit utility. For information on the monit utility, visit the monit developers' website at

The Watchdog can scan the server file system for rootkits, backdoors, exploits, trojan horses and other malicious software on demand or on schedule. It can notify you by email of scanning results and show reports through the control panel. It updates its security knowledge base through the Internet before each scan.

For the purpose of scanning the server for malware, Watchdog uses the Rootkit Hunter utility. For information on Rootkit Hunter, visit the Rootkit Hunter developer's Web site at

Watchdog Linux Disable

Next in this section:

Comments are closed.