:_class watchdog-timer :name watchdog-level2

Watchdog Node Management Code

CODE EXAMPLE 1-1contains an example of the code used for managing the watchdog timer nodes. This code can be used to change watchdog timer action and timeout values and also to arm and disarm the watchdog controller.

CODE EXAMPLE 1-1System Watchdog Node Management Code Example

/*

*Copyright 2003 Sun Microsystems, Inc. All rights reserved.

*Use is subject to license terms.

*/

#pragma ident "@(#)wdadm.c

1.6

03/10/16 SMI"

/*

*This program is used to manage the system watchdog nodes.

*Please refer to libpicl(3LIB) for information on picl APIs

*To compile:

*cc -o wdadm -lpicl wdadm.c

*/

#include

<stdio.h>

 

#include

<stdlib.h>

 

#include

<stdarg.h>

 

#include

<string.h>

 

#include

<strings.h>

 

#include

<errno.h>

 

#include

<alloca.h>

 

#include

<libintl.h>

 

#include

<locale.h>

 

#include

<unistd.h>

 

#include

<assert.h>

 

#include

<inttypes.h>

 

#include

<sys/termios.h>

 

#include

<picl.h>

 

/*

 

 

* Error

codes

 

*/

 

 

#define EM_USAGE

0

Chapter 1 Watchdog Timer 5

Page 19
Image 19
Sun Microsystems CP2500 manual Code Example 1-1System Watchdog Node Management Code Example