agent-related commands
The agent process is the key to adbmgr's implementation of managing AntDB clusters. It is the intermediate agent that transfers commands between adbmgr and the AntDB cluster and returns command execution results. So to manage the AntDB cluster, you need the agent process to run properly. There are three commands to manage the agent process, and they are described below.
start agent
Command function:
Start the agent process on the specified host. The specified host must be in the host table, and the specific function can be viewed by the help command: \h start agent.
Command format:
START AGENT { ALL | host_name [, ...] } [ PASSWORD passwd ]
Command example:
-- Start the agent process on all hosts in the host table (no mutual trust is configured between hosts and the user password is 'sdg3565' on all hosts):
START AGENT ALL PASSWORD 'sdg3565';
-- Start the agent process on all hosts in the host table, (hosts have been configured for mutual trust):
START AGENT ALL ;
-- Start the agent process on host1, host2 in the host table (no mutual trust is configured between the hosts, and the user password is 'sdg3565' on both host1, host2):
START AGENT host1, host2 PASSWORD 'sdg3565';
-- Start the agent process on host1, host2 in the host table (mutual trust has been configured between the hosts):
START AGENT host1, host2 ;
stop agent
Command function:
Stops the agent process on the specified host. The specified host needs to be in the host table, and the specific function can be viewed with the help command :\h stop agent.
Command format:
STOP AGENT { ALL | host_name [, ...] }
Command example:
-- Stop the agent process on all hosts in the host table:
STOP AGENT ALL ;
-- Stop the agent process on host1, host2 in the host table:
STOP AGENT host1, host2 ;
cmonitor agent
Command function: View the running status of the agent process on the specified host in the host table. The agent process has two running states: running and not running. The specific functions can be viewed with the help command \h stop agent.
Command format:
MONITOR AGENT [ ALL | host_name [, ...] ]
Command example:
-- View the running status of the agent process on all hosts in the host table:
MONITOR AGENT ALL ;
-- View the running status of the agent process on host1, host2 hosts in the host table:
MONITOR AGENT host1, host2 ;