Sun Cluster Data Services Developer's Guide for Solaris OS

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 man pages in the section 1HA 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.

scha_resource_get

Accesses information about a resource or resource type under the control of the RGM. It provides the same information as the scha_resource_get() function.

scha_resource_setstatus

Sets the Status and Status_msg properties of a resource under the control of the RGM. It is used by the resource's monitor to indicate the resource's state as perceived by the monitor. It provides the same functionality as the scha_resource_setstatus() C function.


Note –

Although scha_resource_setstatus() is of particular use to a resource monitor, any program can call it.


Resource Type Command

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

scha_resourcetype_get

This command provides the same functionality as the scha_resourcetype_get() C function.

Resource Group Commands

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

scha_resourcegroup_get

Accesses information about a resource group under the control of the RGM. This command provides the same functionality as the scha_resourcetype_get() C function.

scha_control

Requests the restart of a resource group under the control of the RGM or its relocation to a different node. This command provides the same functionality as the scha_control() C function.

Cluster Command

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

scha_cluster_get

This command provides the same information as the scha_cluster_get() C function.