I have a micro instance of Centos AMI from EC2 to run my dev instances. Applications keep on blowing off due to memory issues.
How can I find out process that are taking memory and take decisions to terminate them?
I have this in all my .bashrc's:
alias memhogs="ps -A -ao rss,comm | sort -rn | sed -n '1,5{s/^//;s/ /\t/p}'"
It shows you top 5 memory hogs. As for decisions... well, that's application specific really so can't help you there.