指令参数
root@tiamaes:~$ watchdog
BusyBox v1.24.1 (2024-10-16 10:07:39 CST) multi-call binary.
Usage: watchdog [-t N[ms]] [-T N[ms]] [-F] DEV
Periodically write to watchdog device DEV
-T N Reboot after N seconds if not reset (default 60)
-t N Reset every N seconds (default 30)
-F Run in foreground
Use 500ms to specify period in milliseconds
功能详解:
- -T: 如重置开门狗定时器。N秒后看门狗定时器超时复位系统。默认60秒
- -t: N秒重置开门狗定时器,'喂狗'时间,默认30秒
- -F:前台运行。默认后台运行
演示
#15秒的喂狗时间。每15秒重置开门狗寄存器。如果系统卡死不喂狗。30秒后复位系统,前台运行
watchdog -T 30000ms -t 15000ms -F /dev/watchdog
#和上面指令的效果一样。busybox里面的watchdog命令能区分ms(毫秒)后缀
watchdog -T 30 -t 15 -F /dev/watchdog
#和上面指令的效果一样。后台运行
watchdog -T 30 -t 15 /dev/watchdog

2324

被折叠的 条评论
为什么被折叠?



