Start, Stop, and Other Agent Operations

Topics marked with * relate to features available only in vFabric Hyperic.

Starting an Agent for the First Time

The first time you start a Hyperic Agent, you must supply setup information (unless it is available in agent.properties). For information about starting an agent for the first time, and installing the agent as a service in Windows environments, see Set Up Agent Interactively.

Run the Agent Launcher from the Command Line

You initiate the agent launcher and agent lifecycle commands with the hq-agent.sh, or hq-agent.bat script, in the AgentHome/bin directory.

Running hq-agent.sh

  1. Open a command shell or terminal window.

  2. Enter a command of this form:

     
    sh hq-agent.sh command 

Where command is one of the following:

  • start — Starts the agent as a daemon process.

  • stop — Stops the agent's JVM process.

  • restart — Stops and then starts the agent's JVM process

  • status — Queries the status of the agent's JVM process.

  • dump — Runs a thread dump for the agent process, and writes the results to the agent.log file in AgentHome/log.

  • ping — Pings the agent process.

  • setup — Causes the Hyperic Agent to prompts you for the agent-server connection properties, allowing you to change the values that were provided at first agent startup.

Running hq-agent.bat

  1. Open a terminal window.

  2. Enter a command of this form:

     
    hq-agent.bat command 

Where command is one of the following:

  • start - starts the agent as an NT service

  • stop - stops the agent as an NT service

  • restart - stops and then starts the agent's JVM process

  • install - installs the agent NT service

  • remove - removes the agent's service from the NT service table

  • query - queries the current status of the agent NT service  (status

  • ping - pings the agent process for availability

  • setup - prompts for setup configuration for the agent process

Run the Agent Launcher from the Hyperic User Interface

In vFabric Hyperic, you can issue selected commands to an running Hyperic Agent.

Available only in vFabric Hyperic

Agent control commands are available on the Views tab for an Hyperic Agent or a group of agents in inventory.

Run the Agent Without the Java Service Wrapper

If you run an Hyperic Agent on a system that does not support the Java Service Wrapper, or for other reasons prefer not to use the wrapper, you can start the agent without the wrapper.

The hq-agent-nowrapper.sh agent start script in AgentHome/bundles/agent-x.y.z/bin

Because hq-agent-nowrapper.sh does not fork itself into the background, run it using nohup:

nohup AgentHome/bundles/agent-x.y.z/bin/hq-agent-nowrapper.sh &