Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common: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
products:sbc:common:applications:watchdog [2022/07/08 05:22]
frank
products:sbc:common:applications:watchdog [2022/12/05 01:43] (current)
nick
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
  
-This document mainly introduces Watchdog. You will learn how to enable the watchdog and test.+This page introduces the internal Watchdog. You will learn how to enable the watchdog and test it.
  
-===== Enable Watchdog =====+===== Enable Internal Watchdog =====
  
 Watchdog is disabled by default, use the commands below to enable it. Watchdog is disabled by default, use the commands below to enable it.
Line 11: Line 11:
 <tabbox Ubuntu 18.04>  <tabbox Ubuntu 18.04> 
 ```shell ```shell
-khadas@Khadas:~$ sudo ln -s  /lib/systemd/system/watchdog.service /etc/systemd/system/multi-user.target.wants/watchdog.service +sudo ln -s  /lib/systemd/system/watchdog.service /etc/systemd/system/multi-user.target.wants/watchdog.service 
-khadas@Khadas:~$ sudo systemctl enable watchdog.service +sudo systemctl enable watchdog.service 
-khadas@Khadas:~$ sudo systemctl start watchdog.service+sudo systemctl start watchdog.service
 ``` ```
  
Line 21: Line 21:
  
 <tabbox Ubuntu 20.04>  <tabbox Ubuntu 20.04> 
- +```shell 
-khadas@Khadas:~$ sudo systemctl enable watchdog.service +sudo systemctl enable watchdog.service 
-khadas@Khadas:~$ sudo systemctl start watchdog.service +sudo systemctl start watchdog.service 
 +```
 </tabbox> </tabbox>
  
Line 54: Line 54:
 lines 1-21/21 (END)  lines 1-21/21 (END) 
 ``` ```
-===== Test Watchdog =====+===== Test Internal Watchdog =====
  
 ==== Set Watchdog Timeout ==== ==== Set Watchdog Timeout ====
Line 63: Line 63:
  
 ```shell ```shell
-sudo systemctl restart watchdog+sudo systemctl restart watchdog
 ``` ```
  
Line 71: Line 71:
  
 ```shell ```shell
-khadas@Khadas:~$ echo c | sudo tee /proc/sysrq-trigger +echo 0 | sudo tee /sys/module/kernel/parameters/panic 
 +echo c | sudo tee /proc/sysrq-trigger 
 ``` ```
  
Line 79: Line 80:
  
 ```shell ```shell
-khadas@Khadas:~$ sudo pkill -9 watchdog +$ sudo pkill -9 watchdog 
-khadas@Khadas:~$ sudo pkill -9 wd_keepalive +$ sudo pkill -9 wd_keepalive 
-khadas@Khadas:~+
-khadas@Khadas:~+
-khadas@Khadas:~$ G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;READ:0;0.+$ G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:0;READ:0;0.
 bl2_stage_init 0x01 bl2_stage_init 0x01
 bl2_stage_init 0x81 bl2_stage_init 0x81
Line 105: Line 106:
 If watchdog was setup successfully, the system will automatically reboot after the Kernel crash, in accordance with the timeout you have set above. If watchdog was setup successfully, the system will automatically reboot after the Kernel crash, in accordance with the timeout you have set above.
  
-===== Disable Watchdog =====+===== Disable Internal Watchdog =====
  
 Disable the Watchdog daemon. Disable the Watchdog daemon.
  
 ```shell ```shell
-khadas@Khadas:~$ sudo systemctl disable watchdog +sudo systemctl disable watchdog 
-khadas@Khadas:~$ sudo reboot+sudo reboot
 ``` ```
  
Last modified: 2022/07/08 05:22 by frank