ntwdt - Netra–based application watchdog timer driver
The ntwdt driver is a multithreaded, loadable, non-STREAMS pseudo driver that provides an application with an interface for controlling a system watchdog timer.
The ntwdt driver implements a virtual watchdog timer that an application with the PRIV_SYS_DEVICES privilege controls via ioctl(2) calls.
/usr/platform/sun4v/include/sys/ntwdt.h provides definitions for use of the following ioctls with the ntwdt driver:
Enable or disable the alarm module watchdog and reset functions. The argument is a pointer to the ts_dogctl_t structure. The reset_enable member is used to enable or disable the reset function of the alarm. The dog_enable member is used to enable or disable the alarm watchdog function of the alarm module. An error (EINVAL) is returned if the watchdog is disabled but the reset is enabled.
The LOMIOCDOGPAT ioctl rearms, or pats, the watchdog so that the watchdog starts ticking from the beginning; that is, to the value specified by LOMIOCDOGTIME. If the watchdog is enabled, this ioctl must be used at regular intervals that are less than the watchdog timeout, or the watchdog expires.
Get the state of the watchdog and reset functions and retrieve the current timeout period for the watchdog. The argument is a pointer to the ts_dogstate_t structure. The structure members are used to hold the current states of the reset circuitry, watchdog circuitry and the current watchdog timeout period in seconds. Note that this is not the time remaining before the watchdog is triggered.
Set the timeout period for the alarm module watchdog. The argument is a pointer to an unsigned integer. This integer holds the new timeout period for the watchdog in seconds. If the watchdog function is enabled, it is immediately reset so that the new timeout can take effect. An error (EINVAL) is returned if the timeout period is zero or is longer than 127 seconds.
You configure the ntwdt driver by modifying the contents of the ntwdt.conf file.
An open() fails if:
Process does not have PRIV_SYS_DEVICES privilege asserted in its effective set.
/dev/ntwdt is not present or driver is not installed.
/dev/ntwdt has already been successfully open()'d.
Special character device.
SPARC ntwdt kernel module.
Driver configuration file.
Header file with ioctl definitions.
See attributes(7) for descriptions of the following attributes: