Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

scha_resourcetype_get(1ha) [opensolaris man page]

scha_resourcetype_get(1HA)				       Sun Cluster Commands					scha_resourcetype_get(1HA)

NAME
scha_resourcetype_get - access resource type information SYNOPSIS
scha_resourcetype_get -O optag -T type DESCRIPTION
The scha_resourcetype_get command accesses information about a resource type that is registered with the Resource Group Manager (RGM). Use this command in shell script implementations of the callback methods for resource types that represent services that are controlled by the RGM. This command provides the same information as the scha_resourcetype_get(3HA) C function. Information is output by this command to the standard output (stdout) in formatted strings, as described in the scha_cmds(1HA) man page. Output is a string or several strings that are output on separate lines. You can store the output in shell variables. You can also parse the output by using the awk(1) command or other shell commands for further use by the script. You need solaris.cluster.resource.read RBAC authorization to use this command. See the rbac(5) man page. Authorized users can issue privileged Sun Cluster commands on the command line from the pfsh(1), pfcsh(1), or pfksh(1) profile shell. A profile shell is a special kind of shell that enables you to access privileged Sun Cluster commands that are assigned to the Sun Cluster Commands rights profile. A profile shell is launched when you run su(1M) to assume a role. You can also use pfexec(1) to issue privileged Sun Cluster commands. OPTIONS
The following options are supported: -O optag Indicates the information to be accessed. Note - optag options, such as API_VERSION and BOOT, are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify optag options. The following optag values retrieve the corresponding resource type properties. The value of the named property of the resource's type is output. API_VERSION BOOT FAILOVER FINI INIT INIT_NODES INSTALLED_NODES IS_LOGICAL_HOSTNAME IS_SHARED_ADDRESS MONITOR_CHECK MONITOR_START MONITOR_STOP PKGLIST POSTNET_STOP PRENET_START RESOURCE_LIST RT_BASEDIR RT_DESCRIPTION RT_SYSTEM RT_VERSION SINGLE_INSTANCE START STOP UPDATE VALIDATE -T type Is the name of a resource type that is registered for use by the RGM cluster facility. EXIT STATUS
The following exit values are returned: 0 The command completed successfully. nonzero An error occurred. Failure error codes are described scha_calls(3HA). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscdev | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
awk(1), scha_cmds(1HA), scha_calls(3HA), scha_resourcetype_get(3HA), attributes(5), rt_properties(5) Sun Cluster 3.2 31 May 2006 scha_resourcetype_get(1HA)

Check Out this Related Man Page

scha_resource_setstatus(1HA)				       Sun Cluster Commands				      scha_resource_setstatus(1HA)

NAME
scha_resource_setstatus - set resource status SYNOPSIS
scha_resource_setstatus -R resource -G group -s status [-m msg] [-Z zonename] DESCRIPTION
The scha_resource_setstatus command sets the Status and Status_msg properties of a resource that is managed by the Resource Group Manager (RGM). This command is intended to be used by the resource's monitor to indicate the resource's state as perceived by the monitor. It pro- vides the same functionality as the scha_resource_setstatus(3HA) C function. When you execute the scha_resource_setstatus(1HA) command, the Status and Status_msg properties of the resource are updated with the values that you specify. Sun Cluster logs the change to the resource status in the cluster system log, which you can view with cluster administra- tion tools. You need solaris.cluster.resource.admin RBAC authorization to use this command. See rbac(5). You must also be able to assume a role to which the Sun Cluster Commands rights profile has been assigned to use this command. Authorized users can issue privileged Sun Cluster commands on the command line from the pfsh(1), pfcsh(1), or pfksh(1) profile shell. A profile shell is a special kind of shell that enables you to access privileged Sun Cluster commands that are assigned to the Sun Cluster Commands rights profile. A profile shell is launched when you run su(1M) to assume a role. You can also use pfexec(1) to issue privileged Sun Cluster com- mands. OPTIONS
The following options are supported: -G group Specifies the resource group that contains the resource. -m msg Specifies the text string that you want to assign to the Status_msg property of the resource. If you do not specify this option, the value of the resource's Status_msg is set to NULL. -R resource Specifies the resource whose status is to be set. -s status Specifies the value of status: OK, DEGRADED, FAULTED, UNKNOWN, or OFFLINE. -Z zonename Specifies the name of the non-global zone in which a resource group is configured to run. If the Global_zone property is set to TRUE, methods execute in the global zone even if the resource group that contains the resource runs in a non-global zone. The -Z option sets the status for the non-global zone where the resource group runs rather than for the global zone where the method runs. Use the -Z option only for resource types whose Global_zone property is set to TRUE. This option is not needed if the Global_zone prop- erty is set to FALSE. For more information about the Global_zone property, see the rt_properties(5) man page. EXAMPLES
Example 1 Setting the Status of Resource R1 With a Status_msg The following command sets the status of resource R1 in resource group RG2 to OK and sets the Status_msg to Resource R1 is OK: scha_resource_setstatus -R R1 -G RG2 -s OK -m "Resource R1 is OK" Example 2 Setting the Status of Resource R1 Without a Status_msg The following command sets the status of R1 in resource group RG2 to DEGRADED and sets the Status_msg to NULL: scha_resource_setstatus -R R1 -G RG2 -s DEGRADED Example 3 Setting the Status of Resource R1 in Zone Zone1 With a Status_msg The following example shows a resource type method or monitor that is implemented as a shell script. This shell script shows how to set the status of resource $resource in resource group $rg in zone $localzone to OK. This shell script also sets the Status_msg to "Resource R1 is OK". In this case, the -Z option must be specified because the resource type property Global_zone is assumed to be set to TRUE. resource= rg="" localzone="" zflag="" while getopts R:G:Z: do case $c in R) resource=$OPTARG;; G) rg=$OPTARG;; Z) zflag="-Z" localzone=$OPTARG;; esac done ... scha_resource_setstatus -R $resource -G $rg $zflag $localzone -s OK -m "Resource R1 is OK" EXIT STATUS
The following exit status codes are returned: 0 The command completed successfully. nonzero An error occurred. Failure error codes are described in scha_calls(3HA). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscdev | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
scha_cmds(1HA), scha_calls(3HA), scha_resource_setstatus(3HA), attributes(5), rbac(5), rt_properties(5) Sun Cluster 3.2 7 Sep 2006 scha_resource_setstatus(1HA)
Man Page