Difference between revisions of "Linux Mint: Watchdog configuration"
From fit-PC wiki
(→List of tested devices) (change visibility) |
(→List of tested devices) (change visibility) |
||
Line 3: | Line 3: | ||
Device: fitlet2 | Device: fitlet2 | ||
+ | CPU: Intel(R) Atom(TM) Processor E3950 | ||
BIOS: 05/14/2018 American Megatrends Inc. FLT2.0.40.01.00 | BIOS: 05/14/2018 American Megatrends Inc. FLT2.0.40.01.00 | ||
OS: Linux Mint 19 Tara | OS: Linux Mint 19 Tara | ||
Kernel: 4.15.0-20-generic | Kernel: 4.15.0-20-generic | ||
Kernel module: iTCO_wdt | Kernel module: iTCO_wdt | ||
+ | |||
+ | Device: fitlet1 | ||
+ | CPU: AMD A10 Micro-6700T APU+AMD Radeon R6 Graphics | ||
+ | BIOS: 11/30/2015 American Megatrends Inc. SBCFLT_0.08.08 | ||
+ | OS: Linux Mint 19 Tara | ||
+ | Kernel: 4.15.0-20-generic | ||
+ | Kernel module: sp5100_tco | ||
Device: IPC2 | Device: IPC2 | ||
Line 14: | Line 22: | ||
Kernel: 4.15.0-20-generic | Kernel: 4.15.0-20-generic | ||
Kernel module: iTCO_wdt | Kernel module: iTCO_wdt | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<br> | <br> | ||
Revision as of 12:36, 20 June 2018
List of tested devices
- The guide was tested on a systems with the specs listed below, but should be easily adaptable
Device: fitlet2 CPU: Intel(R) Atom(TM) Processor E3950 BIOS: 05/14/2018 American Megatrends Inc. FLT2.0.40.01.00 OS: Linux Mint 19 Tara Kernel: 4.15.0-20-generic Kernel module: iTCO_wdt
Device: fitlet1 CPU: AMD A10 Micro-6700T APU+AMD Radeon R6 Graphics BIOS: 11/30/2015 American Megatrends Inc. SBCFLT_0.08.08 OS: Linux Mint 19 Tara Kernel: 4.15.0-20-generic Kernel module: sp5100_tco
Device: IPC2 CPU: Intel(R) Core(TM) i5-4300U BIOS: 05/30/2017 Compulab Ltd. IPC2_3.330.5 OS: Linux Mint 19 Tara Kernel: 4.15.0-20-generic Kernel module: iTCO_wdt
- Notes for fitlet1: kernel module i2c_piix4 should be blacklisted
Add the following lines to the /etc/modprobe.d/blacklist.conf
# fitlet1: sp5100_tco conflicts with i2c_piix4 for I/O address 0x0cd6 blacklist i2c_piix4
Then, unload i2c_piix4 and update initramfs
$ sudo modprobe -r i2c_piix4 $ sudo update-initramfs -u
Usage example
- The following usage example represented on fitlet2 with kernel module iTCO_wdt
- For fitlet1 use kernel module sp5100_tco
- 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"
/etc/watchdog.conf uncomment line: watchdog-device = /dev/watchdog
- NOTE: bugfix required for Linux Mint 18.3
/lib/systemd/system/watchdog.service add "WantedBy=default.target" line under [Install] header, as per below: [Install] WantedBy=default.target
- Try watchdog service and ensure it is running correctly
$ sudo systemctl start watchdog $ sudo systemctl status watchdog ● watchdog.service - watchdog daemon Loaded: loaded (/lib/systemd/system/watchdog.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2018-04-17 03:30:58 EDT; 3min 3s ago Main PID: 1143 (watchdog) CGroup: /system.slice/watchdog.service └─1143 /usr/sbin/watchdog Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: int=1s realtime=yes sync=no soft=no mla=0 mem=0 Apr 17 03:30:58 denis-fitlet2 systemd[1]: Started watchdog daemon. Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: ping: no machine to check Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: file: no file to check Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: pidfile: no server process to check Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: interface: no interface to check Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: temperature: no sensors to check Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: test=none(0) repair=none(0) alive=/dev/watchdog heartbeat=none to=root no_act=no force=no Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: watchdog now set to 60 seconds Apr 17 03:30:58 denis-fitlet2 watchdog[1143]: hardware watchdog identity: iTCO_wdt
- Enable autostart of the watchdog service
$ sudo systemctl enable watchdog Synchronizing state of watchdog.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install enable watchdog
- Reboot
- Verify the the driver was 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.