Tutorial on how to install htop on CentOS 8

Tutorial on how to install htop on CentOS 8

If you are looking to monitor your system interactively, htop command should be one of the best choices. An improvement over its predecessor, the top command, htop is an interactive process viewer and system monitor that color-codes resource usage indicators and allows you to easily keep track of system performance.
It displays information about CPU and RAM utilization, tasks being performed, load average, and uptime. Additionally, htop displays a list of all running processes and can also display these processes in a tree format.

The advantages of htop over top include

  • Output resource usage statistics in color coded format.
  • The ability to kill or terminate a process without typing its PID.
  • Htop allows the use of the mouse, while top does not.
  • Better performance than top command.

Now, let’s jump in and see how to install this handy feature.

Install htop on CentOS 8

By default, htop comes pre-installed on CentOS 8. However, if the tool is missing on your system, the installation process is easy and only requires 3 steps.

1. The first step to install Htop tool is to enable EPEL repository. To do this, run:

# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

After installing the EPEL repository, update the system.

# dnf update

2. To install the htop tool, just run the following command:

# dnf install htop

Once the installation is complete, you can find out more about htop by running the command.

# dnf info htop

3. To start htop, just run the command.

# htop

The left part, from top to bottom, shows the usage of CPU, memory, and swap partition. The right part shows: Tasks is the total number of processes, the number of currently running processes, Load average is the average load of the system for 1 minute, 5 minutes, and 10 minutes, and Uptime is the system running time.

The above items are:

  • PID: Process identification number
  • USER: The user who runs this process
  • PRI: The priority of the process
  • NI: The priority value of the process, the default is 0, which can be adjusted
  • VIRT: virtual memory value occupied by the process
  • RES: The physical memory value occupied by the process
  • SHR: shared memory value occupied by the process
  • S: The running status of the process, R means running, S means sleeping, waiting to be awakened, and Z means dead
  • %CPU: CPU usage of the process
  • %MEM: The percentage of physical memory and total memory occupied by the process
  • TIME+: The total CPU time occupied by the process after it was started
  • COMMAND: The name of the startup command for the process.

Additionally, you can pass some parameters to the command. For example, to list a user's processes. Assume that linuxidc runs the command.

# htop -u linuxidc

To get help on the command usage, just run.

# htop --help

Alternatively, you can view the man page by running the following command:

# man htop

Summarize

In this article, you have learned how to install htop on CentOS 8 and how to use the command to retrieve system statistics.

The above is the tutorial for installing htop on CentOS 8 introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

<<:  JS, CSS and HTML to implement the registration page

>>:  Index in MySQL

Recommend

Using System.Drawing.Common in Linux/Docker

Preface After the project is migrated to .net cor...

MySQL 5.7.24 installation and configuration method graphic tutorial

MySQL is the most popular relational database man...

Detailed explanation of client configuration for vue3+electron12+dll development

Table of contents Modify the repository source st...

How to hide the version number in Nginx

Nginx hides version number In a production enviro...

MySQL5.7 parallel replication principle and implementation

Anyone who has a little knowledge of data operati...

VMware virtual machine installation CentOS 8 (1905) system tutorial diagram

The world-famous virtual machine software VMware-...

MySQL briefly understands how "order by" works

For sorting, order by is a keyword we use very fr...

Detailed explanation of Bootstrap grid vertical and horizontal alignment

Table of contents 1. Bootstrap Grid Layout 2. Ver...

Webpack file packaging error exception

Before webpack packaging, we must ensure that the...

Javascript operation mechanism Event Loop

Table of contents 1. Four concepts 1. JavaScript ...

Detailed explanation of the difference between alt and title

These two attributes are often used, but their di...

Summary of common tool functions necessary for front-end development

1. Time formatting and other methods It is recomm...

Execution context and execution stack example explanation in JavaScript

JavaScript - Principles Series In daily developme...