NAME | SYNOPSIS | DESCRIPTION | EXIT STATUS | ATTRIBUTES | SEE ALSO
The Sun Cluster scha_cluster_get(1HA), scha_control(1HA), scha_resource_get(1HA), scha_resourcegroup_get(1HA), and scha_resourcetype_get(1HA), commands are in shell script implementations of the callback methods for resource types. See rt_callbacks(1HA).
Resource types represent services that are controlled by the cluster's Resource Group Manager (RGM) facility. These commands provide a shell interface to the functionality of the scha_calls(3HA) C functions.
The get commands access cluster configuration information and all have the same general interface in that they take an -O optag operand that indicates the information to be accessed and outputs the results to standard output as formatted strings. Additional arguments might be needed depending on the command and optag. For information regarding the format for different optag results, see the Results Format section. The recognition of optag values is case-insensitive for all of the scha commands.
The scha_control(1HA) command also takes an -O optag option that indicates a control operation, but does not produce output to standard output.
The format of strings output to standard output by the commands depends on the type of the result indicated by the optag given as the -O argument. Formats for each type are specified in the following table. Format notation is described in formats(5).
Result Type | standard output Format |
---|---|
string | "%s\n" |
int | "%d\n" |
unsigned_int | "%u\n" |
boolean | "TRUE\n" or "FALSE\n" |
enum | "%s\n". The string name of an enum value |
string_array | Each element in the array is output in the format "%s\n". An asterisk, indicating all nodes or resources, can be returned for the INSTALLED_NODES and GLOBAL_RESOURCES_USED properties. |
unsigned_int_array | Each element in the array is output in the format "%u\n" |
extension | "%s\n". The type attribute of the extension property - one of STRING,INT, BOOLEAN, ENUM, or STRINGARRAY. Following the type inforation, the property value is output according to the formats for each type as follows: STRING as string, INT as int, BOOLEAN as boolean, ENUM as enum, STRINGARRAY as string_array |
status | "%s\n%s\n". The first string is the status - one of the status enum values: OK, OFFLINE, FAULTED, DEGRADED, or UNKNOWN. The second string is the status message |
The following table specifies the optags for different commands as well as the type of the result that is output according to the formats specified in the previous table.
optags for scha_cluster_get(1HA) | Result Type |
---|---|
NODENAME_LOCAL | string |
NODENAME_NODEID | string |
ALL_NODENAMES | string_array |
NODEID_LOCAL | unsigned_int |
NODEID_NODENAME | unsigned_int |
ALL_NODEIDS | unsigned_int_array |
PRIVATELINK_HOSTNAME_LOCAL | string |
PRIVATELINK_HOSTNAME_NODE | string |
ALL_PRIVATELINK_HOSTNAMES | string_array |
NODESTATE_LOCAL | enum - UP, DOWN |
NODESTATE_NODE | enum - UP, DOWN |
SYSLOG_FACILITY | int |
ALL_RESOURCEGROUPS | string_array |
ALL_RESOURCETYPES | string_array |
CLUSTERNAME | string |
optags for scha_control(1HA) |
---|
GIVEOVER |
RESTART |
CHECK_GIVEOVER |
CHECK_RESTART |
optags for scha_resource_get(1HA) | Result Type |
---|---|
R_DESCRIPTION | string |
TYPE | string |
ON_OFF_SWITCH | enum - DISABLED, ENABLED |
MONITORED_SWITCH | enum - DISABLED, ENABLED |
RESOURCE_STATE | enum - ONLINE, OFFLINE, START_FAILED, STOP_FAILED. MONITOR_FAILED, ONLINE_NOT_MONITORED |
CHEAP_PROBE_INTERVAL | int |
THOROUGH_PROBE_INTERVAL | int |
RETRY_COUNT | int |
RETRY_INTERVAL | int |
FAILOVER_MODE | enum - NONE, HARD, SOFT |
RESOURCE_DEPENDENCIES | string_array |
RESOURCE_DEPENDENCIES_WEAK | string_array |
LOGICAL_HOSTNAMES_USED | string_array |
STATUS | status |
START_TIMEOUT | int |
STOP_TIMEOUT | int |
VALIDATE_TIMEOUT | int |
UPDATE_TIMEOUT | int |
INIT_TIMEOUT | int |
FINI_TIMEOUT | int |
BOOT_TIMEOUT | int |
MONITOR_START_TIMEOUT | int |
MONITOR_STOP_TIMEOUT | int |
MONITOR_CHECK_TIMEOUT | int |
PRENET_START_TIMEOUT | int |
POSTNET_STOP_TIMEOUT | int |
STATUS_NODE | status |
RESOURCE_STATE_NODE | enum - see RESOURCE_STATE for values |
EXTENSION | extension |
ALL_EXTENSIONS | string_array |
GROUP | string |
optags for scha_resource_get(1HA) and scha_resourcetype_get(1HA) | Result Type |
---|---|
RT_DESCRIPTION | string |
RT_BASEDIR | string |
SINGLE_INSTANCE | boolean |
INIT_NODES | enum - RG_PRIMARIES, RT_INSTALLED_NODES |
INSTALLED_NODES | string_array. An asterisk is returned to indicate all nodes. |
FAILOVER | boolean |
API_VERSION | int |
RT_VERSION | string |
PKGLIST | string_array |
START | string |
STOP | string |
VALIDATE | string |
UPDATE | string |
INIT | string |
FINI | string |
BOOT | string |
MONITOR_START | string |
MONITOR_STOP | string |
MONITOR_CHECK | string |
PRENET_START | string |
POSTNET_STOP | string |
IS_LOGICAL_HOSTNAME | boolean |
IS_SHARED_ADDRESS | boolean |
optags for scha_resourcegroup_get(1HA) | Result Type |
---|---|
RG_DESCRIPTION | string |
NODELIST | string_array |
MAXIMUM_PRIMARIES | int |
DESIRED_PRIMARIES | int |
FAILBACK | boolean |
RESOURCE_LIST | string_array |
RG_STATE | enum - UNMANAGED, ONLINE, OFFLINE, PENDING_ONLINE, PENDING_OFFLINE, ERROR_STOP_FAILED |
RG_DEPENDENCIES | string_array |
GLOBAL_RESOURCES_USED | string_array. An asterisk is returned to indicate all resources. |
LOGICAL_HOST | boolean |
PATHPREFIX | string |
RG_STATE_NODE | enum - see RG_STATE for values |
There is one set of exit values for all scha commands.
The exit values are the numeric values of the scha_err_t() return codes of the corresponding C functions as described in scha_calls(3HA).
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE |
ATTRIBUTE VALUE |
---|---|
Availability |
SUNWscdev |
Interface Stability |
Stable |
awk(1), sh(1), rt_callbacks(1HA), scha_cluster_get(1HA), scha_control(1HA), scha_resource_get(1HA), scha_resourcegroup_get(1HA), scha_resourcetype_get(1HA), scha_calls(3HA), formats(5)
NAME | SYNOPSIS | DESCRIPTION | EXIT STATUS | ATTRIBUTES | SEE ALSO