Other_Attributes:

 

ATTRIBUTE_NAME

ATTRIBUTE_VALUE

Style

modular

Priority

no_priority

The cmviewcl -v-f line output will be as follows:

cmviewcl -v -f line -p pkg1 grep generic_resource

generic_resource:sfm_diskname=sfm_disk

generic_resource:sfm_diskevaluation_type=during_package_start generic_resource:sfm_diskup_criteria=”N/A” generic_resource:sfm_disknode:node1status=unknown generic_resource:sfm_disknode:node1current_value=0 generic_resource:sfm_disknode:node2status=unknown generic_resource:sfm_disknode:node2current_value=0

NOTE: The default status of a generic resource is UNKNOWN and the default current_value is "0" unless the status/value of a simple/extended generic resource is set using the cmsetresource command.

6.Start the package. As part of the package start, the monitoring script will start the monitoring of the generic resource and set the status accordingly.

cmrunpkg pkg1

NOTE:

Getting and Setting the Status/Value of a Simple/Extended Generic Resource

You can use the Serviceguard commands cmgetresource(1m) and cmsetresource(1m), respectively, to get or set the status of a simple generic resource or the value of an extended generic resource. These commands can also be used in the monitoring script or executed from the CLI. You must be a root user (UID=0) to execute these commands. Non-root users cannot run these commands.

Using Serviceguard Command to Get the Status/Value of a Simple/Extended Generic Resource

Use the cmgetresource command to get the status of a simple generic resource or the value of an extended generic resource. For example:

cmgetresource -r sfm_disk

This retrieves the status of the generic resource sfm_disk if it is configured as a simple resource. If configured as an extended resource, the value is returned.

Using Serviceguard Command to Set the Status/Value of a Simple/Extended Generic Resource

Use the cmsetresource command to set the status of a simple generic resource or the value of an extended generic resource. For example:

cmsetresource -r sfm_disk -s up

This sets the status of the generic resource sfm_disk to up. This is a simple generic resource and only the status can be set to up/down.

cmsetresource -r sfm_lan 10

This sets the current value of the generic resource sfm_lan to 10. This is an extended generic resource and only numeric values from 1 to 2147483647 can be set.

See the man pages for more information.

Package Configuration Planning 135

Page 135
Image 135
HP Serviceguard manual Cmviewcl -v -f line -p pkg1 grep genericresource, Cmrunpkg pkg1, Cmgetresource -r sfmdisk