CODE EXAMPLE 1-1 System Watchdog Node Management Code Example (Continued)
if
if ((err = wdadm_set_picl_prop(peerh, WATCHDOG_ACTION,
return (err);
}
/* set watchdog timeout */
if
if ((err = wdadm_set_picl_prop(peerh, WATCHDOG_TIMEOUT, (void
sizeof
(void) fprintf(stderr, "%s:Error in " "setting timeout:%d\n", prog, picl2errno(err));
return (err);
}
return (PICL_WALK_TERMINATE);
}
err = picl_get_propval_by_name(peerh, PICL_PROP_PEER, &peerh, sizeof (picl_nodehdl_t));
} while (err == PICL_SUCCESS);
(void) fprintf(stderr, "%s:Node not found:%d\n", prog, picl2errno(PICL_NODENOTFOUND));
return (PICL_NODENOTFOUND);
}
/*
*This routine gets called to change the watchdog timeout and
*action.
*wd_name is of
*/ static int
set_wd_params(char *wd_name, char *action, char *timeout)
{ |
|
int | err = PICL_SUCCESS; |
char | *ptr = NULL; |
wdadm_args_t | wd_arg; |
if (wd_name == NULL) {
return (PICL_INVALIDARG);
}
Chapter 1 Watchdog Timer 15