Watchdog? -- how?

Applications, development tools, FPGA, C, WEB
Post Reply
dk5hh
Posts: 4
Joined: Wed Mar 02, 2016 6:45 pm

Watchdog? -- how?

Post by dk5hh » Sat Oct 02, 2021 8:01 pm

in the newer RPOS systems (e.g. 1.04 ++) there is a /dev/watchdog and /dev/watchdog0

how can I use it? how do I parametrize it?

should I use "watchdog"? -- install: apt install watchdog?
how should I parametrize /etc/watchdog and /etc/default/watchdog

This does not work as shown below:
after systemctl start watchdog

root:~# systemctl status watchdog
● watchdog.service - watchdog daemon
Loaded: loaded (/lib/systemd/system/watchdog.service; static; vendor preset:
Active: active (running) since Sat 2021-10-02 17:36:07 UTC; 3s ago
Process: 1733 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/wa
Main PID: 1735 (watchdog)
CGroup: /system.slice/watchdog.service
└─1735 /usr/sbin/watchdog

Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: starting daemon (5.14):
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: int=1s realtime=yes sync=no soft=no ml
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: ping: no machine to check
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: file: no file to check
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: pidfile: no server process to check
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: interface: no interface to check
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: temperature: no sensors to check
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: test=none(0) repair=none(0) alive=/dev
Oct 02 17:36:07 rp-f0xxxx watchdog[1735]: cannot open /dev/watchdog (errno = 16
Oct 02 17:36:07 rp-f0xxxx systemd[1]: Started watchdog daemon.
root@rp-f0xxxx:~# ll /dev/wa*
crw-rw-rw- 1 root root 10, 130 Oct 2 17:35 /dev/watchdog
crw------- 1 root root 248, 0 Oct 2 17:35 /dev/watchdog0
mode 0666 for /dev/watchdog is obtained by udev-rule to improve the accesability -- no improvement

root:~# fuser -v /dev/watchdog
USER PID ACCESS COMMAND
/dev/watchdog: root 1 F.... systemd
root:~# fuser -v /dev/watchdog0
root:~# echo s >/dev/watchdog0
-bash: /dev/watchdog0: Device or resource busy

and the same result on /dev/watchdog

did I miss any well published documentation on this topic?
if not, please share your answers on:
any ideas? any experience?
Any hint how do use the watchdog?

Michael

33dnp
Posts: 4
Joined: Fri Jul 17, 2020 6:00 am

Re: Watchdog? -- how?

Post by 33dnp » Mon Oct 25, 2021 4:39 am

Hi. The RP uses a watchdog at the operating system level.
Parameters defined in the file /etc/systemd/system.conf are used for configuration.

https://www.freedesktop.org/software/sy ... tchdogSec=

If you comment on these parameters, then the watchdog will turn off.

33dnp
Posts: 4
Joined: Fri Jul 17, 2020 6:00 am

Re: Watchdog? -- how?

Post by 33dnp » Mon Oct 25, 2021 4:41 am

If you write your own script to control the watchdog, then keep in mind that when the system turns off, the script may stop and the watchdog will restart the system and prevent the board from shutting down correctly.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 6 guests