Install Watchdog daemon
To install watchdog daemon
sudo apt-get install watchdog
Create dir for watchdog logs files
sudo mkdir -p /var/log/watchdog
Remove the watchdog module from black list.
#blacklist s3c2410_wdt//ysun Here you should check what kind of device you're using
blacklist softdog //alternativly you can use soft dog
Append the default watchdog configuration.
# Start watchdog at boot time? 0 or 1
run_watchdog=1
# Start wd_keepalive after stopping watchdog? 0 or 1
run_wd_keepalive=1
# Load module before starting watchdog
watchdog_module=softdog#the same as your loaded module!!!
# Specify additional watchdog options here (see manpage).
watchdog_options="-s -v -c /etc/watchdog.conf"
Watchdog demon configuration files
Note: Watchdog drivers start automatically as it's buildin, but only if a watchdog daemon to configure the times.
You need to edit the
$ cat /etc/watchdog.conf
#ping= 172.31.14.1
#ping= 172.26.1.255
#interface= eth0
file= /var/log/syslog
#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
# 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
# set watchdog timer
watchdog-timeout= 15
# set heartbeat setting
heartbeat-file = /var/log/watchdog/heartbeat.log
heartbeat-stamps = 300