Manpage of LIBCLUSTER
Section: OpenSSI Prog Manual (3ssi)
Updated: 30 October 2003
cluster_membership - returns list of nodes in the UP state
int cluster_membership(transid_t *transid, int arraylength,
cc [flag ...] file -lcluster [library ...]
function stores in the location pointed to by membershiparray a list of nodes that are in the
state at the time of the call. The cluster_membership function fills the array with the node numbers of the nodes that are in the UP state. For example, if the array has six elements but only two nodes are up (nodes 1 and 2), membershiparray equals 1, membershiparray equals 2, and membershiparray[2-5] equals 0. The application can check the filled-in membershiparray to see which nodes are up. A value of zero (0) terminates the list of UP nodes.
It returns in
the membership transition ID that identifies the last membership transition that occurred in the cluster prior to the call to
The transition ID serves as a label for the membership list and can be used in other Cluster API functions. For example, the
can be used in a call to
to determine what has changed since that point. If the membership transition ID is NULL, no membership transition ID is returned.
For details about node states and transitions, see the
The value for the arraylength parameter should be obtained by a call to
A pointer to the returned transition ID that identifies the last membership transition that occurred in the cluster prior to a call to
This value can be NULL.
The number of elements in membershiparray. Obtain this number with a call to
A pointer to the array of nodes in the cluster that are in the UP state.
function returns the number of UP nodes on success, or -1 if an error occurred (in which case,
is set appropriately).
is less than the number of nodes currently in the UP state. If this function fails,
transid and membershiparray
are not modified.
This document was created by man2html,
using the manual pages.
Time: 21:59:39 GMT, May 19, 2004