beautypg.com

Sun Microsystems Netra CP2500 User Manual

Page 20

background image

6

Netra CP2500 Board Programming Guide • March 2007

#define EM_INIT 1

#define EM_GETROOT 2

#define EM_GETPVALBYNAME 3

#define USAGE_STR "Usage:\n"\

"wdadm -l [...]\n"\

"wdadm -m [-t ]"\

" [-a action]]\n"\

"wdadm -c -o \n"

#define DETAILED_HELP

"wdadm

- System Watchdog Controller Administration\n"\

"Description:\n"\

"The operations include displaying status (-l), modifying the values (-m)\n"\

"and executing commands on the watchdog controller (-c).\n"\

"This utility must be run with super user permissions.\n"\

"OPTIONS\n"\

" -l list all the watchdog timer nodes.\n"\

" Each Timer node is denoted as controller:timer\n"\

" Example:\n"\

" wdadm -l - lists all the nodes\n"\

" wdadm -l c1:t1 c1:t2 - lists c:t1 and c:t2 nodes\n"\

" c1 - controller name\n"\

" t1 - timer name\n"\

" -m modify the timeout and action parameters for a timer node.\n"\

" Example:\n"\

" wdadm -m c1:t1 -t -a \n"\

" wdadm -m c1:t1 -t \n"\

" wdadm -m c1:t1 -a \n"\

" Note: Before using this option, the controller must be\n"\

" disarmed (using -c option).\n"\

" -c Execute commands on the watchdog controller node\n"\

" Commands supported are : arm, disarm\n"\

" Example:\n"\

" wdadm -c controller -o arm\n"\

" arms the watchdog controller node called controller\n"

#define HEADER "NAME (controller:timer)\t\tSTATUS"\

"\t\tACTION\t\tTIMEOUT\n"

#define PRINT_FORMAT "\t%-10s\t%-10s\t%d"

#define ILLEGAL_TIMEOUT -999

/* watchdog properties */

#define WATCHDOG_ACTION "WdAction"

#define WATCHDOG_TIMEOUT "WdTimeout"

#define WATCHDOG_STATUS "State"

#define WATCHDOG_OP "WdOp"

#define PICL_WATCHDOG_CONTROLLER "watchdog-controller"

CODE EXAMPLE 1-1

System Watchdog Node Management Code Example (Continued)