Veritas Cluster Server Agent Developer's Guide 5.0.1 - HP-UX

Article:DOC2646  |  Created: 2010-08-18  |  Updated: 2013-04-25  |  Article URL http://www.symantec.com/docs/DOC2646
Article Type
Documentation

Product(s)

Description



Table of Contents:
Introduction
About VCS agents
How agents work
About the agent framework
Resource type definitions
Agent functions (entry points)
About on-off, on-only, and persistent resources
About attributes
Attribute data types
Attribute dimensions
Attribute scope across systems: global and local attributes
Attribute life: temporary attributes
About intentional offline of applications
About developing an agent
Considerations for the application
High-level overview of the agent development process
Developing the entry points
Building the agent
Testing the agent
Agent entry point overview
About agent entry points
Supported entry points
How the agent framework interacts with entry points
Agent entry points described
About the monitor entry point
About the info entry point
Return values for info entry point
About the ResourceInfo attribute
Invoking the info entry point
About the online entry point
About the offline entry point
About the clean entry point
About the action entry point
Return values for action entry point
About the attr_changed entry point
About the open entry point
About the close entry point
About the shutdown entry point
Return values for entry points
Considerations for using C++ or script entry points
About the VCSAgStartup routine
If you implement entry points using scripts
If you implement all or some of the entry points in C++
Example: VCSAgStartup with C++ and script entry points
About the agent information file
Example agent information file (UNIX)
Agent information
Attribute argument details
Implementing the agent XML information file
About the ArgList and ArgListValues attributes
ArgListValues attribute for agents registered as V50 and later
Overview of the name-value tuple format
Scalar attribute format
Vector attribute format
Keylist attribute format
Association attribute format
About the entry point timeouts
ArgListValues attribute for agents registered as V40 and earlier
Creating entry points in C++
About creating entry points in C++
Entry point examples in this chapter
Data Structures
Syntax for C++ entry points
Syntax for C++ VCSAgStartup
Syntax for C++ monitor
Syntax for C++ info
resinfo_op
info_output
opt_update_args
opt_add_args
Example: info entry point implementation in C++
Syntax for C++ online
Syntax for C++ offline
Syntax for C++ clean
Syntax for C++ action
Syntax for C++ attr_changed
Syntax for C++ open
Syntax for C++ close
Syntax for C++ shutdown
Agent framework primitives
VCSAgRegisterEPStruct
VCSAgSetCookie
VCSAgSetCookie2
VCSAgRegister
VCSAgUnregister
VCSAgGetCookie
VCSAgStrlcpy
VCSAgStrlcat
VCSAgSnprintf
VCSAgCloseFile
VCSAgDelString
VCSAgExec
VCSAgExecWithTimeout
VCSAgGenSnmpTrap
VCSAgSendTrap
VCSAgLockFile
VCSAgInitEntryPointStruct
VCSAgSetStackSize
VCSAgUnlockFile
VCSAgDisableCancellation
VCSAgRestoreCancellation
VCSAgSetEntryPoint
VCSAgValidateAndSetEntryPoint
VCSAgSetLogCategory
VCSAgGetProductName
VCSAgIsMonitorLevelOne
VCSAgIsMonitorLevelTwo
VCSAgMonitorReturn
VCSAgSetResEPTimeout
VCSAgDecryptKey
Agent Framework primitives for container support
VCSAgISContainerCapable
VCSAgExecInContainerWithTmo
VCSAgExecInContainerWithTimeout
VCSAgGetUID
VCSAgIsPidInContainer
VCSAgIsProcInContainer
VCSAgGetContainerID2
VCSAgGetContainerName2
Creating entry points in scripts
About creating entry points in scripts
Rules for using script entry points
On UNIX platforms
Parameters and values for script entry points
ArgList attributes
Examples
Syntax for script entry points
Syntax for the monitor script
Syntax for the online script
Syntax for the offline script
Syntax for the clean script
Syntax for the action script
Syntax for the attr_changed script
Syntax for the info script
Syntax for the open script
Syntax for the close script
Syntax for the shutdown script
Example script entry points
Online entry point for FileOnOff
Monitor entry point for FileOnOff
Monitor entry point with intentional offline
Offline entry point for FileOnOff
Logging agent messages
About logging agent messages
Logging in C++ and script-based entry points
Agent messages: format
Timestamp
Mnemonic
Severity
UMI
Message text
C++ agent logging APIs
Agent application logging macros for C++ entry points
Agent debug logging macros for C++ entry points
Severity arguments for C++ macros
Initializing function_name using VCSAG_LOG_INIT
Log category
Examples of logging APIs used in a C++ agent
Script entry point logging functions
Using functions in scripts
VCSAG_SET_ENVS
VCSAG_SET_ENVS examples, Shell script entry points
VCSAG_SET_ENVS examples, Perl script entry points
VCSAG_LOG_MSG
VCSAG_LOG_MSG examples, Shell script entry points
VCSAG_LOG_MSG examples, Perl script entry points
VCSAG_LOGDBG_MSG
VCSAG_LOGDBG_MSG examples, Shell script entry points
VCSAG_LOGDBG_MSG examples, Perl script entry points
Example of logging functions used in a script agent
Building a custom agent
Files for use in agent development
Creating the type definition file for a custom agent
Naming convention for the type definition file
Requirements for creating the agentTypes.cf file
Example: FileOnOffTypes.cf
Example: Type definition for a custom agent that supports intentional offline
Adding the custom type definition to the configuration
Building a custom agent on UNIX
Implementing entry points using scripts
Example: Using script entry points on UNIX
Example: Using VCSAgStartup() and script entry points on UNIX
Implementing entry points using C++
Example: Using C++ entry points on UNIX
Example: Using C++ and script entry points on UNIX
Installing the custom agent
Defining resources for the custom resource type
Sample resource definition
How the FileOnOff agent uses configuration information
Testing agents
About testing agents
Using debug messages
Debugging agent functions (entry points).
Debugging the agent framework
Using the engine process to test agents
Test commands
Using the AgentServer utility to test agents
Static type attributes
About static attributes
Overriding static type attributes
Static type attribute definitions
ActionTimeout
AEPTimeout
AgentClass
AgentFailedOn
AgentPriority
AgentReplyTimeout
AgentStartTimeout
ArgList
ArgList reference attributes
AttrChangedTimeout
CleanTimeout
CloseTimeout
ContainerOpts
ConfInterval
FaultOnMonitorTimeouts
FireDrill
InfoInterval
InfoTimeout
IntentionalOffline
Leveltwomonitorfrequency
LogDbg
LogFileSize
ManageFaults
MonitorInterval
MonitorStatsParam
MonitorTimeout
NumThreads
OfflineMonitorInterval
OfflineTimeout
OnlineRetryLimit
OnlineTimeout
OnlineWaitLimit
OpenTimeout
Operations
RegList
RestartLimit
ScriptClass
ScriptPriority
SupportedActions
ToleranceLimit
State transition diagrams
State transitions
State transitions with respect to ManageFaults attribute
Internationalized messages
Creating SMC files
SMC format
Example SMC file
Formatting SMC files
Naming SMC files, BMC files
Message examples
Using format specifiers
Converting SMC files to BMC files
Storing BMC files
VCS languages
Displaying the contents of BMC files
Using BMC Map Files
Location of BMC Map Files
Creating BMC Map Files
Example BMC Map File
Updating BMC Files
Appendix
Using pre-5.0 VCS agents
Using pre-5.0 VCS agents and registering them as V51 or later
Outline of steps to change V40 agents V51
Name-value tuple format for agents registered as V51 or later
Scalar attribute format
Vector attribute format
Keylist attribute format
Association attribute format
Example script in V40 and V51
Sourcing ag_i18n_inc modules in script entry points
Guidelines for using pre-VCS 4.0 Agents
Log messages in pre-VCS 4.0 agents
Mapping of log tags (pre-VCS 4.0) to log severities (VCS 4.0)
How Pre-VCS 4.0 Messages are Displayed by VCS 4.0 and Later
Comparing Pre-VCS 4.0 APIs and VCS 4.0 Logging Macros
Pre-VCS 4.0 Message APIs
VCSAgLogConsoleMsg
VCSAgLogI18NMsg
VCSAgLogI18NMsgEx
VCSAgLogI18NConsoleMsg
VCSAgLogI18NConsoleMsgEx

Attachments

vcs_agent_dev.pdf (869 kBytes)

Article URL http://www.symantec.com/docs/DOC2646


Terms of use for this information are found in Legal Notices