Symantec logo

Action operation

The agent for DB2 supports the Action operation, which enables you to perform predefined actions or custom actions on a resource. To perform an action on a resource, type the following command:

# hares -action res token [-actionargs arg1 ...] [-sys

system] [-rclus cluster]

The agent supports these predefined actions:

Predefined action tokens and descriptions

Predefined Action Token

Description

VRTS_GetInstanceName 

Retrieves the DB2 instance name of the configured Db2udb resource.  

VRTS_GetRunningServices 

Retrieves the list of processes monitored by the agent for the Db2udb resource. 

For example:

# hares -action db2udb1 VRTS_GetInstanceName -sys systemName

VCS NOTICE V-16-13323 Resource (db2udb0): action (VRTS_GetInstanceName) completed successfully. Output is:

db2inst1

# hares -action db2udb0 VRTS_GetRunningServices -sys systemName

VCS NOTICE V-16-13323 Resource (db2udb0): action (VRTS_GetRunningServices)

completed successfully. Output is:

PARTITION: 0

PID TTY TIME  CMD

9800 ? 0:06  db2sysc

You can also add custom actions for the agent. Refer to the Veritas Cluster Server Agent Developer's Guide for information on defining custom action tokens.