내 임베디드 Linux 시스템에 watchdog을 설치했습니다.
watchdog.service 파일
[Unit]
Description=watchdog daemon
[Service]
Type=forking
EnvironmentFile=/etc/default/watchdog
ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
ExecStart=/bin/sh -c '[ x$run_watchdog != x1 ] || exec /usr/sbin/watchdog $watchdog_options'
PIDFile=/var/run/watchdog.pid
[Install]
WantedBy=default.target
그러다가 처형했지
ln /lib/systemd/system/watchdog.service /etc/systemd/system/
systemctl enable watchdog.service
Synchronizing state of watchdog.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable watchdog
Adding system startup for /etc/init.d/watchdog.
Created symlink /etc/systemd/system/default.target.wants/watchdog.service → /etc/systemd/system/watchdog.service.
/etc/default/watchdog
# Start watchdog at boot time? 0 or 1
run_watchdog=1
watchdog_module="bcm2835-wdt"
watchdog_restart=1
워치독 구성 파일
root@raspberrypi-cm3:/etc# cat watchdog.conf
#ping = 172.31.14.1
#ping = 172.26.1.255
#interface = eth0
file = /var/log/messages
max-load-1 = 24
# 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
watchdog-device = /dev/watchdog
watchdog-timeout = 15
# This greatly decreases the chance that watchdog won't be scheduled before
# your machine is really loaded
realtime = yes
priority = 1
다시 시작한 후 Watchdog이 작동하지 않습니다. 이에 대한 버그 보고서가 있습니다. 제안된 패치는 설치 섹션을 추가하는 것입니다.
[Unit]
Description=watchdog daemon
Conflicts=wd_keepalive.service
After=multi-user.target
OnFailure=wd_keepalive.service
[Service]
Type=forking
EnvironmentFile=/etc/default/watchdog
ExecStartPre=/bin/sh -c '[ -z "${watchdog_module}" ] || [ "${watchdog_module}" = "none" ] || /sbin/modprobe $watchdog_module'
ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'
[Install]
WantedBy=default.target
그런데 보시다시피 설치부분은 이미 확보해놨는데도 여전히 같은 문제가 발생합니다. 어떤 도움이라도 대단히 감사하겠습니다.