Sun Cluster 3.0 Data Services Developers' Guide

RMAPI Access Methods

The API provides functions to access resource, resource type, and resource group properties, and other cluster information. These functions are provided both in the form of shell commands and C functions, enabling resource type providers to implement control programs as shell scripts or as C programs.

RMAPI Shell Commands

Shell commands are to be used in shell script implementations of the callback methods for resource types representing services controlled by the cluster's RGM. You can use these commands to:


Note -

Although this section provides brief descriptions of the shell commands, the individual (1HA) man pages provide the definitive reference for the shell commands. Each command has a man page of the same name unless otherwise noted.


RMAPI Resource Commands

You can access information about a resource or set the Status and Status_msg properties of a resource with these commands.

Resource Type Command

This command accesses information about a resource type registered with the RGM.

Resource Group Commands

You can access information about or restart a resource group with these commands.

Cluster Command

This command accesses information about a cluster, such as node names, IDs, and states, the cluster name, resource groups, and so on.

C Functions

C functions are to be used in C program implementations of the callback methods for resource types representing services controlled by the cluster's RGM. You can use these functions to do the following:


Note -

Although this section provides brief descriptions of the C functions, the individual (3HA) man pages provide the definitive reference for the C functions. Each function has a man page of the same name unless otherwise noted. See the scha_calls(3HA) man page for information on the output arguments and return codes of the C functions.


Resource Functions

These functions access information about a resource managed by the RGM or indicate the state of the resource as perceived by the monitor.

Resource Type Functions

Together these functions access information about a resource type registered with the RGM.

Resource Group Functions

You can access information about or restart a resource group with these functions.

Cluster Functions

These functions access or return information about a cluster.

Utility Function

This function converts an error code to an error message.