Operations 2 min read

Master Linux Process Management: Powerful ps Commands and Visual Tips

Learn how to list all processes, filter by user, sort by CPU or memory usage, display top results, and visualize process hierarchies using Linux's ps command suite, with clear examples and screenshots to help you master system monitoring.

Java High-Performance Architecture
Java High-Performance Architecture
Java High-Performance Architecture
Master Linux Process Management: Powerful ps Commands and Visual Tips

(1) Show all processes:

ps -ax | less

(2) Show processes of a specific user (e.g., root): ps -u root (3) Filter processes by CPU and memory usage:

ps -aux | less

(4) Sort processes in descending order by CPU or memory, and combine sorts to show the top 10 results:

ps -aux --sort -pcpu | less
ps -aux --sort -pmem | less
ps -aux --sort -pcpu,+pmem | head -n 10

(5) Display processes in a tree view:

ps -axjf

Alternatively, use the dedicated pstree command for a hierarchical process tree.

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.

CLIprocess managementLinuxUnixsystem-monitoringps command
Java High-Performance Architecture
Written by

Java High-Performance Architecture

Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.

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.