sonic-buildimage/dockers/docker-snmp
Kuanyu Chen cffd87a627
Add monit_snmp file to monitor memory usage (#14464)
#### Why I did it

When CPU is busy, the sonic_ax_impl may not have sufficient speed to handle the notification message sent from REDIS.
Thus, the message will keep stacking in the memory space of sonic_ax_impl.

If the condition continues, the memory usage will keep increasing.

#### How I did it

Add a monit file to check if the SNMP container where sonic_ax_impl resides in use more than 4GB memory.
If yes, restart the sonic_ax_impl process.

#### How to verify it

Run a lot of this command: `while true; do ret=$(redis-cli -n 0 set LLDP_ENTRY_TABLE:test1 test1); sleep 0.1; done;`
And check the memory used by sonic_ax_impl keeps increasing.

After a period, make sure the sonic_ax_impl is restarted when the memory usage reaches the 4GB threshold.
And verify the memory usage of sonic_ax_impl drops down from 4GB.
2023-04-06 12:19:11 -07:00
..
base_image_files Add monit_snmp file to monitor memory usage (#14464) 2023-04-06 12:19:11 -07:00
critical_processes [dockers] Update critical_processes file syntax (#4831) 2020-06-25 21:18:21 -07:00
Dockerfile.j2 [infra] Support syslog rate limit configuration (#12490) 2022-12-20 10:53:58 +02:00
snmp_yml_to_configdb.py Replace swsssdk with swsscommon (#11215) 2022-07-11 10:01:10 +08:00
snmpd.conf.j2 updated jinja template for snmp contact python2 vs python3 issue (#9949) 2022-02-10 09:01:46 -08:00
start.sh [snmp]: updated to support snmp config from redis configdb (#6134) 2021-01-05 13:43:29 -08:00
supervisord.conf [docker-snmp]: Modify log level of snmpd (#9734) 2022-01-12 14:40:01 -08:00
sysDescription.j2 [dockers] Rename 'docker-snmp-sv2' to 'docker-snmp' (#4699) 2020-06-11 16:04:23 -07:00