Obtaining The State Of The Watchdog Timer; Finding And Defining Data Structures; Example Watchdog Program - Sun Oracle Netra T5440 Administration Manual

Hide thumbs Also See for Netra T5440:
Table of Contents

Advertisement

Obtaining the State of the Watchdog Timer

The LOMIOCDOGSTATE IOCTL gets the state of the watchdog and reset functions,
and retrieves the current time-out period for the watchdog. If LOMIOCDOGSTATE
was never issued to set up the timeout period prior to this IOCTL, the watchdog is
not enabled in the hardware.
The argument is a pointer to the lom_dogstate_t structure, which is described in
greater detail in
members are used to hold the current states of the watchdog reset circuitry and
current watchdog timeout period. This timeout period is not the time remaining
before the watchdog is triggered.
The LOMIOCDOGSTATE IOCTL requires only that open() be successfully called.
This IOCTL can be run any number of times after open() is called, and it does not
require any other DOG IOCTLs to have been executed.

Finding and Defining Data Structures

All data structures and IOCTLs are defined in lom_io.h, which is available in the
SUNWlomh package.
The data structures for the watchdog timer are shown here:
The watchdog and reset state data structure is as follows:
typedef struct {
} lom_dogstate_t;
The watchdog and reset control data structure is as follows:
typedef struct {
} lom_dogctl_t;

Example Watchdog Program

Following is a sample program for the watchdog timer.
80
Sun Netra T5440 Server Administration Guide • April 2010
"Finding and Defining Data Structures" on page
int reset_enable; /* reset enabled if non-zero */
int dog_enable; /* watchdog enabled if non-zero */
uint_t dog_timeout; /* Current watchdog timeout */
int reset_enable; /* reset enabled if non-zero */
int dog_enable; /* watchdog enabled if non-zero */
80. The structure

Advertisement

Table of Contents
loading

Table of Contents