Difference between revisions of "Watchdog"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 3: Line 3:
 
==H3==
 
==H3==
 
===Linux-4.14===
 
===Linux-4.14===
使用下列命令可以测试看门狗功能:
+
You can test watchdog by running the following commands:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
$ cd /root/C/watchdog/
+
$ cd /root/demo/watchdog/
 
$ gcc watchdog_demo.c -o watchdog_demo
 
$ gcc watchdog_demo.c -o watchdog_demo
 
$ ./watchdog_demo /dev/watchdog0 10
 
$ ./watchdog_demo /dev/watchdog0 10
Line 12: Line 12:
 
System will reboot in 10 second
 
System will reboot in 10 second
 
</syntaxhighlight>
 
</syntaxhighlight>
系统将在10秒之后重启。
+
System will reboot in 10 seconds.

Revision as of 07:51, 14 January 2019

查看中文

1 H3

1.1 Linux-4.14

You can test watchdog by running the following commands:

$ cd /root/demo/watchdog/
$ gcc watchdog_demo.c -o watchdog_demo
$ ./watchdog_demo /dev/watchdog0 10
Set timeout: 10 seconds
Get timeout: 10 seconds
System will reboot in 10 second

System will reboot in 10 seconds.