On non-Windows systems, the HQ Agent is automatically installed as a daemon.
1. Create a directory for the HQ Agent.
2. Unpack the tarball into the agent directory.
Starting the agent will run it as a daemon process.
# cd /opt/hyperic-hq-agent-4.1.1
#./hq-agent start ------------第一次开启会进行配置(以后就不需要配置,如果需要修改配置则需要:./hq-agent setup)
For instructions on how to configure the agent, see Configure and Run the HQ Agent.
Installing an Agent from an Agent-Only Zip Archive
To install the HQ Agent as a Windows Service on a Windows system:
1. Create a directory for the HQ Agent.
2. Unpack the archive into the agent directory.
3. Open a command shell and use this command to install the HQ Agent as a Windows Service:
%AGENT_HOME%\bin\hq-agent.bat install
Start, Stop, and Other Agent Control Operations
This section has instructions for key agent lifecycle commands, and a discussion of the agent launcher and its functionality.
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 in AgentHome/bin:
On Unix-based platforms:
hq-agent.sh start
On Windows:
hq-agent.bat start
Stop the HQ Agent
Stop the agent from the command line under your user account
AgentHome/bin:
On Unix-based platforms:
hq-agent.sh stop
On Windows:
hq-agent.bat stop
Restart the HQ Agent
Restart the agent using one of these methods:
On Unix-based platforms:
hq-agent.sh restart
On Windows:
hq-agent.bat restart
Understanding the Agent Launcher and Agent Lifecycle Management
As of HQ 4.0, the HQ Agent launcher is based on the Java Service Wrapper (JSW), a configurable tool that allows Java applications to be run as an NT service or Unix daemon process. It includes fault correction software to automatically restart crashed or frozen JVMs.
JSW runs as a native executable; it invokes and monitors the HQ Agent's JVM, based on configuration information provided to the wrapper at startup. In this way, the wrapper supports restarts of the JVM process without stopping the wrapper process itself. The JSW process acts as a watchdog for the JVM process, periodically pinging it for availability. The JSW enables:
For more information about the features of the Java Services Wrapper, and how to configure its behavior, see http://wrapper.tanukisoftware.org/doc/english/download.jsp.
Query and Update the Agent from the HQ Portal*
You can perform the following operations on an HQ Agent from 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.
插入表情