[an error occurred while processing this directive]
Documentation for cluster_membership()
[an error occurred while processing this directive]
[an error occurred while processing this directive]
CI Project |
|
Overview |
|
License |
|
Download |
|
CVS |
|
Contributed Code |
|
Mailing Lists |
|
Goals |
|
Project List |
|
Features |
|
CLMS Features |
|
ICS Features |
|
Current Status |
|
Kernel Hooks |
|
Limitations / Enhancements |
|
|
CI Documentation |
|
Kernel Patch |
|
Cluster Tools |
|
|
[an error occurred while processing this directive]
Printer-friendly version
Manpage of LIBCLUSTER
LIBCLUSTER
Section: OpenSSI Prog Manual (3ssi)
Updated: 30 October 2003
NAME
cluster_membership - returns list of nodes in the UP state
SYNOPSIS
#include <sys/cluster.h>
int cluster_membership(transid_t *transid, int arraylength,
clusternode_t *membershiparray)
cc [flag ...] file -lcluster [library ...]
DESCRIPTION
The
cluster_membership
function stores in the location pointed to by membershiparray a list of nodes that are in the
CLUSTERNODE_UP
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[0] equals 1, membershiparray[1] 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
transid
the membership transition ID that identifies the last membership transition that occurred in the cluster prior to the call to
cluster_membership.
The transition ID serves as a label for the membership list and can be used in other Cluster API functions. For example, the
transid
can be used in a call to
cluster_transition(3ssi)
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
cluster(8ssi)
manual page.
The value for the arraylength parameter should be obtained by a call to
cluster_maxnodes(3ssi)
PARAMETERS
- transid
-
A pointer to the returned transition ID that identifies the last membership transition that occurred in the cluster prior to a call to
cluster_membership.
This value can be NULL.
- arraylength
-
The number of elements in membershiparray. Obtain this number with a call to
cluster_maxnodes(3ssi).
- membershiparray
-
A pointer to the array of nodes in the cluster that are in the UP state.
RETURN VALUE
The
cluster_membership
function returns the number of UP nodes on success, or -1 if an error occurred (in which case,
errno
is set appropriately).
ERRORS
- EINVAL
-
if
arraylength
is less than the number of nodes currently in the UP state. If this function fails,
transid and membershiparray
are not modified.
SEE ALSO
cluster(8ssi),
cluster_detailed_transition(3ssi),
cluster_maxnodes(3ssi),
cluster_name(3ssi),
cluster_ssiconfig(3ssi),
cluster_transition(3ssi),
clusternode_avail(3ssi),
clusternode_info(3ssi),
clusternode_num(3ssi),
This document was created by man2html,
using the manual pages.
Time: 21:59:39 GMT, May 19, 2004
Opensource.hp.com
HP Linux solutions
The Linux Clustering Information Center
This file last updated on
Tuesday, 14-May-2002 09:33:29 UTC
[an error occurred while processing this directive]