Why is the memory usage reported by "ps" significantly different from that reported by "free"?
Issue
- The sum of the RSS values reported by
psis significantly lower than the amount of main memory used as reported byfree.
For example:
$ ps aux | grep -v "USER" | awk 'BEGIN{sum=0}{sum+=$6}END{print sum}'
387056
$ free
total used free shared buffers cached
Mem: 2070740 1956740 114000 0 471584 863064
-/+ buffers/cache: 622092 1448648
Swap: 4192924 384 4192540
In this environment, the sum of RSS in ps is 387056kB. free shows used of -/+ buffers/cache is 622092kB. What is using the difference of 235036 kB?
- The total memory usage reported by
ps auxis higher than the total physical memory.
Environment
- Red Hat Enterprise Linux, all versions
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
