< Previous | Next > | |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide |
infoThe info entry point enables agents to obtain information about an online resource. For example, the Mount agent's info entry point could be used to report on space available in the file system. All information collected by the info entry point is stored in the temp attribute ResourceInfo. The ResourceInfo attribute is a string association that stores name-value pairs. By default, there are three such name-value pairs: State, Msg, and TS. State indicates the status of the information contained in the ResourceInfo attribute; Msg indicates the output of the info entry point, in any; TS indicates the timestamp of when the ResourceInfo attribute was last modified. The entry point can optionally modify a resource's ResourceInfo attribute by adding or updating other name-value pairs using the following commands: hares -modify res ResourceInfo -add attribute value hares -modify res ResourceInfo -update attribute value For a description of the ResourceInfo attribute, see ResourceInfo. Refer also to the manual page for the hares command. For input, the info entry point receives as arguments the resource name, the value of resinfo_op, and the ArgList attribute values. In the case of C++ implementation, the output of the entry point is returned in info_output. Any optional name-value pairs are returned in either opt_add_args or opt_update_args two-dimensional character arrays. See the C++ example, Example, Info Entry Point Implementation in C++. For the script example, see info. Return Values
The info entry point can be invoked from the command line for a given online resource using the hares -refreshinfo command. See the hares manual page. onlineThe online entry point typically contains the code to bring a resource online. For example, the online entry point for an IP agent configures an IP address. When the online procedure completes, the monitor entry point is automatically called by the framework to verify that the resource is online. The online entry point receives a resource name and ArgList attribute values as input. It returns an integer indicating the number of seconds to wait for the online to take effect. The typical return value is 0. If the return value is not zero, the agent framework schedules the monitor to begin only after this time has elapsed. offlineThe offline entry point is called to take a resource offline. For example, the offline entry point for an IP agent removes an IP address from the system. When the offline procedure completes, the monitor entry point is automatically called by the framework to verify that the resource is offline. The offline entry point receives a resource name and ArgList attribute values as input. It returns an integer indicating the number of seconds to wait for the offline to take effect. The typical return value is 0. If the return value is not zero, the agent framework schedules the monitor to begin only after this time has elapsed. |
^ Return to Top | < Previous | Next > |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide | |
VERITAS Software Corporation
www.veritas.com |