To display processes in order of real memory (RSS) use
$ ps avx | head -1 ; ps avx | grep -v PID | sort -rn +6 | head -10
The RSS value is the size of working segment and code segment combined together in memory in 1 KB units.
To display top 10 Memory Consuming Process (SZ)
$ ps -ealf | head -1 ; ps -ealf | sort -rn +9 | head -10
or
$ ps aux | head -1; ps aux | sort -rn +4 | head -10
The SZ represents the virtual size in kilobytes of the data section of the process. This number is equal to the number of working-segment pages of the process that have been touched (that is, the number of paging-space slots that have been allocated)times four. File pages are excluded. If some working-segment pages are currently paged out, this number is larger than the amount of real memory being used.
To display top 10 Memory Consuming Process (%MEM)
$ ps aux | head -1 ; ps aux | sort -rn +3 | head -10
Thanks
Monday, May 18, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment