The O&M tool ocp_agentctl is built in the software package of OCP-Agent of OCP V3.2.0, to help you install, start, stop, and uninstall OCP-Agent. After you install the software package of OCP-Agent, you can run commands to operate OCP-Agent.
Environment
After you install OCP-Agent, you can find ocp_agentctl in the OCP-Agent directory: /home/admin/ocp_agent/bin.
ocp_agentctl is an executable file. You can execute the file on the CLI for the O&M and management of OCP-Agent. You can directly execute ocp_agentctl under the /home/admin/ocp_agent/bin directory.
<main id="notice" type='notice'>
<h4>Notice</h4>
<p><li>The execution logs of <code>ocp_agentctl</code> will be stored in the <code>agentctl.log</code> file under the <code>/home/admin/ocp_agent/log</code> directory.</li><li>The ocp_agentctl file can be executed only for the O&M of the local OCP-Agent, and the O&M of a remote OCP-Agent is not supported.</li></p>
</main>
Command line format
ocp_agentctl [COMMAND] [OPTIONS]
COMMAND specifies an operation command such as the start or stop command.
OPTIONS specifies additional options, including:
- -help: This option can be simplified as “-h” and is used to query the usage help.
Examples
Query the usage help of the tool
Run the following command to query the usage help of the tool:
./ocp_agentctl -hThe usage of this tool and supported operation commands are returned.
Query the usage help of a command
./ocp_agentctl config -hThe usage of the config command and its applicable objects are returned.
Start OCP-Agent
./ocp_agentctl start
ocp_agentd, ocp_monagent, and ocp_mgragent will also be started.
Stop OCP-Agent
./ocp_agentctl stop
ocp_agentd, ocp_monagent, and ocp_mgragent will also be stopped, and the host status changes to offline. This will cause the loss of OCP monitoring metric data and SQL diagnostic data, and OceanBase log alerts will become unavailable.
Restart OCP-Agent
./ocp_agentctl restart
View the installation information of OCP-Agent
./ocp_agentctl info
The name, version, architecture, and description of OCP-Agent are returned.