The Cloud Monitor agent exits automatically when resource consumption exceeds a threshold. Adjust the resource limits and restart the agent to resolve this issue.
You can only manage the Cloud Monitor agent by using an administrator account (the root user for Linux or the Administrator user for Windows). However, using an administrator account may introduce certain risks, such as system stability or data security issues. Proceed with caution.
Windows
-
Log on to the server where the Cloud Monitor agent runs as an administrator.
-
Open the argusagent.log file in the C:\Program Files\Alibaba\cloudmonitor\local_data\logs directory.
If the argusagent.log file contains an
exceeds the maxValuemessage, resource consumption exceeded the limit. Examples:-
[WARN ]2022-12-07 23:54:55.805854 [4148] self_monitor.cpp(line:85):the agent's cpu usage(52.55%) exceeds the maxValue(50.00%) -
[WARN ]2022-12-07 23:54:55.805861 [4148] self_monitor.cpp(line:109):the agent will exit, as the agent cpu-usage exceeds the maxValue 4 times
-
-
Open the agent.properties file in the C:\Program Files\Alibaba\cloudmonitor/local_data directory and modify the resource limit parameters.
Adjust the values based on your scenario. The following values are for reference only:
# The maximum size of memory usage. Unit: MB. agent.resource.memory.limit=200 # The maximum number of files that can be opened. In this example, the value is provided for reference only. Specify the value based on the maximum number of opened files supported by the system. agent.resource.fd.limit=100 # The maximum CPU utilization per core. In this example, the maximum CPU utilization per core is 10%. agent.resource.cpu.limit=0.1 -
Delete the agent.status file from the C:\Program Files\Alibaba\cloudmonitor directory.
-
Double-click stop.bat to stop the Cloud Monitor agent.
-
Double-click start.bat to start the Cloud Monitor agent.
Linux
-
Log on to the server where the Cloud Monitor agent runs as the root user.
-
Run the following commands to view the argusagent.log file in the /usr/local/cloudmonitor/local_data/logs directory:
cd /usr/local/cloudmonitor/local_data/logs
cat argusagent.log
If the argusagent.log file contains an
exceeds the maxValuemessage, resource consumption exceeded the limit. Examples:-
[WARN ]2022-12-07 23:54:55.805854 [4148] self_monitor.cpp(line:85):the agent's cpu usage(52.55%) exceeds the maxValue(50.00%) -
[WARN ]2022-12-07 23:54:55.805861 [4148] self_monitor.cpp(line:109):the agent will exit, as the agent cpu-usage exceeds the maxValue 4 times
-
-
Modify the resource limit parameters in the agent.properties file in the /usr/local/cloudmonitor/local_data directory.
-
Run the following commands to open the agent.properties file in the /usr/local/cloudmonitor/local_data directory:
cd /usr/local/cloudmonitor/local_data
vi agent.properties
Adjust the values based on your scenario. The following values are for reference only:
# The maximum size of memory usage. Unit: MB. agent.resource.memory.limit=200 # The maximum number of files that can be opened. In this example, the value is provided for reference only. Specify the value based on the maximum number of opened files supported by the system. agent.resource.fd.limit=100 # The maximum CPU utilization per core. In this example, the maximum CPU utilization per core is 10%. agent.resource.cpu.limit=0.1 -
Press Esc, enter :wq, and press Enter to save and close the agent.properties file.
-
-
Delete the agent.status file from the /usr/local/cloudmonitor directory:
rm /usr/local/cloudmonitor/agent.status
-
Restart the Cloud Monitor agent:
./cloudmonitorCtl.sh restart