I set an alarm on my cell phone that when ever RAM usage exceeds 90% then got an alert. I also made a script to monitor all the memory, CPU, RAM etc.
How can I reduce the RAM usage where I also have a script of clear cache... but I can't run it all the time or set a cron against it, because it affects the live service.
I have a following script:
memory_alarm=`/usr/bin/free -m|grep Mem|awk '{print $3/$2 * 100.0}'|cut -d\. -f1`
when I ran a top command, it shows 66% and after some seconds the alerts received of RAM usage 95%