树莓派论坛

 找回密码
 立即注册

raspberry pi看门狗

nationals 发表于 2014-4-15 16:55:56 | 显示全部楼层 |阅读模式
本帖最后由 nationals 于 2014-4-16 14:09 编辑
  1. #!/bin/sh
  2. # watchdog for raspberry pi

  3. sudo apt-get install watchdog -y || exit
  4. sudo modprobe bcm2708_wdog
  5. echo bcm2708_wdog | sudo tee -a /etc/modules

  6. sudo sed -i 's/^#watchdog-device/watchdog-device/g' /etc/watchdog.conf
  7. sudo sed -i 's/^#max-load-1 /max-load-1 /g' /etc/watchdog.conf

  8. sudo sed -i '/^#temperature-device/a\temperature-device = /sys/class/thermal/thermal_zone0/temp' /etc/watchdog.conf
  9. sudo sed -i '/^#max-temperature/a\max-temperature = 75000' /etc/watchdog.conf

  10. sudo /etc/init.d/watchdog start
复制代码
nationals  楼主| 发表于 2014-4-16 14:09:41 | 显示全部楼层
  1. sudo update-rc.d watchdog defaults
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版 | Archiver | 树莓派论坛 ( 粤ICP备15075382号-1 )