Operations 3 min read

How to Quickly Identify the Top CPU, Memory, and Virtual Memory Processes on Linux

This guide shows Linux administrators how to use the ps command with sorting and head to list the top ten processes by CPU usage, memory consumption, and virtual memory, explains the meaning of key ps output fields, and provides alternative sorting options.

ITPUB
ITPUB
ITPUB
How to Quickly Identify the Top CPU, Memory, and Virtual Memory Processes on Linux

The article demonstrates practical commands for Linux system monitoring, focusing on extracting the top ten processes that consume the most CPU, memory, and virtual memory using the ps utility combined with head and sort.

1. Top 10 CPU‑consuming processes

Run the following one‑liner to display the header line and then the ten processes with the highest CPU usage (column 3 of ps auxw output):

ps auxw|head -1; ps auxw|sort -rn -k3|head -10

2. Top 10 memory‑consuming processes

To list processes that use the most resident memory (column 4), use:

ps auxw|head -1; ps auxw|sort -rn -k4|head -10

3. Top 10 processes by virtual memory size

For the processes that occupy the most virtual memory (column 5), execute:

ps auxw|head -1; ps auxw|sort -rn -k5|head -10

4. Alternative sorting commands

You can also let ps sort directly: ps auxw --sort=rss – sorts by resident set size (RSS). ps auxw --sort=%cpu – sorts by CPU usage percentage.

5. Meaning of important ps columns

%MEM – percentage of physical memory used by the process.

MAJFL – major page fault count.

VSZ – virtual memory size of the process.

RSS – resident set size, i.e., the actual physical memory used.

TTY – terminal associated with the process.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSystem AdministrationMemory Usageprocess monitoringCPU usageps command
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.