![]() |
< Previous | Next > |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide |
monitorVCSAgResState res_monitor(const char *res_name, void **attr_val,int *conf_level); You may select any name for the function. The parameter conf_level is an output parameter. The return value, which indicates the resource status, must be a defined VCSAgResState value. See Summary of Return Values for Entry Points. The monitor field of VCSAgV40EntryPointStruct passed to VCSAgRegisterEPStruct() must be assigned a pointer to this function. #include "VCSAgApi.h" VCSAgResState res_monitor(const char *res_name, void **attr_val, int *conf_level) { // Code to determine the state of a resource. VCSAgResState res_state = ... if (res_state == VCSAgResOnline) { // Determine the confidence level (0 to 100). *conf_level = ... } else { *conf_level = 0; } return res_state; } void VCSAgStartup() { VCSAgV40EntryPointStruct ep; ... ep.monitor = res_monitor; ... VCSAgRegisterEPStruct(V40, &ep); } |
^ Return to Top | < Previous | Next > |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide | |
VERITAS Software Corporation
www.veritas.com |