Resource Management API Reference
This chapter provides a reference to the access functions and callback methods that make up the Resource Management API (RMAPI). It lists and briefly describes each function and method. However, the definitive reference for these functions and methods is the RMAPI man pages.
The information in this chapter includes:
RMAPI Access Methods - in the form of shell script commands and C functions
scha_resource_get(1HA), scha_resource_close(3HA), scha_resource_get(3HA), scha_resource_open(3HA)
scha_resource_setstatus(1HA), scha_resource_setstatus(3HA)
scha_resourcetype_get(1HA), scha_resourcetype_close(3HA), scha_resourcetype_get(3HA), scha_resourcetype_open(3HA)
scha_resourcegroup_get(1HA), scha_resourcegroup_get(3HA), scha_resourcegroup_close(3HA), scha_resourcegroup_open(3HA)
scha_control(1HA), scha_control(3HA)
scha_cluster_get(1HA), scha_cluster_close(3HA), scha_cluster_get(3HA), scha_cluster_open(3HA)
scha_cluster_getlogfacility(3HA)
scha_cluster_getnodename(3HA)
scha_strerror(3HA)
RMAPI Callback Methods - described in the rt_callbacks(1HA) man page.
Start
Stop
Init
Fini
Boot
Prenet_start
Postnet_stop
Monitor_start
Monitor_stop
Monitor_check
Update
ValidateS
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:
Access information about resources, resource types, resource groups, and clusters
Use with a monitor to set the Status and Status_msg properties of a resource
Request the restart or relocation of a resource group
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.



