Home | History | Annotate | Download | only in man1ha
 te
CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at CDDL.txt
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at CDDL.txt.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END
Copyright 2008 Sun Microsystems, Inc.
All rights reserved. Use is subject to license terms.
scha_cmds 1HA "11 Sep 2008" "Sun Cluster 3.2" "Sun Cluster Commands"
NAME
scha_cmds - command standard output for scha_cluster_get, scha_control, scha_resource_get, scha_resourcegroup_get, scha_resourcetype_get, scha_resource_setstatus
SYNOPSIS

 scha-command -O optag...
DESCRIPTION

The Sun Cluster scha_cluster_get(1HA), scha_control(1HA), scha_resource_get(1HA), scha_resourcegroup_get(1HA), scha_resourcetype_get(1HA), and scha_resource_setstatus(1HA) commands are command-line 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 command-line interface to the functionality of the scha_calls(3HA) C functions.

The get commands access cluster configuration information. All of these commands have the same general interface. These commands all take an -O optag operand. This operand indicates the information to be accessed. These commands all send the results to the standard output (stdout) as formatted strings. Additional arguments might be needed depending on the command and the value of optag. For information about the format of different optag results, see the "Results Format" section.

Note - optag options, for all scha commands, are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify optag options.

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 scha_resource_setstatus(1HA) command sets the STATUS and STATUS_MSG properties of a resource that is managed by the RGM.

"Result Formats"

The format of strings that are output to the standard output by the commands depends on the type of the result that is indicated by the optag that you include with the -O option. Formats for each type are specified in the following table. Format notation is described in formats(5).

Result TypeFormat on Standard Output
booleanTRUE\en or FALSE\en
enum%s\en, the string name of an enum value.
extension
%s\en, the type attribute of the extension
property, which is one of the following values: STRING, INT, BOOLEAN, ENUM,
or STRINGARRAY.Following the type information, 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.
int%d\en
status
%s\en%s\en, the first string is the
status, which is one of the following enum values: DEGRADED, FAULTED, OFFLINE, ONLINE, or UNKNOWN.The second string is the status message.
string%s\en
string_array
Each element in the array is output in the format %s\en. An asterisk, indicating all nodes, zones, or resources,
can be returned for the GLOBAL_RESOURCES_USED and INSTALLED_NODES properties.
unsigned_int%u\en
unsigned_int_array
Each element in the array is output in the format %u\en
"optag Result Types"

The following table specifies the valid optag values for different commands as well as the type of the result that is output according to the formats specified in the previous table.

optag Values for scha_cluster_get(1HA) Result Type
ALL_NODEIDSunsigned_int_array
ALL_NODENAMESstring_array
ALL_NONGLOBAL_ZONESstring
ALL_NONGLOBAL_ZONES_NODEIDstring
ALL_PRIVATELINK_HOSTNAMESstring_array
ALL_RESOURCEGROUPSstring_array
ALL_RESOURCETYPESstring_array
ALL_ZONESstring
ALL_ZONES_NODEIDstring
CLUSTERNAMEstring
NODEID_LOCALunsigned_int
NODEID_NODENAMEunsigned_int
NODENAME_LOCALstring
NODENAME_NODEIDstring
NODESTATE_LOCALenum (UP, DOWN)
NODESTATE_NODEenum (UP, DOWN)
PRIVATELINK_HOSTNAME_LOCALstring
PRIVATELINK_HOSTNAME_NODEstring
SYSLOG_FACILITYint
ZONE_LOCALstring
optag Values for scha_control(1HA)
CHANGE_STATE_OFFLINE
CHANGE_STATE_ONLINE
CHECK_GIVEOVER
CHECK_RESTART
GIVEOVER
IGNORE_FAILED_START
RESOURCE_DISABLE
RESOURCE_IS_RESTARTED
RESOURCE_RESTART
RESTART
optag Values for scha_resource_get(1HA) Result Type
AFFINITY_TIMEOUTint
ALL_EXTENSIONSstring_array
BOOT_TIMEOUTint
CHEAP_PROBE_INTERVALint
CHEAP_PROBE_INTERVALint
EXTENSIONextension
EXTENSION_NODEextension
FAILOVER_MODE
enum (NONE, HARD, SOFT, RESTART_ONLY, LOG_ONLY )
FINI_TIMEOUTint
GROUPstring
INIT_TIMEOUTint
LOAD_BALANCING_POLICYstring
LOAD_BALANCING_WEIGHTSstring_array
MONITORED_SWITCHenum (DISABLED, ENABLED)
MONITORED_SWITCH_NODEenum (DISABLED, ENABLED)
MONITOR_CHECK_TIMEOUTint
MONITOR_START_TIMEOUTint
MONITOR_STOP_TIMEOUTint
NETWORK_RESOURCES_USEDstring_array
NUM_RESOURCE_RESTARTSint
NUM_RESOURCE_RESTARTS_ZONEint
NUM_RG_RESTARTSint
NUM_RG_RESTARTS_ZONEint
ON_OFF_SWITCHenum (DISABLED, ENABLED)
ON_OFF_SWITCH_NODEenum (DISABLED, ENABLED)
PORT_LISTstring_array
POSTNET_STOP_TIMEOUTint
PRENET_START_TIMEOUTint
R_DESCRIPTIONstring
RESOURCE_DEPENDENCIESstring_array
RESOURCE_DEPENDENCIES_OFFLINE_RESTARTstring_array
RESOURCE_DEPENDENCIES_RESTARTstring_array
RESOURCE_DEPENDENCIES_WEAKstring_array
RESOURCE_PROJECT_NAMEstring
RESOURCE_STATE
enum (ONLINE, OFFLINE, START_FAILED, STOP_FAILED, MONITOR_FAILED, ONLINE_NOT_MONITORED, STARTING, STOPPING)
RESOURCE_STATE_NODEenum (see RESOURCE_STATE for
values)
RETRY_COUNTint
RETRY_INTERVALint
SCALABLEboolean
START_TIMEOUTint
STATUSstatus
STATUS_NODEstatus
STOP_TIMEOUTint
THOROUGH_PROBE_INTERVALint
TYPEstring
TYPE_VERSIONstring
UDP_AFFINITYboolean
UPDATE_TIMEOUTint
VALIDATE_TIMEOUTint
WEAK_AFFINITYboolean
optag Values for scha_resource_get(1HA) and scha_resourcetype_get(1HA)
Result Type
API_VERSIONint
BOOTstring
FAILOVERboolean
FINIstring
GLOBAL_ZONEboolean
INITstring
INIT_NODESenum (RG_PRIMARIES, RT_INSTALLED_NODES )
INSTALLED_NODES
string_array. An asterisk (*)
is returned to indicate all nodes.
IS_LOGICAL_HOSTNAMEboolean
IS_SHARED_ADDRESSboolean
MONITOR_CHECKstring
MONITOR_STARTstring
MONITOR_STOPstring
PER_NODEboolean
PKGLISTstring_array
POSTNET_STOPstring
PRENET_STARTstring
PROXYboolean
RT_BASEDIRstring
RT_DESCRIPTIONstring
RT_SYSTEMboolean
RT_VERSIONstring
SINGLE_INSTANCEboolean
STARTstring
STOPstring
UPDATEstring
VALIDATEstring
optag Values for scha_resourcegroup_get(1HA)
Result Type
AUTO_START_ON_NEW_CLUSTERboolean
DESIRED_PRIMARIESint
FAILBACKboolean
GLOBAL_RESOURCES_USED
string_array (an asterisk (*)
is returned to indicate all resources)
IMPLICIT_NETWORK_DEPENDENCIESboolean
MAXIMUM_PRIMARIESint
NODELISTstring_array
PATHPREFIXstring
PINGPONG_INTERVALint
RESOURCE_LISTstring_array
RG_AFFINITIESstring_array
RG_DEPENDENCIESstring_array
RG_DESCRIPTIONstring
RG_IS_FROZENboolean
RG_MODEenum (FAILOVER, SCALABLE)
RG_PROJECT_NAMEstring
RG_SLM_CPUdecimal
RG_SLM_CPU_MINdecimal
RG_SLM_PSET_TYPE
enum (DEFAULT, DEDICATED_STRONG, DEDICATED_WEAK)
RG_SLM_TYPEenum (AUTOMATED, MANUAL)
RG_STATE
enum (UNMANAGED, ONLINE, OFFLINE, PENDING_ONLINE, PENDING_OFFLINE, ERROR_STOP_FAILED, ONLINE_FAULTED, PENDING_ONLINE_BLOCKED)
RG_STATE_NODEenum (see RG_STATE for
values)
RG_SYSTEMboolean
SUSPEND_AUTOMATIC_RECOVERYboolean
EXIT STATUS

One set of exit status codes is used for all scha commands.

The exit status codes are the numeric values of the scha_err_t return codes of the corresponding C functions as described in scha_calls(3HA).

ATTRIBUTES

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

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWscdev
Interface StabilityStable
SEE ALSO

awk(1), rt_callbacks(1HA), scha_cluster_get(1HA), scha_control(1HA), scha_resource_get(1HA), scha_resourcegroup_get(1HA), scha_resourcetype_get(1HA), scha_resource_setstatus(1HA), scha_calls(3HA), attributes(5), formats(5), r_properties(5), rg_properties(5), rt_properties(5)