- 輸入以下命令
sudo apt-get update
sudo apt-get upgrade - 安裝watchdog軟件
sudo apt-get install watchdog - 修改文件
sudo nano /lib/systemd/system/watchdog.service
#追加以下內(nèi)容
WantedBy=multi-user.target - 設(shè)置watchdog開機(jī)啟動
sudo update-rc.d watchdog enable - 啟動樹莓派CPU看門狗模塊
sudo modprobe bcm2835_wdt (以前版本為modprobe bcm2708_wdog) - 修改watchdog配置文件
sudo nano /etc/watchdog.conf
做如下修改
#ping = 172.31.14.1
#ping = 172.26.1.255
#interface = eth0
#file = /var/log/messages
#change = 1407
# Uncomment to enable test. Setting one of these values to'0'disables it.
# These values will hopefully never reboot your machine during normal use
# (if your machine is really hung, the loadavg will go much higher than 25)
max-load-1 = 24
#max-load-5 = 18
#max-load-15 = 12
# Note that this is the number of pages!
# To get the real size, check how large the pagesize is on your machine.
#min-memory = 1
#allocatable-memory = 1
#repair-binary = /usr/sbin/repair
#repair-timeout =
#test-binary =
#test-timeout =
watchdog-device = /dev/watchdog
watchdog-timeout = 10 這是添加的
# Defaults compiled into the binary
#temperature-device =
#max-temperature = 120
# Defaults compiled into the binary
#admin = root
#interval = 1
#logtick = 1
#log-dir = /var/log/watchdog
# This greatly decreases the chance that watchdog won't be scheduled before
# your machine is really loaded
realtime = yes
priority = 1
# Check if rsyslogd is still running by enabling the following line
#pidfile = /var/run/rsyslogd.pid - 該處不需要做修改,以前版本需要修改
sudo nano /etc/default/watchdog
該文件中的watchdog_module 字段的值不需要修改為bcm2835_wdt,不需要修改 - 重啟主機(jī)
sudo reboot - 輸入以下內(nèi)容測試主機(jī)是否會重啟
:(){ :|:& };:
樹莓派安裝看門狗
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
- 背景 一年多以前我在知乎上答了有關(guān)LeetCode的問題, 分享了一些自己做題目的經(jīng)驗(yàn)。 張土汪:刷leetcod...
- 所以說,如果經(jīng)常遇到各種奇葩的這事那事也許會把人逼成一個碼字狂,可能只有對著手機(jī)對著陌生人才能盡情吐露自己的想法,...