This document describes how to uninstall, restart, and stop CVM Agents.
CVM Agents include Sgagent and BaradAgent. Sgagent reports component information update and triggers BaradAgent, and BaradAgent reports CVM metric data.
The procedures for Linux and Windows are different. You can refer to the following directions as needed.
/usr/local/qcloud/monitor/baradfolder does not exist, BaradAgent has been uninstalled successfully.
BaradAgent reports some of the CVM metric data. Once uninstalled, BaradAgent stops reporting data. Sgagent consumes just a little memory. If you need to uninstall Sgagent, please refer to the following directions.
crontab -l |grep stargatecommand to check whether there is any scheduled task. If not, Sgagent has been uninstalled successfully.
barad_agent run succis displayed, BaradAgent has been restarted successfully.
stargate agent run succis displayed, Sgagent has been restarted successfully.
The report of CVM metric data will only be stopped unless both Sgagent and BaradAgent are stopped. You can Stop BaradAgent to suspend data report for a while. However, BaradAgent will resume data report in one minute as it will be triggered by Sgagent. Therefore, to stop data report, please stop both Sgagent and BaradAgent in sequence by referring to the following directions:
rm -f /etc/cron.d/sgagenttask
:wqto save the file and exit.
After the command is successfully executed, the service will not be started automatically, and the monitoring data will be lost. To restart the service, both these two Agent services need to be restarted.
services.msc to open the Services Manager to find BaradAgent and Sgagent, as shown in the following figure. Then, right-click a service to start, restart, or stop it.
Open cmd and run the following commands. After "[SC] DeleteService succeeds" is displayed, restart the CVM instance.
sc.exe delete "BaradAgentSvc" sc.exe delete "StargateSvc"