Kicking watchdog inside container

Dear Toradex,

I want to be sure my app is working correctly kicking the watchdog device or using sd_notify with systemd. But the watchdog device is used by systemd and using sd_notify is not easy.

Is there a way to solve this problem easily without a custom TorizonCore image?

I’m working on:
Apalis iMX8 QuadMax 4GB IT
Ixora Carrier Board V1.2A
TorizonCore 5.6.0+build.13 (dunfell)

Best Regards,
Francisco

Hi @franc,

Could you please check if this article works for you?

From this article, I can see that you should mount /dev/watchdog inside your container. Did you try this already?

Also, could you please share more information with us? What exactly are you trying to enable? Do you have any logs or errors that you can share with us?

Best regards,
Hiago.

1 Like

If I try to use /dev/watchdog inside a container, I get this:

apalis-imx8-07028641:~$ docker run --rm -it --device /dev/watchdog ubuntu
root@efb05796cf5f:/# echo 1 > /dev/watchdog 
bash: /dev/watchdog: Device or resource busy

Best Regards,
Francisco

Hi @franc,

That’s because watchdog is used by systemd. You can read how to disable it here in this another ticket:

Please, check if that works for you.

Best Regards,
Hiago.