Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.