Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim1s:applications:watchdog

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
Last revision Both sides next revision
products:sbc:vim1s:applications:watchdog [2022/08/21 22:52]
frank
products:sbc:vim1s:applications:watchdog [2022/08/21 23:36]
frank [Test Watchdog]
Line 4: Line 4:
 ===== Introduction ===== ===== Introduction =====
  
-This page introduces the internal Watchdog. You will learn how to enable the watchdog and test it.+This page introduces the external Watchdog. You will learn how to enable the watchdog and test it.
  
 ===== Enable Watchdog ===== ===== Enable Watchdog =====
 +
 +Watchdog is disabled by default, use the commands below to enable it.
 +
 +```shell
 +khadas@Khadas:~$ sudo systemctl start external-watchdog.service
 +```
 +
 +Check watchdog status:
 +
 +```shell
 +khadas@Khadas:~$ systemctl status external-watchdog.service 
 +● external-watchdog.service - External Watchdog
 +     Loaded: loaded (/lib/systemd/system/external-watchdog.service; static)
 +     Active: active (running) since Mon 2022-08-22 11:19:31 CST; 1min 3s ago
 +   Main PID: 2766 (external-watchd)
 +      Tasks: 2 (limit: 1592)
 +     Memory: 1.5M
 +        CPU: 1.176s
 +     CGroup: /system.slice/external-watchdog.service
 +             ├─2766 /bin/bash /usr/local/bin/external-watchdog.sh start
 +             └─3157 sleep 0.5
 +```
  
 ===== Test Watchdog ===== ===== Test Watchdog =====
 +
 +You can also kill the watchdog daemon to prevent an automatic restart.
 +
 +```sh
 +khadas@Khadas:~$ ps -axu | grep external-watchdog
 +root        2766  0.4  0.1   6876  3316 ?        Ss   11:19   0:01 /bin/bash /usr/local/bin/external-watchdog.sh start
 +```
 +Process ID with watchdog daemon is ''2766''.
 +
 +```sh
 +khadas@Khadas:~$ sudo kill -9 2766
 +```
 +
 +the system will automatically reboot. 
  
 ===== Disable Watchdog ===== ===== Disable Watchdog =====
 +
 +```shell
 +khadas@Khadas:~$ sudo systemctl disable external-watchdog.service 
 +```
Last modified: 2022/08/21 23:37 by frank