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

This issue is not the same as the question on how to see the memory usage of a Linux process.

Also, the top command doesn't give the exact memory used, but just what percentage one process uses, so is there any powerful tool which I can use to monitor memory usage of each process on Linux easily?

share|improve this question
Virtual memory? Physical memory? Resident set? It would help a lot to know what you're actually trying to do so that we could tell you the best way to do it. –  David Schwartz Sep 5 '12 at 3:34

4 Answers 4

Ummmm, how about top?

The VIRT, RES, and SHR columns (which are present by default in every version of top I've used) list memory consumed (in kb), which is exactly what you're looking for.

share|improve this answer

I use htop.

htop image

Extra characters.....

share|improve this answer

If you don't like top for whatever reason, you can also monitor the memory usage of running process (and just about anything else) with Cacti, which would give you a nice visual output, too.

In fact, someone over at the Cacti forums wrote up a script for this very thing... the memory usage of your running processes on one graph. It's for Windows, but this is pretty easy (easier, even) to do in Linux with Cacti, too.

share|improve this answer

Short answer is no.

Areas of memory assigned for a process may be read-only, copy-on-write or writeable. Only in the case of writeable (non-shared) memory is it assigned directly to the process. Read-only and COW pages cannot easily be counted only once where it has multiple references (since each process sees the physical pages at different addresses).

ps_mem.py does a better job than ps / top et al - but it's still a long way from being an accurate measure of what's really going on with memory - particularly on a machine raunning lots of servers.

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.