How to install and use htop to monitor system processes in CentOS 8

How to install and use htop to monitor system processes in CentOS 8

Htop is an upgraded adaptation of top order. It shows all procedures running on the system by PID in addition to uptime, load normal, memory use, and other significant insights. It shows the data in an efficient way, which permits the clients to discover the framework matrics without any problem. In this instructional exercise, we will take a look at how we can use htop in CentOS 8.

Official htop here

Install and use htop

Installation of htop

Open your terminal window.

For Remote CentOS Server, you need to connect via ssh.

You need to have EPEL Repo enabled in your system. If you don’t have EPEL Repo you need to install it by using the following command one by one:

sudo yum -y install epel-release
sudo yum repolist

That will look like the images below

htop 1 How to install and use htop to monitor system processes in CentOS 8 htop 2 How to install and use htop to monitor system processes in CentOS 8

 

Now check that htop is available on the repository.

sudo yum search htop

htop 5 How to install and use htop to monitor system processes in CentOS 8

 

As we can see the htop package is available on the repository, now we can install it by simply using this command

sudo yum install htop

htop 7 How to install and use htop to monitor system processes in CentOS 8

 

So now htop is installed on our machine, to run htop just type

htop

htop 8 How to install and use htop to monitor system processes in CentOS 8

 

It will run htop on the terminal and looks like this.

How to install and use htop to monitor system processes in CentOS 8

How to install and use htop to monitor system processes in CentOS 8

 

htop Commands & usage:

We can find the menu of htop in the bottom section of the terminal.

Press F1 for help.

htop 10 How to install and use htop to monitor system processes in CentOS 8

 

Press F2 for Setup

htop 11 f2 How to install and use htop to monitor system processes in CentOS 8

 

Press F3 for Search Process., here I searched for gsd-color and it is highlighted in the terminal.

htop 11 f3 How to install and use htop to monitor system processes in CentOS 8

 

Press F4  to Filter process, here I have filtered the process of /usr/libaxec

htop 11 f4 How to install and use htop to monitor system processes in CentOS 8

 

F5 will show you tree view of the processes.

htop 11 f5 How to install and use htop to monitor system processes in CentOS 8

 

You can also use

F6 to collapse the view.

F9 to Kill process and

F10 to Quit htop.

 

htop Keyboard Shortcut for CentOS 8

CommandDescription
Up arrow keySelect (highlight) the previous process in the process list. Scroll the list if necessary.
Down arrow keySelect (highlight) the next process in the process list. Scroll the list if necessary.
Left arrow keyScroll the process list left.
Right arrow keyScroll the process list right.
PgUp, PgDnScroll the process list up or down one window.
HomeScroll to the top of the process list and select the first process.
EndScroll to the bottom of the process list and select the last process.
sTrace process system calls: if strace(1) is installed, pressing this key will attach it to the currently selected process, presenting a live update of system calls issued by the process.
lDisplay open files for a process: if lsof(1) is installed, pressing this key will display the list of file descriptors opened by the process.

Other keyboard shortcuts

uShow only processes owned by a specified user.
MSort by memory usage (top compatibility key).
PSort by processor usage (top compatibility key).
TSort by time (top compatibility key).
F“Follow” process: if the sort order causes the currently selected process to move in the list, make the selection bar follow it. This is useful for monitoring a process: this way, you can keep a process always visible on screen. When a movement key is used, “follow” loses effect.
KHide kernel threads: prevent the threads belonging the kernel to be displayed in the process list. (This is a toggle key.)
HHide user threads: on systems that represent them differently than ordinary processes (such as recent NPTL-based systems), this can hide threads from userspace processes in the process list. (This is a toggle key.)
pShow full paths to running programs, where applicable. (This is a toggle key.)
Ctrl-LRfresh the screen.
F1See this help menu.

 

Conclusion

In this tutorial we have learned how to add EPEL Repo and install htop in CentOS 8. We have also learned the htop menu functions and keyboard shortcut. I hope this tutorial will help you with a better understanding of htop command.

 

#htop

You may also like...

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments