Memory Usage Monitoring
Overview
The system memory usage is monitored. When the memory usage exceeds the threshold for the memory usage alarm or drops below the alarm clear threshold, a corresponding alarm is reported, and the alarm information is recorded in the monitoring log.
Configuration Description
/etc/sysmonitor/memory is the configuration file of memory usage monitoring.
The following shows the example configuration items in thisfile:
#Threshold for the memory usage alarm. ALARM="90" #Threshold for the clear alarm. RESUME="80" #Monitoring period (s). PERIOD="60"
Table 1 Configuration description describes the configuration items in the /etc/sysmonitor/memory file.
Configuration Item |
Description |
Mandatory or Not |
Default Value |
---|---|---|---|
ALARM |
Threshold for the memory usage alarm, which is an integer greater than 0. |
No |
90 |
RESUME |
Threshold for the clear alarm, which is an integer greater than or equal to 0. |
No |
80 |
PERIOD |
Monitoring period. Unit: second. Value range: > 0. |
No |
60 |
- After the configuration file of memory usage monitoring is modified, run the systemctl reload sysmonitor command so that the modifications can take effect in a new monitoring period.
- The value of ALARM must be greater than that of RESUME.
- The system measures the average of the memory usage values collected in three monitoring periods, and then determines whether to report a memory usage alarm or a clear alarm based on this average value.
Error Log
If CPU usage alarms are reported, the following information is printed in /var/log/sysmonitor.log:
[2015-04-16:07:24:23]sysmonitor[31896]: memory usage alarm: 90.1% [2015-04-16:07:28:16]sysmonitor[31896]: memory usage resume: 60.4%