Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tutorial for installing htop on CentOS 8

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

If you want to monitor your system interactively, the htop command should be one of your best choices. htop is an improvement on its predecessor, the top command, an interactive process viewer and system monitor that color-marks resource usage metrics and makes it easy to keep track of system performance.

It displays information about CPU and RAM utilization, tasks being executed, average load, and uptime. In addition, htop displays a list of all running processes and can also display them in tree format.

The advantages of htop over top include

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

Now, let's move on to see how to install this handy feature.

Installing htop on CentOS 8

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

1. The first step in installing the Htop tool is to enable the 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 your system.

# dnf update

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

# dnf install htop

After installation, you can find more information about htop by running the command.

# dnf info htop

3. To start htop, simply run the command.

# htop

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

These are:

PID: Identification number of the process USER: User PRI running this process: Priority NI of process: The priority value of the process, the default is 0, can be adjusted VIRT: virtual memory value occupied by the process RES: physical memory value occupied by the process SHR: shared memory value occupied by the process S: health status of the process, R means running, S means sleeping, waiting for wake-up, Z means dead state %CPU: CPU utilization rate occupied by the process %MEM: percentage of physical memory and total memory occupied by the process TIME+: total CPU time occupied by the process after starting COMMAND: name of the start command of the process

In addition, you can pass some parameters to commands. For example, list the user's processes. Suppose linuxidc runs the command.

# htop -u linuxidc

For help with command usage, simply run.

# htop --help

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

# man htop

summary

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

The above is a tutorial introduced by Xiaobian to you to install htop on CentOS 8. I hope it will help you. If you have any questions, please leave a message to me. Xiaobian will reply to you in time. Thank you very much for your support!

If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report