Difference between revisions of "Linux Mint: Watchdog configuration"

From fit-PC wiki
Jump to: navigation, search
Line 1: Line 1:
1. Find out watchdog kernel module name for your platform, possibly using using google
+
* For all Compulab Intel products, watchdog kernel module name is: iTCO_wdt
*For all Compulab Intel products, it should be named - '''"iTCO_wdt"'''
+
  
2. Verify it can be loaded successfully information on the device appears in dmesg output
+
* Verify it can be loaded successfully and information about the device appears in dmesg output:
  
'''$ sudo modprobe iTCO_wdt'''
+
$ sudo modprobe iTCO_wdt
 +
$ dmesg | grep -i iTCO
 +
[  34.741071] iTCO_vendor_support: vendor-support=0
 +
[  34.742749] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
 +
[  34.742824] iTCO_wdt: Found a Apollo Lake SoC TCO device (Version=5, TCOBASE=0x0460)
 +
[  34.742993] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
  
'''$ dmesg | tail'''
+
* Install watchdog program, it should run in the background automatically on each system start
:output:
+
$ sudo apt install watchdog
    iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
+
    iTCO_wdt: Found a Intel PCH TCO device (Version=4, TCOBASE=0x0400)
+
    iTCO_wdt: initialized. heartbeat=60 sec (nowayout=0)
+
  
3. Install watchdog program, it should run in the background automatically on each system start
+
* Modify the following configuration files:
:'''$ sudo apt install watchdog'''
+
/etc/default/watchdog
 +
change:                watchdog_module="none"
 +
to:                    watchdog_module="iTCO_wdt"
  
4. Modify the following configuration files:
+
/lib/systemd/system/watchdog.service
 +
add "WantedBy=default.target" line under [Install] header, as per below:
 
   
 
   
:'''/etc/watchdog.conf'''
+
[Install]
    uncomment line:        watchdog-device = /dev/watchdog
+
  WantedBy=default.target
 
   
 
   
:'''/etc/default/watchdog'''
+
* NOTE: this a bugfix that required for LinuxMint18.3.
    change:                watchdog_module="none"
+
    to:                    watchdog_module="iTCO_wdt"
+
 
   
 
   
:'''/lib/systemd/system/watchdog.service'''
+
* Reboot
::add "WantedBy=default.target" line under [Install] header, as per below:
+
 
   
 
   
  [Install]
+
* Verify the the driver is loaded automatically:
  WantedBy=default.target
+
+
* NOTE: this a bugfix that required for LinuxMint18.3.
+
+
5. Reboot
+
+
6. Verify the the driver is loaded automatically:
+
  
:'''$ dmesg | grep wdt'''
+
$ dmesg | grep -i iTCO
 
   
 
   
7. Simulate kernel panic (as root user):
+
* Simulate kernel panic (as root user):
    $ su
+
$ su
    Password:
+
Password:
    $ echo 1 > /proc/sys/kernel/sysrq  
+
$ echo 1 > /proc/sys/kernel/sysrq  
    $ echo c > /proc/sysrq-trigger
+
$ echo c > /proc/sysrq-trigger
  
*As a result, the watchdog mechanism should reboot the system within 60 seconds.
+
* As a result, the watchdog mechanism should reboot the system within 30 seconds.

Revision as of 11:15, 16 April 2018

  • For all Compulab Intel products, watchdog kernel module name is: iTCO_wdt
  • Verify it can be loaded successfully and information about the device appears in dmesg output:
$ sudo modprobe iTCO_wdt
$ dmesg | grep -i iTCO
[   34.741071] iTCO_vendor_support: vendor-support=0
[   34.742749] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
[   34.742824] iTCO_wdt: Found a Apollo Lake SoC TCO device (Version=5, TCOBASE=0x0460)
[   34.742993] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
  • Install watchdog program, it should run in the background automatically on each system start
$ sudo apt install watchdog
  • Modify the following configuration files:
/etc/default/watchdog
change:                watchdog_module="none"
to:                    watchdog_module="iTCO_wdt"
/lib/systemd/system/watchdog.service 
add "WantedBy=default.target" line under [Install] header, as per below:

[Install]
WantedBy=default.target

* NOTE: this a bugfix that required for LinuxMint18.3.

  • Reboot
  • Verify the the driver is loaded automatically:
$ dmesg | grep -i iTCO

  • Simulate kernel panic (as root user):
$ su
Password:
$ echo 1 > /proc/sys/kernel/sysrq 
$ echo c > /proc/sysrq-trigger
  • As a result, the watchdog mechanism should reboot the system within 30 seconds.