diff --git a/docs/common/dev/_watchdog.mdx b/docs/common/dev/_watchdog.mdx new file mode 100644 index 000000000..f61d4cc3a --- /dev/null +++ b/docs/common/dev/_watchdog.mdx @@ -0,0 +1,39 @@ +在嵌入式 Linux 系统中,看门狗(Watchdog Timer,简称 WDT)是一种用于 监控系统运行状态的硬件与软件结合的机制,主要目的是在系统出现故障(如死机、卡死或程序失控)时自动触发重启,确保系统能从异常状态中恢复。 + +### 开启 watchdog + +硬件 watchdog 默认没有开启, 需要通过 rsetup 开启 watchdog 的 overlay, + +### 测试 watchdog + +- 输入如下命令后,系统不再喂狗, watchdog 会自动重启 + +```bash + +echo B > /dev/watchdog + +``` + +:::warning + +这里可以写入除大写 V 之外的任意字符,因为大写 V 是用来关闭 watchdog 的。 + +::: + +- 关闭系统 panic 重启 + +```bash + +echo 0 > /sys/module/kernel/parameters/panic + +``` + +- 模拟系统卡住 + +```bash + +echo c > proc/sysrq-trigger + +``` + +- 等待 30 秒左右,看系统是否重启,如果系统能够重启,则表示 watchdog 正常工作 diff --git a/docs/rock2/rock2a/getting-started/interface-usage/watchdog.md b/docs/rock2/rock2a/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock2/rock2a/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/docs/rock2/rock2f/getting-started/interface-usage/watchdog.md b/docs/rock2/rock2f/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock2/rock2f/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/docs/rock3/rock3b/getting-started/interface-usage/watchdog.md b/docs/rock3/rock3b/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock3/rock3b/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/docs/rock5/rock5a/getting-started/interface-usage/watchdog.md b/docs/rock5/rock5a/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock5/rock5a/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/docs/rock5/rock5b/getting-started/interface-usage/watchdog.md b/docs/rock5/rock5b/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock5/rock5b/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/docs/rock5/rock5c/getting-started/interface-usage/watchdog.md b/docs/rock5/rock5c/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock5/rock5c/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/docs/rock5/rock5itx/getting-started/interface-usage/watchdog.md b/docs/rock5/rock5itx/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock5/rock5itx/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/docs/rock5/rock5t/getting-started/interface-usage/watchdog.md b/docs/rock5/rock5t/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/docs/rock5/rock5t/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_watchdog.mdx b/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_watchdog.mdx new file mode 100644 index 000000000..950ef9e55 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_watchdog.mdx @@ -0,0 +1,39 @@ +In embedded Linux systems, a Watchdog Timer (WDT) is a hardware and software mechanism used to monitor the system's operational state. Its main purpose is to automatically trigger a reboot when the system encounters failures (such as a crash, freeze, or program hang), ensuring the system recovers from abnormal states. + +### Enablethe Watchdog + +The hardware watchdog is disabled by default. It needs to be enabled using the rsetup to activate the watchdog overlay. + +### Testing the Watchdog + +- Run the following command to stop feeding the watchdog. The watchdog will automatically reboot the system: + +```bash + +echo B > /dev/watchdog + +``` + +:::warning + +You can write any character except for uppercase V, as uppercase V is used to disable the watchdog. + +::: + +- Disable system panic reboot: + +```bash + +echo 0 > /sys/module/kernel/parameters/panic + +``` + +- Simulate a system freeze: + +```bash + +echo c > proc/sysrq-trigger + +``` + +- Wait for approximately 30 seconds to see if the system reboots. If the system successfully reboots, it indicates that the watchdog is functioning correctly. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock2/rock2a/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock2/rock2a/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock2/rock2a/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock2/rock2f/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock2/rock2f/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock2/rock2f/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock3/rock3b/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock3/rock3b/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock3/rock3b/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5a/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5a/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5a/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5b/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5b/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5b/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5c/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5c/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5c/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5itx/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5itx/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5itx/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5t/getting-started/interface-usage/watchdog.md b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5t/getting-started/interface-usage/watchdog.md new file mode 100644 index 000000000..511a34a0f --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/rock5/rock5t/getting-started/interface-usage/watchdog.md @@ -0,0 +1,9 @@ +--- +sidebar_position: 20 +--- + +import WDT from "../../../../common/dev/\_watchdog.mdx"; + +# Watchdog + +