-
prstat -s rss
‘-s’ sorts prstat output by rss
column (see man page for other
columns). Also try ‘-a’ option for a
per user accumulation. -
ps -eo pid,pmem,vsz,rss,comm | sort
-rnk2 | headTop 10 RAM consumers. ‘-o pmem’
displays percentage of resident
memory i.e. RAM used by process. -
ls -lh /proc/{pid}/as
Easy way to show total address space
(vsz) of a process. Useful in
combination with pgrep to accumulate
by user, pattern, … e.g.:for pid in `pgrep -U webserver`; do ls -lh /proc/$pid/as; done