cc [flags…] –I /usr/cluster/include file –L /usr/cluster/lib –l dsdev#include <rgm/libdsdev.h> return-value-type scds-get-property-name(scds_handle_t handle);
数据服务开发库 (Data Service Development Library, DSDL) 提供一组用于检索常用资源属性、资源组属性、资源类型属性和扩展属性的值的便利函数。使用 scds_get_ext_property(3HA) 检索用户定义的扩展属性。
所有便利函数均使用以下约定:
这些函数仅使用 handle 参数。要传递到属性检索函数的 handle 参数将通过上一次调用 scds_initialize(3HA) 返回。
每个函数对应于特定属性。
函数的返回值类型与该函数检索到的属性值的类型相匹配。
这些函数不会返回错误,因为返回值已在 scds_initialize(3HA) 中预计算。对于返回指针的函数,在遇到错误情形时将返回 NULL 值,例如,先前未调用 scds_initialize () 的情形。
如果属性的新值已在传递到调用程序的命令行参数中指定 (argv[]),将返回此新值(在实施验证方法的情况下)。通过此方法,您可以在实际设置未来的新属性值之前先验证它们。否则,这些函数将返回从 RGM 中检索到的值。
其中一些便利函数返回指向属于 DSDL 的内存的指针。请勿修改此内存。调用 scds_close(3HA) 会使此指针失效。
有关标准属性的描述,请参见 r_properties(5)、rg_properties(5) 和 rt_properties(5) 手册页。有关扩展属性的描述,请参见各个数据服务手册页。
有关由诸如 scha_prop_type_t、scha_extprop_value_t、scha_initnodes_flag_t、scha_str_array_t、scha_failover_mode_t、scha_switch_t 和 scha_rsstatus_t 等这些函数使用的属性类型的信息,请参见 scha_calls(3HA) 手册页和 scha_types.h 头文件。
这些函数使用以下命名约定:
scds_get_rs_property-name
scds_get_rg_property-name
scds_get_rt_property-name
scds_get_ext_property-name
函数将返回特定资源属性的值。某些属性的值在 RTR 文件中或由 clresource(1CL) 命令明确设置。其他的由 RGM 动态确定。函数将返回与请求的属性相对应的数据类型。
以下每个资源依赖性查询函数都具有相应的“Q”或“合格”版本:
scds_get_rs_resource_dependencies_Q
scds_get_rs_resource_dependencies_Q_offline_restart
scds_get_rs_resource_dependencies_Q_restart
scds_get_rs_resource_dependencies_Q_weak
合格版本将返回为每个资源依赖性声明的范围或限定符(如果有)。r_properties(5) 手册页中介绍了 {LOCAL_NODE}、{ANY_NODE} 和 {FROM_RG_AFFINITIES} 限定符。
int scds_get_rs_cheap_probe_interval(scds_handle_t handle)
scha_failover_mode_t scds_get_rs_failover_mode(scds_handle_t handle)
int scds_get_rs_monitor_stop_timeout(scds_handle_t handle)
scha_switch_t scds_get_rs_monitored_switch(scds_handle_t handle)
scha_str_array_t * scds_get_rs_network_resources_used(scds_handle_t handle)
scha_switch_t scds_get_rs_on_off_switch(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies_Q(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies_offline_restart(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies_Q_offline_restart(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies_restart(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies_Q_restart(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies_weak(scds_handle_t handle)
const scha_str_array_t * scds_get_rs_resource_dependencies_Q_weak(scds_handle_t handle)
const char * scds_get_rs_resource_project_name(scds_handle_t handle)
int scds_get_rs_retry_count(scds_handle_t handle)
int scds_get_rs_retry_interval(scds_handle_t handle)
boolean scds_get_rs_scalable(scds_handle_t handle)
int scds_get_rs_start_timeout(scds_handle_t handle)
int scds_get_rs_stop_timeout(scds_handle_t handle)
int scds_get_rs_thorough_probe_interval(scds_handle_t handle)
函数将返回特定资源组属性的值。某些属性的值由 clresourcegroup(1CL) 命令明确设置。其他的由 RGM 动态确定。函数将返回与请求的属性相对应的数据类型。
int scds_get_rg_desired_primaries(scds_handle_t handle)
const scha_str_array_t * scds_get_rg_global_resources_used(scds_handle_t handle)
boolean_t scds_get_rg_implicit_network_dependencies(scds_handle_t handle)
int scds_get_rg_maximum_primaries(scds_handle_t handle)
const scha_str_array_t * scds_get_rg_nodelist (scds_handle_t handle)
const char * scds_get_rg_pathprefix(scds_handle_t handle)
int scds_get_rg_pingpong_interval(scds_handle_t handle)
const scha_str_array_t * scds_get_rg_resource_list(scds_handle_t handle)
const scha_str_array_t * scds_get_rg_rg_affinities(scds_handle_t handle)
scha_rgmode_t scds_get_rg_rg_mode(scds_handle_t handle)
const char * scds_get_rg_rg_project_name(scds_handle_t handle)
int scds_get_rg_rg_slm_cpu_shares(scds_handle_t handle)
int scds_get_rg_rg_slm_pset_min(scds_handle_t handle)
const char * scds_get_rg_rg_slm_pset_type(scds_handle_t handle)
const char * scds_get_rg_rg_slm_type(scds_handle_t handle)
函数将返回特定资源类型属性的值。某些属性的值在 RTR 文件中或由 clresourcetype(1CL) 命令明确设置。其他的由 RGM 动态确定。函数将返回与请求的属性相对应的数据类型。
int scds_get_rt_api_version(scds_handle_t handle)
boolean_t scds_get_rt_failover(scds_handle_t handle)
scha_initnodes_flag_t scds_get_rt_init_nodes(scds_handle_t handle)
const scha_str_array_t * scds_get_rt_installed_nodes(scds_handle_t handle)
const char * scds_get_rt_rt_basedir(scds_handle_t handle)
const char * scds_get_rt_rt_version(scds_handle_t handle)
boolean_t scds_get_rt_single_instance(scds_handle_t handle)
const char * scds_get_rt_start_method(scds_handle_t handle)
const char * scds_get_rt_stop_method(scds_handle_t handle)
函数将返回特定资源扩展属性的值。属性的值在 RTR 文件中或由 clresource(1CL) 命令明确设置。函数将返回与请求的属性相对应的数据类型。
资源类型可以定义除此处列出的四个属性之外的扩展属性,但这四个属性具有为其定义的便利函数。可使用这些便利函数或使用 scds_get_ext_property(3HA) 函数检索这些属性。必须使用 scds_get_ext_property() 才能检索除这四个属性之外的扩展属性。
scha_str_array_t * scds_get_ext_confdir_list(scds_handle_t handle)
int scds_get_ext_monitor_retry_count(scds_handle_t handle)
int scds_get_ext_monitor_retry_interval(scds_handle_t handle)
int scds_get_ext_probe_timeout(scds_handle_t handle)
所有便利函数都支持以下参数:
从 scds_initialize(3HA) 返回的句柄。
函数的返回值类型与该函数检索到的属性值的类型相匹配。
这些函数不会返回错误,因为返回值已在 scds_initialize(3HA) 中预计算。对于返回指针的函数,在遇到错误情形时将返回 NULL 值,例如,先前未调用 scds_initialize () 的情形。
头文件
库
有关下列属性的说明,请参见 attributes(5):
|
clresource(1CL)、clresourcegroup(1CL)、clresourcetype(1CL)、scds_close(3HA)、scds_get_ext_property(3HA)、scds_get_port_list(3HA)、scds_get_resource_group_name(3HA )、scds_get_resource_name(3HA)、scds_get_resource_type_name(3HA )、scds_initialize(3HA)、scha_calls(3HA)、attributes(5)、r_properties(5)、rg_properties(5) 和 rt_properties(5)