User Tools

Site Tools

한국어

comfilepi:enable_the_internal_watchdog_timer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
comfilepi:enable_the_internal_watchdog_timer [2023/06/19 09:16]
COMFILE Technology
comfilepi:enable_the_internal_watchdog_timer [2023/06/19 10:04] (current)
COMFILE Technology
Line 1: Line 1:
 ====== Enable the Internal Watchdog Timer ====== ====== Enable the Internal Watchdog Timer ======
  
-The ComfilePi'​s [[https://​en.wikipedia.org/​wiki/​System_on_a_chip|SoC]] has an internal watchdog timer that can be used to automatically reboot the system should it ever become unresponsive.+The ComfilePi'​s [[https://​en.wikipedia.org/​wiki/​System_on_a_chip|SoC]] has an internal watchdog timer that can be used to automatically reboot the system should it ever become unresponsive.  It is also recommended to [[::​comfilepi:​read-only_file_system_with_overlay|enable the read-only file system overly]] to protect the file system from corruption should such an event occur.
  
 First, verify that the ///​dev/​watchdog//​ device exists: First, verify that the ///​dev/​watchdog//​ device exists:
Line 11: Line 11:
 </​code>​ </​code>​
  
-Uncomment the following lines in the file ///​etc/​systemd/​system.conf//:​+Uncomment the following lines in the file ///​etc/​systemd/​system.conf// ​and then reboot. ​ See [[https://​manpages.debian.org/​bullseye/​systemd/​systemd-system.conf.5.en.html | the system.conf documentation]] for more information about these settings:
  
 <​code>​ <​code>​
 RuntimeWatchdogSec=10 RuntimeWatchdogSec=10
-ShutdownWatchdogSec=10min+RebootWatchdogSec=10min
 </​code>​ </​code>​
  
-Install the watchdog service with the following commands: +To test if the watchdog service is working, obtain root privilegesand then create ​kernel panic with the following:
-<​code>​ +
-sudo apt update +
-sudo apt install watchdog +
-</​code>​ +
- +
-Check if the watchdog service is running with the following command: +
- +
-<​code>​ +
-pi@raspberrypi:​~ $ systemctl | grep watchdog +
-watchdog.service ​        ​loaded active running ​  ​watchdog daemon  +
-</​code>​ +
- +
-If the //​watchdog.service//​ is not running, start it with the following command: +
- +
-<​code>​ +
-sudo systemctl start watchdog.service +
-</​code>​ +
- +
-To test if the watchdog service is working, first, obtain root privileges and then initiate ​[[https://​en.wikipedia.org/​wiki/​Fork_bomb#​Bash|forkbomb]]:+
  
 <​code>​ <​code>​
 pi@raspberrypi:​~ $ sudo su pi@raspberrypi:​~ $ sudo su
-root@raspberrypi:/​home/pi# :(){ :|:& };:+pi@raspberrypi:​~ $ echo 1 > /proc/sys/​kernel/​sysrq 
 +pi@raspberrypi:~ $ echo "​c"​ > /​proc/​sysrq-trigger
 </​code>​ </​code>​
  
comfilepi/enable_the_internal_watchdog_timer.1687133788.txt.gz · Last modified: 2023/06/19 09:16 by COMFILE Technology