With the help of the following command, you can easily find top 10 processes that are consuming high CPU resources on any Linux system. ps
is the default command available in most of Linux operating system that provide details about processes in system. Open a terminal and execute command:
ps -eo pid,cmd,%mem,%cpu --sort=-%cpu | head
Output will print top 10 processes that are consuming high cpu on your system in descending order. You can also use top command to filter processes by cpu utilization.
Example: Using ps command
Here is the sample output of ps
command that shows top 10 cpu consuming process on your system.
ps -eo pid,cmd,%mem,%cpu --sort=-%cpu | head

Example: Using top command
Alternatively, you can also use top
command and sort the processes in order by CPU utilization.
- Open a terminal.
- Type
top
command then hit enter. - Press
shift + p
to sort the processes by memory (%CPU) usage.Sort processes by cpu utilization in top command
Conclusion
In this tutorial, you have learned about ps
and top
commands to identify processes that are utilizing high CPU in your system. This will help you to keep your system running smoothly.