• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / Command To Find Top 10 Memory Consuming Process In Linux

Command To Find Top 10 Memory Consuming Process In Linux

By Sourabh / July 11, 2022 Category: How To, Ubuntu

How to find top CPU consuming process in Linux? Which is the command to find top 10 memory consuming process in Linux.

Learn how can we display top 10 processes in descending order in Linux Ubuntu.

Ubuntu users can easily see running processes in Linux Terminal using ps command. The ps reports a snapshot of the current processes.

ps displays information about a selection of the active processes. It is slighyly different from top command. top command is used when you want a repetitive update of the selection and the displayed information.

List Top Memory Consuming Processes In Terminal

The ps command can be mixed with various options to show the list of top processes sorted by RAM and CPU usage. Run the following command in Terminal to see the top running processes by RAM and CPU usage:

$ ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head

Below is the screenshot of the command output:

list-process-1

Explaining the command and all the options users:

  1. -A Select all processes. Identical to -e.
  2. -e Select all processes. Identical to -A.
  3. -o User-defined format. Option of ps allows to specify the output format. Format is a single argument in the form of a blank-separated or comma-separated list, which offers a way to specify individual output columns.
  4. –pid pidlist process ID. Identical to -p and p.
  5. –ppid pidlist parent process ID. This selects the processes with a parent process ID in pidlist. That is, it selects processes that are children of those listed in pidlist.
  6. –sort Specify sorting order.
  7. cmd simple name of executable
  8. %cpu CPU utilization of the process in “##.#” format. Currently, it is the CPU time used divided by the time the process has been running (cputime/realtime ratio), expressed as a percentage.
  9. %mem Ratio of the process’s resident set size to the physical memory on the machine, expressed as a percentage.

list-process-2

List Top 10 CPU Consuming Processes

Similarly you can also print the top 10 CPU consuming processes. Run the following command given below:

ps -eo pid,comm,%cpu | sort -rk 3 | head

list-process-3

List Top 10 CPU & Memory Consuming Processes

Run the following command to list top 10 CPU and Memory consuming processes:

ps axo ruser,%mem,comm,pid,euser | sort -nr | head -n 10

By default, ps selects all processes with the same effective user ID (euid=EUID) as the current user and associated with the same terminal as the invoker. ps command displays the process ID (pid=PID), the terminal associated with the process (tname=TTY), the cumulated CPU time in [DD-]hh:mm:ss format (time=TIME), and the executable name (ucmd=CMD). By default, the display output is unsorted, but can be sorted using –sort options in recursive manner.

Primary Sidebar

Latest Posts

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap