Visit The New, Modern Unix Linux Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #50
Difficulty: Medium
Matti Makkonen is considered to be the 'Father of SMS'.
True or False?
Linux & Unix Commands - Search Man Pages

scha_resource_setstatus(3ha) [opensolaris man page]

scha_resource_setstatus(3HA)				 Sun Cluster HA and Data Services			      scha_resource_setstatus(3HA)

NAME
scha_resource_setstatus, scha_resource_setstatus_zone - set resource status functions SYNOPSIS
cc [flags...] -I /usr/cluster/include file -L /usr/cluster/lib -l scha #include <scha.h> scha_err_t scha_resource_setstatus(const char *rname, const char *rgname, scha_rsstatus_t status, const char *status_msg); scha_err_t scha_resource_setstatus_zone(const char *rname, const char *rgname, const char *zonename, scha_rsstatus_t status, const char *status_msg); DESCRIPTION
The scha_resource_setstatus() and scha_resource_setstatus_zone() functions set the Status and Status_msg properties of a resource that is managed by the Resource Group Manager (RGM). A resource's monitor uses these functions to indicate the resource's state as perceived by the monitor. Use the scha_resource_setstatus() and scha_resource_setstatus_zone() functions only for resource types whose Global_zone property is set to TRUE. These functions are not needed if the Global_zone property is set to FALSE. For more information, see the rt_properties(5) man page. The rname argument names the resource whose status is to be set. The rgname argument is the name of the resource group that contains the resource. The zonename argument is the name of the non-global zone in which the 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 status argument is an enum value of type scha_rsstatus_t: SCHA_RSSTATUS_OK, SCHA_RSSTATUS_OFFLINE, SCHA_RSSTATUS_FAULTED, SCHA_RSSTA- TUS_DEGRADED, or SCHA_RSSTATUS_UNKNOWN. The status_msg argument is the new value for the Status_msg property. The status_msg argument can be NULL. A successful call to the scha_resource_setstatus() or scha_resource_setstatus_zone() function causes the Status and Status_msg properties of the resource to be updated with the supplied values. The update of the resource status is logged in the cluster system log and is acces- sible by cluster administration tools. RETURN VALUES
The scha_resource_setstatus() and scha_resource_setstatus_zone() functions return the following values: 0 The function succeeded. nonzero The function failed. ERRORS
SCHA_ERR_NOERR The function succeeded. See scha_calls(3HA) for a description of other error codes. EXAMPLES
Example 1 Using the scha_resource_setstatus_zone() Function #include <scha.h> scha_err_t err_code; const char *rname = "example_R"; const char *rgname = "example_RG"; err_code = scha_resource_setstatus_zone(rname, rgname, SCHA_RSSTATUS_OK, "No problems"); FILES
/usr/cluster/include/scha.h Include file /usr/cluster/lib/libscha.so Library ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscdev | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
scha_resource_setstatus(1HA), scha_calls(3HA), scha_strerror(3HA), attributes(5), rt_properties(5) Sun Cluster 3.2 7 Sep 2007 scha_resource_setstatus(3HA)

Check Out this Related Man Page

scds_get_zone_name(3HA) 				 Sun Cluster HA and Data Services				   scds_get_zone_name(3HA)

NAME
scds_get_zone_name - retrieve the name of a zone on whose behalf a method is running SYNOPSIS
cc [flags...] -I /usr/cluster/include file -L /usr/cluster/lib -l dsdev #include <rgm/libdsdev.h> const char *scds_get_zone_name(scds_handle_t handle DESCRIPTION
The scds_get_zone_name() function returns a pointer to a character string. If the following conditions are met, this character string con- tains the name of the zone in which a resource group runs: o The Global_zone resource type property is set to TRUE. See the rt_properties(5) man page for information about the Global_zone resource type property. o The method is configured to run in a non-global zone. In all other cases, including the following, the character string is NULL: o Sun Cluster software is running on an operating system that does not support zones. o The resource group and the method are running in the global zone. o The Global_zone resource type property is set to FALSE. To obtain the name of the zone in which a method is actually executing, use the zonename command. See the zonename(1) man page. The pointer to the character string points to memory that belongs to the Data Service Development Library (DSDL). Do not modify this mem- ory. A call to scds_close() invalidates this pointer. PARAMETERS
The following parameters are supported: handle The handle that is returned from scds_initialize(3HA). ERRORS
SCHA_ERR_NOERR The function succeeded. See scha_calls(3HA) for a description of other error codes. FILES
/usr/cluster/include/rgm/libdsdev.h Include file /usr/cluster/lib/libdsdev.so Library ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscdev | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
zonename(1), scds_close(3HA), scds_initialize(3HA), scha_calls(3HA), attributes(5), rt_properties(5) Sun Cluster 3.2 7 Sep 2007 scds_get_zone_name(3HA)

Featured Tech Videos