Connectivity watchdog

The need for a watchdog

Astonishingly enough many embedded Linux systems that use mobile networks do not have a good watchdog functionality. However, it is quite frequent that connectivity is lost when you use USB based cellular modems on embedded systems or Raspberry Pis. One example could be a reconfiguration of the sim card in the cellular modem. Many times the Linux network stack does not notice that connectivity is lost and the device goes offline. This can only be fixed through a reboot physically power cycling the USB port. This can cause large costs when a service technician needs to go on-site to do this. The alternative to ask a customer to power cycle is not very attractive either.

That is why qbee provides users with a basic watchdog functionality. Just configure it in the configuration section under the "connectivity watchdog". Any time the qbee agent runs it checks if access to the qbee server exists. If it does all is OK. If not it counts one failed attempt. This failed attempts counter gets increased any time the qbee server does not respond. If the defined threshold in the configuration is hit device reboots.

!qbee-connectivity-watchdog

It is important to note that the base time span between qbee agent runs is determined in settings. This can be anything from 5 minutes to much longer time periods.

!qbee-settings

How does the watchdog work?

The qbee watchdog is based on agent scheduling interval (in minutes). Please see the second image above. For this example the interval is set to 5 minutes.
The watchdog then has a threshold number of attempts before triggering. In this example this is set to 3.
This means that after 3 x 5 minutes = 15 minutes of no connectivity the device is automatically rebooted.