.. _watchdog:

********************
Watchdog Service
********************

.. index:: services;watchdog

Overview
====================
The Watchdog service provides a means to monitor memory utilization of
the system and reboot if the memory is getting too low and may end up
causing system failure.

.. Note:: The service requires built-in functionality that was
          added in NDS release 2.8.7.  Any release prior than this
          will trigger the debugging code intended for operation on a
          PC.  Please ensure that your version of NDS is updated to
          the latest version.

Configuration
====================

A typical watchdog configuration block looks like this::

    - name: wdog
      driver: services.watchdog_service:WatchdogService
      settings:
        watchdog_interval: 60
        low_memory_threshold: 300000

Settings
--------------------

watchdog_interval (required, default: 120)
    How often (in seconds) the watchdog service should run and perform
    system validation.

low_memory_threshold (optional)
    The amount of free memory at which the device should be rebooted.
    It is expressed in bytes.

auto_restart_interval (optional)
    If specified, the system will always be rebooted after the
    specified number of seconds has passed.

