Managing HP Serviceguard A.12.00.00 for Linux, June 2014
1. Create a package configuration file that contains the generic resource module:
cmmakepkg $SGCONF/pkg1/pkg1.conf
Package template is created.
This file must be edited before it can be used.
NOTE: To generate a configuration file adding the generic resource module to an existing
package (enter the command all on one line):
cmmakepkg -i $SGCONF/pkg1/pkg1.conf -m sg/generic_resource
2. Edit the package configuration file and specify the generic resource parameters (as shown in
the snippet):
service_name cpu_monitor
service_cmd $SGCONF/generic_resource_monitors/cpu_monitor.sh
service_halt_timeout 10
generic_resource_name sfm_cpu
generic_resource_evaluation_type during_package_start
NOTE: Generic resources must be configured to use the monitoring script. It is the monitoring
script that contains the logic to monitor the resource and set the status of a generic resource
accordingly by using cmsetresource(1m).
These scripts must be written by end-users according to their requirements. The monitoring
script must be configured as a service in the package if the monitoring of the resource is
required to be started and stopped as a part of the package.
This can be achieved by configuring a service_name and a service_cmd, by providing
the full path name of the monitoring script as the service_cmd value as shown in the step.
The service_name and generic_resource_name need not be the same. However, it
would be a good practice to do it, so that it would be easier to identify the monitor.
HP provides a template that describes how a monitoring script can be written. For more
information on monitoring scripts and the template, see “Monitoring Script for Generic
Resources” (page 311) and “Template of a Monitoring Script” (page 313).
If the generic_resource_up_criteria is specified, the given resource is considered to
be an extended generic resource, else it is a simple generic resource. For the description of
generic resources parameters, see “Package Parameter Explanations” (page 184). See “Using
the Generic Resources Monitoring Service” (page 51).
3. After editing the package configuration file, verify the content of the package configuration
file:
cmcheckconf -v -P $SGCONF/pkg1/pkg1.conf
cmcheckconf: Verification completed with no errors found.
Use the cmapplyconf command to apply the configuration
4. When verification completes without errors, apply the package configuration file. This adds
the package configuration information (along with generic resources) to the binary cluster
configuration file in the $SGCONF directory and distributes it to all the cluster nodes.
cmapplyconf -P $SGCONF/pkg1/pkg1.conf
Modify the package configuration ([y]/n)? y
Completed the cluster update
5. Verify that the generic resources parameters are configured.
cmviewcl -v -p pkg1
UNOWNED_PACKAGES
PACKAGE STATUS STATE AUTO_RUN NODE
108 Planning and Documenting an HA Cluster