memuse measures unique physical total memory taken by a process and its children, ignoring duplicate copy-on-write pages and shared memory.
This is a solution for http://serverfault.com/questions/676335/how-measure-memory-without-copy-on-write-pages
It's a quick and dirty utility, but feel free to fork & improve.
Example:
~ » sudo ./memuse.py 15897 eugene@eugene-thinkpad
PID Commandline Frames (+unique) VMEM
- 15897 (/usr/bin/zsh ): 1776 +1776 7104 KB
- 9783 (sudo make rundev ): 608 +408 2432 KB
- 9784 (make rundev ): 261 +98 1044 KB
- 9785 (/bin/sh -c cd ajenti-panel && ): 166 +48 664 KB
- 9786 (python ./ajenti-panel -v --aut): 9279 +8977 37116 KB
- 9795 (./ajenti-panel worker [restric): 7637 +1334 30548 KB
- 9834 (./ajenti-panel worker [session): 8972 +2639 35888 KB
----------------------------------------------------------------------------------------
TOTAL: 15280 61120 KB
See also: