How to List the Top 10 CPU, Memory and Virtual Memory Processes on Linux
This guide shows Linux commands for quickly identifying the ten processes that consume the most CPU, memory, or virtual memory, explains the key ps fields, and provides alternative sorting options for system monitoring.
Top CPU‑consuming processes
ps auxw | head -1; ps auxw | sort -rn -k3 | head -10The first part prints the header line of ps auxw. The second part sorts the output by the third column (CPU % used) in descending order and shows the first ten entries.
Top memory‑consuming processes
ps auxw | head -1; ps auxw | sort -rn -k4 | head -10Here the fourth column (memory % used) is used for sorting, yielding the ten processes that occupy the most RAM.
Top virtual‑memory‑consuming processes
ps auxw | head -1; ps auxw | sort -rn -k5 | head -10The fifth column (VSZ – virtual memory size) is sorted to list the processes with the largest virtual memory footprint.
Alternative one‑line sorting commands
ps auxw --sort=rss
ps auxw --sort=%cpuThese commands directly ask ps to sort by resident set size (RSS) or CPU usage without piping to sort.
Important ps field meanings
%MEM : percentage of physical memory used by the process.
MAJFL : major page fault count.
VSZ : virtual memory size of the process (in kilobytes).
RSS : resident set size – the actual physical memory the process is using.
TTY : terminal associated with the process.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
