To facilitate the installation, start, stop, and uninstallation of OCP-Agent, the OCP-Agent package includes the O&M tool ocp_agentctl. After installing the OCP-Agent package, you can use simple commands to perform O&M operations on OCP-Agent.
Environment
After installing the OCP-Agent package, ocp_agentctl will be located in the OCP-Agent directory: /home/admin/ocp_agent/bin.
ocp_agentctl is an executable file that allows you to perform O&M and management operations on OCP-Agent through the command line. You can directly execute ocp_agentctl in the /home/admin/ocp_agent/bin directory.
Note
- The logs generated by executing
ocp_agentctlwill be output to theagentctl.logfile in the/home/admin/ocp_agent/logdirectory. - This file is only applicable for O&M of the local OCP-Agent and does not support remote O&M.
Command format
ocp_agentctl [COMMAND] [OPTIONS]
COMMAND specifies the operation command to be executed, such as start or stop.
OPTIONS specifies additional options for the operation, such as:
- --help: You can also use "-h" to query the help information.
Examples
Query help information
View help information
./ocp_agentctl -hThe system returns the usage method and supported operation commands of the tool.
View help information for a specific command
./ocp_agentctl config -hThe system returns the usage method, supported objects, and commands for the config command.
Start OCP-Agent
./ocp_agentctl start
After the command is successfully executed, ocp_agentd, ocp_monagent, and ocp_mgragent will be started.
Stop OCP-Agent
./ocp_agentctl stop
After the command is successfully executed, ocp_agentd, ocp_monagent, and ocp_mgragent will be stopped. The host status will be offline, leading to the loss of OCP monitoring metrics and SQL diagnostic data, as well as the unavailability of OceanBase log alerts.
Restart OCP-Agent
./ocp_agentctl restart
View OCP-Agent installation information
./ocp_agentctl info
The system returns information such as the name, version, architecture, and description of OCP-Agent.
