This is a discussion on free vs. ps -aux - Setup ; Question: When I run free on a system (redhat 4AS u4 2.6.9-42) it does not match the value returned by adding up the RSS column in a ps -aux: [root@weblogic1]~# free -k total used free shared buffers cached Mem: 8164748 ...
Question: When I run free on a system (redhat 4AS u4 2.6.9-42) it does
not match the value returned by adding up the RSS column in a ps -aux:
[root@weblogic1]~# free -k
total used free shared buffers
cached
Mem: 8164748 7890920 273828 0 55516
338136
-/+ buffers/cache: 7497268 667480
Swap: 16779884 282560 16497324
# ps aux|awk '{printf "%s +",$6}' > /tmp/mike
# vi /tmp/mike <= to remove RSS and the trailing +
[root@weblogic1]~# cat /tmp/mike|bc
3622388
3622388KB does not equal 7890920KB. What am I not taking into
consideration when comparing the output between these two commands?
Question2: Is there a better way than "ps aux" to determine the amount
of physical memory that all processes on a system are using?