January-7th-2021, 07:53 AM
(This post was last modified: January-7th-2021, 08:24 AM by Armin@netPI.)
The netPI CPU supports a hardware watchdog. Once triggered by software it monitors in a time frame of 10 seconds if it was retrigger again else it resets the CPU and forces a reboot of the device.
This behaviour is good for monitoring your netPI software if it is running stable. For example the Docker daemon or simply said if a container is running.
All you need to do is to deploy a container that has the host device "/dev/watchdog" mapped. With the mapping the device gets accessible in the container.
Mapping alone does not start the watchdog. This needs to be initialized by software and if started periodically retriggered.
Here is a a simple script you should run in the background in your container that triggers the watchdog every 5 seconds
But please keep in mind once the watchdog is triggered it is active and in case stop the container for any reason your device will reset.
To disable the watchdog use the embedded console function of netPIs Docker web UI that allows you to enter the container, kill the watchdog calling bash script process first and then call
This will deactivate the watchdog until it is retriggered again.
Thx
Armin
This behaviour is good for monitoring your netPI software if it is running stable. For example the Docker daemon or simply said if a container is running.
All you need to do is to deploy a container that has the host device "/dev/watchdog" mapped. With the mapping the device gets accessible in the container.
Mapping alone does not start the watchdog. This needs to be initialized by software and if started periodically retriggered.
Here is a a simple script you should run in the background in your container that triggers the watchdog every 5 seconds
Code:
#!/bin/bash
while [ true ]; do
echo 1 > /dev/watchdog
sleep 5
done
But please keep in mind once the watchdog is triggered it is active and in case stop the container for any reason your device will reset.
To disable the watchdog use the embedded console function of netPIs Docker web UI that allows you to enter the container, kill the watchdog calling bash script process first and then call
Code:
echo 'V' > /dev/watchdog
This will deactivate the watchdog until it is retriggered again.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)