CODE EXAMPLE 1-1 System Watchdog Node Management Code Example (Continued)
#define EM_INIT | 1 |
#define EM_GETROOT | 2 |
#define EM_GETPVALBYNAME | 3 |
#define USAGE_STR | "Usage:\n"\ |
"wdadm | |
"wdadm | |
" | |
"wdadm |
#define DETAILED_HELP "wdadm - System Watchdog Controller Administration\n"\ "Description:\n"\
"The operations include displaying status
"This utility must be run with super user permissions.\n"\ "OPTIONS\n"\
" | the watchdog timer nodes.\n"\ | |||
" | Each Timer node is denoted as controller:timer\n"\ | |||
" | Example:\n"\ |
|
| |
" | wdadm |
|
| - lists all the nodes\n"\ |
" | wdadm | c1:t1 c1:t2 | - lists c:t1 and c:t2 nodes\n"\ | |
" |
| c1 | - controller name\n"\ | |
" |
| t1 | - timer name\n"\ | |
" | ||||
" | Example:\n"\ |
|
| |
" | wdadm | c1:t1 | ||
" | wdadm | c1:t1 | ||
" | wdadm | c1:t1 | ||
" | Note: Before using this option, the controller must be\n"\ | |||
" | disarmed (using | |||
" | ||||
" | Commands | supported are : arm, disarm\n"\ | ||
" | Example:\n"\ |
|
| |
" | wdadm | controller | ||
" | arms the | watchdog controller node called controller\n" | ||
#define HEADER | "NAME (controller:timer)\t\tSTATUS"\ | |||
|
| "\t\tACTION\t\tTIMEOUT\n" | ||
#define PRINT_FORMAT | ||||
#define ILLEGAL_TIMEOUT |
| |||
/* watchdog properties */ |
|
| ||
#define WATCHDOG_ACTION |
| "WdAction" | ||
#define WATCHDOG_TIMEOUT |
| "WdTimeout" | ||
#define WATCHDOG_STATUS |
| "State" | ||
#define WATCHDOG_OP |
|
| "WdOp" | |
#define PICL_WATCHDOG_CONTROLLER |