Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.