Sun Microsystems, Inc.
   www.sun.com docs.sun.com | | |  
   
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
    
 
Sun Cluster Commandsscha_resource_setstatus(1HA)


NAME

 scha_resource_setstatus - command to set resource status

SYNOPSIS

 scha_resource_setstatus -R resource -G group -s status [-m msg]

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) cluster facility. This command is intended to be 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(3HA) C function.

A successful call to scha_resource_setstatus(1HA) causes the Status and Status_msg properties of the resource to be updated to the supplied values. The update of the resource status is logged in the cluster system log and is visible to cluster administration 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 commands.


OPTIONS

 

The following options are supported:

-G group
Is the resource group that contains the resource.
-m msg
Is a string value. If no -m operand is given, the value of the resource's Status_msg is set to NULL.
-R resource
Names the resource whose status is to be set.
-s status
Is the value of status: OK, DEGRADED, FAULTED, UNKNOWN, or OFFLINE.

EXIT STATUS

 

The following exit values are returned:

0
The command completed successfully.
nonzero
An error occurred.

Failure error codes are described in scha_calls(3HA).

EXAMPLES

 Example 1. Setting the Status of Resource R1
 

The following example 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
 

The following example 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

ATTRIBUTES

 

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

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWscdev
Interface StabilityStable

SEE ALSO

 

scha_cmds(1HA), scha_calls(3HA), scha_resource_setstatus(3HA), attributes(5)



Sun Cluster 3.1Go To TopLast Changed 6 May 2003

 
      
      
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.