| |
The scds_initialize() function initializes the DSDL
environment. You must call this function once at the beginning of each program
or fault monitor that uses any other DSDL functions.
The scds_initialize() function does the following:
- Checks and processes the command line arguments (argc and argv[]) that the framework passes
to the calling program and that must be passed along to scds_initialize(). No further processing of the command line arguments is required
of the calling program. See EXAMPLES.
- Sets up internal data structures with information needed by
the other functions in the DSDL. It retrieves resource, resource type, and
resource group property values and stores them in these data structures. Values
for any properties supplied on the command line by means of the argv[] argument take precedence over those retrieved from the
RGM. That is, if a new value for a property has been specified in the command
line arguments (argv[]) passed to the data service
method, then this new value is returned by the function that retrieves that
property's value. Otherwise, the existing value retrieved from the RGM is
returned.
- Initializes the data service fault monitoring information
- Initializes the logging environment. All syslog messages are
prefixed with: SC[<resourceTypeName>,<resourceGroupName>,<resourceName>,<methodName>
Functions that send messages to syslog use the facility returned by scha_cluster_getlogfacility(). These messages can be forwarded to
appropriate log files and users. See syslog.conf(4) for more information.
- Validates fault monitor probe settings. It verifies that the Retry_interval is greater than or equal to (Thorough_probe_interval
* Retry_count). If this is not true, it sends an appropriate message
to the syslog facility. You could call scds_initialize()
and scds_close() in a VALIDATE method
for this validation of the fault monitor probe settings even if you call no
other DSDL functions in the VALIDATE method.
If scds_initialize() succeeds, you must call scds_close() before exiting the calling program.
If scds_initialize() fails, you must not call scds_close() to clean up. When scds_initialize()
fails, do not call any other DSDL functions. They will return SCHA_ERR_INVAL or a NULL value. Rather, call exit() with a non-zero argument.
|