Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
 
Program Interfacecmm_member_getall(3CMM)


NAME

 cmm_member_getall, cmm_member_getcount - retrieve information on the cluster

SYNOPSIS

 
cc [ flag... ] file...  -lcgha_cmm  -lrt
 
#include <cmm.h>
cmm_error_t cmm_member_getall (uint32_t const table_size, cmm_member_t * const member_table, uint32_t * const member_count);
cmm_error_t cmm_member_getcount (uint32_t * const member_count);

DESCRIPTION

The cmm_member_getall() function fills member_table with information about all nodes in the cluster. There is a table entry for each node. The information in this table is of the same type and meaning as that returned by cmm_member_getinfo(). If member_table is a null pointer, cmm_member_getall() behaves like the cmm_member_getcount()function.

The cmm_member_getcount() function returns the number of nodes in the cluster, including the node from which the function is called. The value is stored in the area pointed to by member_count. See the Netra High Availability Suite Foundation Services 2.1 6/03 CMM Programming Guide for further information on the state of the node.

PARAMETERS

The cmm_member_getall() function takes the following parameters:

table_size

Specifies the maximum number of entries in member_table. The maximum number of entries is 1024.

member_table

A pointer to an array of structures where the requested information is placed.

member_count

Specifies the number of nodes in the cluster.

EXTENDED DESCRIPTION

The process calling the cmm_member_getall() and cmm_member_getcount() functions allocates and frees all data structures used to return membership information, including the appropriate number of entries in the cluster node table.

If there are more peer nodes than entries in member table, the table is not modified, member_count is updated, and a CMM_ERANGE error is returned. If there are more member entries than peer nodes, the excess member entries are zeroed out.

If requested membership information is temporarily unavailable, as when a switchover is taking place, a CMM_ENOCLUSTER error is returned.

The calling process is in charge of allocating the memory and indicating the number of entries by table_size.

See the Netra High Availability Suite Foundation Services 2.1 6/03 CMM Programming Guide for information on the cmm_member_t structure.

RETURN VALUES

The cmm_member_getall() and cmm_member_getcount() functions return one of the following values:

CMM_EAGAIN

The information might be deprecated because the node has been out of communication with the master for a period of time.

CMM_EBUSY

The CMM API server is temporarily out of resources to respond to the requested operation. The recommended action is to wait a short time and retry the operation. The length of the waiting must be decided by the user, depending on the application's characteristics.

CMM_ECONN

No nhcmmd is currently accessible on the local node.

CMM_EINVAL

Invalid argument such as member_count is a NULL pointer, or when table_size is greated than 1024.

CMM_ENOCLUSTER

The calling node is not yet in a cluster.

CMM_ENOTSUP

An unexpected service error occurred. The cluster might be in a critical state.

CMM_ERANGE

Not enough entries in the member table to provide the requested information.

CMM_ETIMEDOUT

The call timeout expired before the action was completed.

CMM_OK

Operation succeeds.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
ArchitectureSPARC
AvailabilitySUNWnhcmd
Interface StabilityEvolving
MT-LevelMT-Safe
Cancel-SafetyDeferred-Cancel-Safe Asynchronous-Cancel-Unsafe

SEE ALSO

Intro(3CMM), cmm_member_getinfo(3CMM)


Netra HAS FS 2.1Go To TopLast Changed September 2004