The AgentServer utility enables you to test agents without running the HAD process. The utility is part of the product package and is installed in the directory
Run the AgentServer utility on any node when the engine process is not running.
To start the AgentServer and access help (UNIX)
The AgentServer utility monitors a TCP port for messages from the agents. Configure this port by setting the following string in the /etc/services file to the port number.
vcstest <port number>/tcp
If you do not specify this value, AgentServer uses the default value 14142.
> help
The following commands are supported.(Use help for more information on using any command.) addattr addres addstaticattr addtype debughash debugmemory debugtime delete deleteres modifyres modifytype offlineres onlineres print proberes startagent stopagent quit
> help onlineres
Sends a message to an agent to online a resource. Usage: onlineres <agentid> <resname> where <agentid> is id for the agent - usually same as the resource type name. where <resname> is the name of the resource.
To test the FileOnOff agent (UNIX)
>startagent FileOnOff /opt/VRTSvcs/bin/FileOnOff/FileOnOffAgent
You receive the following messages:
Agent (FileOnOff) has connected. Agent (FileOnOff) is ready to accept commands.
The sample configuration is set up using AgentServer commands.
>addtype FileOnOff FileOnOff
>addattr FileOnOff FileOnOff PathName str "" >addattr FileOnOff FileOnOff Enabled int 0
Add the static attributes to the FileOnOff resource type:
>addstaticattr FileOnOff FileOnOff ArgList vector PathName
Add the LogLevel attribute to see the debug messages from the agent:
>addstaticattr FileOnOff FileOnOff LogLevel str info
>addres FileOnOff file1 FileOnOff
>modifyres FileOnOff file1 PathName str /tmp/VRTSvcsfile001 >modifyres FileOnOff file1 Enabled int 1
>proberes FileOnOff file1
This calls the monitor entry point of the FileOnOff agent.
You will receive the following messages indicating the resource status:
Resource(file1) is OFFLINE Resource(file1) confidence level is 0
Following Agents are started: FileOnOff
>stopagent FileOnOff
>quit