Symantec logo

Using the AgentServer utility to test agents

The AgentServer utility enables you to test agents without running the VCS engine process. The utility is part of the product package and is installed in the directory

Windows: %VCS_HOME%\bin

Run the AgentServer utility on any node when theengine process is not running.

 To start AgentServer and test the FileOnOff agent (Windows)

  1. Type the following command to start AgentServer:

    %VCS_HOME%\bin\AgentServer

    AgentServer must monitor a TCP port for messages from the agents. This port number can be configured by setting vcstest to the selected port number in the file C:\WINNT\system32\drivers\etc\services. If vcstest is not specified, AgentServer uses the default value 14142.

  2. Start the agent for the resource type:

    >startagent FileOnOff %VCS_HOME%\bin\VCSAgDriver.exe

    . You will receive the following messages:

    Agent (FileOnOff) has connected.

    Agent (FileOnOff) is ready to accept commands.

  3. Review the sample configuration:

types.cf:

type FileOnOff (

str PathName

static str ArgList[] = { PathName }

NameRule = resource.PathName

)

main.cf:

...

group ga (

...

)

FileOnOff file1 (

Enabled = 1

PathName = "C:\\VRTSvcsfile001"

)

  1. Refer to the types.xml and main.xml configuration files when testing the FileOnOff agent. In the next step, the sample configuration is set up using AgentServer commands.
  2. Complete step n through step n to pass this sample configuration to the agent.

>modifyres FileOnOff file1 Enabled int 1

  1. After adding and modifying resources, type the following command to obtain the status of a resource:

    >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

  2. View the list of agents started by the AgentServer process:

    >print

    Output resembles:

    Following Agents are started:

    FileOnOff

  3. Stop the agent:

    >stopagent FileOnOff

  4. Exit from the AgentServer:

    >quit