This program needs the values of the following properties:
Thorough_probe_interval – To set the period during which the probe sleeps
Probe_timeout – to enforce the time-out value of the probe on the nslookup command that does the probing
Network_resources_used – To obtain the IP address on which DNS is running
Retry_count and Retry_interval – To determine the number of restart attempts and the period over which to count them
Rt_basedir – To obtain the directory containing the PROBE program and the gettime utility
The scha_resource_get() function obtains the values of these properties and stores them in shell variables, as follows.
PROBE_INTERVAL=`scha_resource_get -O THOROUGH_PROBE_INTERVAL \ -R $RESOURCE_NAME -G $RESOURCEGROUP_NAME` probe_timeout_info=`scha_resource_get -O Extension -R $RESOURCE_NAME \ -G $RESOURCEGROUP_NAME Probe_timeout` PROBE_TIMEOUT=`echo $probe_timeout_info | awk '{print $2}'` DNS_HOST=`scha_resource_get -O NETWORK_RESOURCES_USED -R $RESOURCE_NAME \ -G $RESOURCEGROUP_NAME` RETRY_COUNT=`scha_resource_get -O RETRY_COUNT -R $RESOURCE_NAME -G\ $RESOURCEGROUP_NAME` RETRY_INTERVAL=`scha_resource_get -O RETRY_INTERVAL -R $RESOURCE_NAME -G\ $RESOURCEGROUP_NAME` RT_BASEDIR=`scha_resource_get -O RT_BASEDIR -R $RESOURCE_NAME -G\ $RESOURCEGROUP_NAME`
For system-defined properties, such as Thorough_probe_interval, scha_resource_get() returns the value only. For extension properties, such as Probe_timeout, scha_resource_get() returns the type and value. Use the awk command to obtain the value only.