http://blog.sina.com.cn/xudejun[订阅]
字体大小: 正文
HQ Agent-Understanding Agent Configuration(1)(2009-06-29 16:28:30)

Installing an Agent from an Agent-Only Tarball

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.

                   Start the HQ Agent

                   Stop the HQ Agent

                   Restart the HQ Agent

                   Understanding the Agent Launcher and Agent Lifecycle Management

                   Query and Update the Agent from the HQ Portal*

                   Query and Update the Agent from the Command Line on Windows

                   Query and Update the Agent from the HQ Portal on Unix-Based Platforms

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 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:

                               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 in AgentHome/bin, enter:

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:

                               Remote agent control---An Agent started with the JSW-based launcher can be remotely invoked to restart itself; the launcher can be used to install the Agent as an NT service, query the state of the service or remove it, and ping the Agent.

                               Automatic agent restart---The JSW monitors the Agent JVM process. If the JVM process exits with a non-zero exit code, indicating the JVM is hung or crashed, the JSW will restarts the JVM process. Messages in the Agent and JSW logs indicate that the JSW has restarted the Agent.I f the JSW cannot restart the JVM process, it will try again, up to a total of five times. You can configure different actions for the JSW, including the action it takes upon a particular JVM process exit code, and the number of times that it will attempt to restart the process.

                               Run agent as a service or daemon---The JSW enables running a Java application as a Windows NT Service or daemon process on UNIX systems.

                               Remote agent upgrade---You can upgrade an HQ Agent remotely. For information about creating custom agent bundles for the upgrade process, see Creating a Custom Agent Upgrade Package on page 41.

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.

                               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

 
加载中,请稍候...
  • 评论加载中,请稍候...

验证码:请点击后输入验证码  收听验证码

发评论

以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

相关博文
读取中...
推荐博文
读取中...