Topics marked with * relate to HQ Enterprise-only features.
This section has instructions for key agent lifecycle commands, and a discussion of the agent launcher and its functionality.
Feedback is welcome. Click Add Comment at the bottom of the page.
Start the HQ Agent
1. Make sure that the HQ Server to which the agent will connect is running.
2. Start the agent from the command line under your user account:
On Unix-based platforms:
AGENT_HOME/bin/hq-agent.sh start
On Windows:
AGENT_HOME\bin\hq-agent.bat start
Stop the HQ Agent
Stop the agent from the command line under your user account:
On Unix-based platforms:
AGENT_HOME/bin/hq-agent.sh stop
On Windows:
AGENT_HOME\bin\hq-agent.bat stop
Restart the HQ Agent
Restart the agent using one of these methods:
- From the HQ user interface, use the restart option, available on the Agent Control Commands view on the View tab when the agent is selected.
- From a command shell:
On Unix-based platforms:
AGENT_HOME/bin/hq-agent.sh restart
On Windows:
AGENT_HOME\bin\hq-agent.bat restart
Query and Update the Agent from the HQ User Interface
Available only in HQ Enterprise
You can perform the following operations on an HQ Agent from the HQ user interface:
- Upgrade the agent
- Push plugins to the agent
- Query the agent for its version
- Ping the agent
- Restart the Agent
Agent control commands can be accessed from an agents Views tab in the HQ Portal.
Query and Update the Agent from the Command Line on Windows
On Windows systems, use this command and a supported command switch to invoke agent operations from a command shell:
AGENT_HOME\bin\hq-agent.bat
Command switches are shown below.
- 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
- ping - pings the agent process for availability
- setup - prompts for setup configuration for the agent process
Query and Update the Agent from the Command Line on Unix-Based Platforms
On Unix-based systems, use this command and a supported command switch to invoke agent operations from a command shell:
AGENT_HOME/bin/hq-agent.sh
Command switches are shown below.
- start - starts the agent as a daemon process
- stop - stops the agent process
- restart - stops and then starts the agent's JVM process
- status - indicates whether there exists a running agent process
- dump - sends a kill -3 signal to the agent JVM process in order to obtain a full thread dump
- ping - pings the agent process for availability
- setup - prompts for setup configuration for the agent process
Running the HQ Agent Without the Java Service Wrapper
If you run an HQ 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 &