Find Top Running Processes by Memory and CPU Usage
1. Using htop command:
“htop” is a useful substitute for “top” command – the standard process monitoring tool which comes pre-installed on all operating systems running Linux. htop is a real-time process monitoring software for Linux/Unix-like systems, Users can also interact with this utility. It might be thought of as the Linux equivalent of Task Manager in Windows. Htop is a more interactive program because it allows for value and tab flipping using the mouse and keyboard.
Users of Debian and Ubuntu can quickly install it by running the command below:
sudo apt-get install htop
If you are using fedora then execute the below command:
sudo dnf install htop
And if you are a user of Arch then you have to run this command:
pacman -S htop
when asked for a password simply type your password and then press enter. Launch the htop by simply running the htop command.
htop
The CPU and memory use are displayed in the top-left panel of the screen. Sort the process by top CPU and memory usage: You can see the top running process by memory and CPU by sorting them. We can sort the processes using the htop command and any specific column by pressing the F6 key and then press enter.
2. Using system monitor/task manager:
If you are using Ubuntu then simply open the system monitor application by simply searching it.
Then you can see the processes and the resources consumed by each of them. To find the top process by CPU and memory usage press on the %CPU and Memory and they will be arranged in a top-down manner according to the consumption.
In Linux Mint, you can open task manager and sort the processes according to the memory and CPU usage by pressing on the CPU and RSS tab.
How to Find Top Running Processes by Memory and CPU Usage
Every current (running) instance of a program is referred to as a process in Linux. There are running processes on every instance of the Linux operating system. , SSHd, SSH processes, and cron jobs are a few examples. A process is started by any application that has to be used. These processes frequently produce new processes.
In Unix, each command you issue initiates or starts a new process. You initiated a process when you used the df command to display the amount of disc space available.
- UID – Associated user ID for this process.
- PID – ID of the process.
- PPID – ID of the parent process.
- %CPU – CPU utilized by the process.
- %MEM – Memory utilized by the process.
- STIME – Start time of the process.
- TIME – Time is taken by the process.
- COMMAND – The command that started this process.
In a Linux system, various types of processes exist. User processes, daemon processes, & kernel processes are some examples of these categories.