← Memory & Performance
Linux · Memory & Performance

How to check the memory usage of a process in Linux

Check a process resident and virtual memory with ps, and its detailed memory map with pmap.


Check how much memory a single process uses. RSS is resident (physical) memory; VSZ is the larger virtual size. pmap breaks it down by mapping.

# Top processes by resident memory (RSS)
ps -eo pid,user,rss,vsz,comm --sort=-rss | head -n 11

# One process, sizes in KB
ps -o pid,rss,vsz,comm -p <pid>

# Detailed memory map, with a total on the last line
pmap -x <pid> | tail -n 1
pmap -x <pid>
LinuxpmapMemory