JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Reference Manual     Oracle Solaris Cluster
search filter icon
search icon

Document Information

Preface

Introduction

OSC33 1

OSC33 1cl

OSC33 1ha

OSC33 1m

OSC33 3ha

scds_calls(3HA)

scds_close(3HA)

scds_error_string(3HA)

scds_error_string_i18n(3HA)

scds_failover_rg(3HA)

scds_fm_action(3HA)

scds_fm_net_connect(3HA)

scds_fm_net_disconnect(3HA)

scds_fm_print_probes(3HA)

scds_fm_sleep(3HA)

scds_fm_tcp_connect(3HA)

scds_fm_tcp_disconnect(3HA)

scds_fm_tcp_read(3HA)

scds_fm_tcp_write(3HA)

scds_free_ext_property(3HA)

scds_free_netaddr_list(3HA)

scds_free_net_list(3HA)

scds_free_port_list(3HA)

scds_get_current_method_name(3HA)

scds_get_ext_property(3HA)

scds_get_netaddr_list(3HA)

scds_get_port_list(3HA)

scds_get_resource_group_name(3HA)

scds_get_resource_name(3HA)

scds_get_resource_type_name(3HA)

scds_get_rg_hostnames(3HA)

scds_get_rg_hostnames_zone(3HA)

scds_get_rs_hostnames(3HA)

scds_get_zone_name(3HA)

scds_hasp_check(3HA)

scds_initialize(3HA)

scds_pmf_get_status(3HA)

scds_pmf_restart_fm(3HA)

scds_pmf_signal(3HA)

scds_pmf_start(3HA)

scds_pmf_start_env(3HA)

scds_pmf_stop(3HA)

scds_pmf_stop_monitoring(3HA)

scds_print_netaddr_list(3HA)

scds_print_net_list(3HA)

scds_print_port_list(3HA)

scds_property_functions(3HA)

scds_restart_resource(3HA)

scds_restart_rg(3HA)

scds_simple_net_probe(3HA)

scds_simple_probe(3HA)

scds_svc_wait(3HA)

scds_syslog(3HA)

scds_syslog_debug(3HA)

scds_timerun(3HA)

scha_calls(3HA)

scha_cluster_close(3HA)

scha_cluster_get(3HA)

scha_cluster_getlogfacility(3HA)

scha_cluster_getnodename(3HA)

scha_cluster_get_zone(3HA)

scha_cluster_getzone(3HA)

scha_cluster_open(3HA)

scha_cluster_open_zone(3HA)

scha_control(3HA)

scha_control_zone(3HA)

scha_resource_close(3HA)

scha_resource_get(3HA)

scha_resource_get_zone(3HA)

scha_resourcegroup_close(3HA)

scha_resourcegroup_get(3HA)

scha_resourcegroup_get_zone(3HA)

scha_resourcegroup_open(3HA)

scha_resourcegroup_open_zone(3HA)

scha_resource_open(3HA)

scha_resource_open_zone(3HA)

scha_resource_setstatus(3HA)

scha_resource_setstatus_zone(3HA)

scha_resourcetype_close(3HA)

scha_resourcetype_get(3HA)

scha_resourcetype_get_zone(3HA)

scha_resourcetype_open(3HA)

scha_resourcetype_open_zone(3HA)

scha_strerror(3HA)

scha_strerror_i18n(3HA)

OSC33 4

OSC33 5

OSC33 5cl

OSC33 7

OSC33 7p

Index

scha_resourcetype_open

, scha_resourcetype_open_zone

, scha_resourcetype_get

, scha_resourcetype_get_zone

, scha_resourcetype_close

- resource type information access functions.

Synopsis

cc [flags…] -I /usr/cluster/include file -L /usr/cluster/lib -l scha
#include <scha.h>

scha_err_t scha_resourcetype_open(const char *rtname, scha_resourcetype_t *handle);
scha_err_t scha_resourcetype_open_zone(const char *cluster, const char *rt_name,
     scha_resourcetype_t *handlep);
scha_err_t scha_resourcetype_close(scha_resourcetype_t handle);
scha_err_t scha_resourcetype_get(scha_resourcetype_t handle, const char *tag...);
scha_err_t scha_resourcetype_get_zone(const char *cluster, scha_resourcetype_t
     handlep,const char *rt_tag, ...);

Description

You use the scha_resourcetype_open(), scha_resourcetype_get(), and scha_resourcetype_close() functions to access information about a resource type that is used by the Resource Group Manager (RGM) cluster facility.

scha_resourcetype_open() initializes access of the resource type and returns a handle to be used by scha_resourcetype_get().

The rtname argument of scha_resourcetype_open() names the resource type to be accessed.

The handle argument is the address of a variable to hold the value returned from the function call.

scha_resourcetype_get() accesses resource type information as indicated by the tag argument. The tag argument should be a string value defined by a macro in the scha_tags.h header file. Arguments following the tag depend on the value of tag.

An additional argument following the tag may be needed to indicate a cluster node from which the information is to be retrieved, or other information specific to the tag. The last argument in the argument list is to be of a type suitable type to hold the information indicated by tag. This is the "out" argument for the resource type information. No value is returned for the “out” parameter if the function fails. Memory that is allocated to hold information returned by scha_resourcetype_get() remains intact until scha_resourcetype_close() is called on the handle that is used for scha_resourcetype_get().

scha_resourcetype_close() takes a handle argument that is returned from a previous call to scha_resourcetype_open(). This function invalidates the handle and frees memory allocated to return values to scha_resourcetype_get() calls that were made with the handle. Note that memory, if needed to return a value, is allocated for each "get" call. Space allocated to return a value in one call is not overwritten and reused by subsequent calls.

Macros defined in scha_tags.h that might be used as tag arguments to scha_resourcetype_get() follow. The type of the output argument and any additional arguments are indicated. Structure and enum types are described in scha_calls(3HA).

The scha_resourcetype_open_zone() and scha_resourcetype_get_zone() functions serve the same purpose as scha_resourcetype_open() and scha_resourcetype_get() respectively, with an additional cluster argument specifying the name of a zone cluster in which the resource groups exist and on which you want to operate. These functions are useful when code is executed in the global zone but needs to operate on a specified zone cluster. They cannot be used within a zone cluster to access a different zone cluster.

If the cluster argument to scha_resourcetype_open_zone() or scha_resourcetype_get_zone() is NULL, the query is performed on the cluster within which the call is executed; in other words, the call with NULL argument is equivalent to scha_resourcetype_open() or scha_resourcetype_get(), respectively.

If the cluster argument specifies any zone that belongs to the global cluster, the query is performed on the global cluster.

To close the handle returned by scha_resourcetype_open_zone(), use scha_resourcetype_close(). No cluster argument is required.

optag Arguments

The following macros name resource type properties. The value of the named property of the resource's type is output.


Note - optag arguments, such as SCHA_API_VERSION and SCHA_BOOT, are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify optag arguments.


SCHA_API_VERSION

The output argument is of type int*.

SCHA_BOOT

The output argument is of type char **.

SCHA_FAILOVER

The output argument is of type boolean_t *.

SCHA_FINI

The output argument is of type char **.

SCHA_GLOBALZONE

The output argument is of type boolean_t *.

SCHA_INIT

The output argument is of type char **.

SCHA_INIT_NODES

The output argument is of type scha_initnodes_flag_t *.

SCHA_INSTALLED_NODES

The output argument is of type scha_str_array_t **.

SCHA_IS_LOGICAL_HOSTNAME

The output argument is of type boolean_t *.

SCHA_IS_SHARED_ADDRESS

The output argument is of type boolean_t *.

SCHA_MONITOR_CHECK

The output argument is of type char **.

SCHA_MONITOR_START

The output argument is of type char **.

SCHA_MONITOR_STOP

The output argument is of type char **.

SCHA_PER_NODE

The output argument is of type boolean_t *.

SCHA_PKGLIST

The output argument is of type scha_str_array_t **.

SCHA_POSTNET_STOP

The output argument is of type char **.

SCHA_PRENET_START

The output argument is of type char **.

SCHA_PROXY

The output argument is of type boolean_t *.

SCHA_RESOURCE_LIST

The output argument is of type scha_str_array_t**.

SCHA_RT_BASEDIR

The output argument is of type char **.

SCHA_RT_DESCRIPTION

The output argument is of type char **.

SCHA_RT_SYSTEM

The output argument is of type boolean_t *.

SCHA_RT_VERSION

The output argument is of type char **.

SCHA_SINGLE_INSTANCE

The output argument is of type boolean_t *.

SCHA_START

The output argument is of type char **.

SCHA_STOP

The output argument is of type char **.

SCHA_UPDATE

The output argument is of type char **.

SCHA_VALIDATE

The output argument is of type char **.

Return Values

These functions return the following values:

0

The function succeeded.

nonzero

The function failed.

Errors

SCHA_ERR_NOERR

The function succeeded.

See the scha_calls(3HA) man page for a description of other error codes.

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_get(1HA), scha_calls(3HA), scha_strerror(3HA), scha_strerror_i18n(3HA), attributes(5), rt_properties(5)