How does CentOS 7 yum install htop?Explain in detail how to use the htop command in Linux

Quite a lotInternet marketingeveryone usesVestaCPpanel(CentOS 7)Building websitedoSEO.

  • LetE-commerceThe stable operation of the website is very important, so as to achieve the idealWeb PromotionEffect.

If the VPS memory is exhausted and a 500 error occurs, it can be used in SSH htop command to view the host process status.

However, VestaCP is minimally installed, and the htop monitoring tool is not installed by default. There may be an error message that the command did not find notfound "-bash: htop: command not found"...

  • This tutorial will explain this in detailLinuxUse the htop command method.

There are more Linux monitoring tool tutorials here ▼

What is htop?

  • htop is an interactive and real-time system monitoring process viewer written for Linux.
  • It is intended to replace top for Unix programs.
  • It shows a frequently updated list of processes running on your computer, usually sorted by CPU usage.

The difference between top and htop

  • Unlike top, htop provides a complete list of running processes, not the most resource-hungry ones.
  • Htop uses color and provides visual information about processor, swap, and memory state.

htop and top comparison

  • In 'htop' you can scroll the list vertically and horizontally to see all processes and the full command line.
  • In 'top', each unassigned key press is delayed (especially annoying when multi-key escape sequences are triggered accidentally).
  • 'htop' starts faster ('top' seems to collect data for a while before displaying anything).
  • In 'htop' you don't need to type the process number to kill a process, in 'top' you do.
  • In 'htop' you don't need to type the process number or priority value to render a process, in 'top' you can.
  • 'htop' supports mouse operations, 'top' does not
  • 'top' is older and therefore more used and tested.

yum install htop on RHEL/CentOS 5.x/6.x/7.x

By default, the ytop tool is not available in the yum repository.

Step 1:Enable RPMForge repository

  • We enable the RPMForge repository.

RHEL/CentOS 7 64-bit:

wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm

RHEL/CentOS 6 32-bit:

wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
 rpm -ivh epel-release-6-8.noarch.rpm
  • CentOS 7 does not support 32-bit EPEL repositories, so use RHEL/CentOS 6 32-bit.

Step 2:Install htop using yum command ▼

yum install htop

Step 3:Use the htop command ▼

htop

Download htop source code cross compile and install

If you prefer to compile and install htop from source, please download the source and compile it ▼

wget http://downloads.sourceforge.net/project/htop/htop/1.0.2/htop-1.0.2.tar.gz#tar 
-xvf htop-1.0.2.tar.gz 
cd htop-1.0。 2 
./configure 
make 
make install
  • If you have installed htop using yum, skip this step.

How to use htop command?

After installation, just SSH interminalenter htop You canstart ▼

htop

At the top of htop, you can see the navigation with colors▼

At the top of htop you can see the 4th sheet of text mode graphics with colors

according to" F2 ”Or"S"to view morehtop settings menu ▼

Press "F2" or "S" to view htop settings menu sheet 5

If you want to see htop tree viewon the process list, press "F5 ”Or "t ” ▼

If you want to see the process list on htop tree view, press "F5" or "t" sheet 6

Change htop refresh interval

To change the refresh interval for htop output, use the -d command line option.

"htop -dx" (x means refreshed in seconds)▼

htop -d 10

Detailed explanation of HTOP shortcut keys and function keys

The following is the command description diagram of the shortcut keys and function keys of the HTOP monitoring tool ▼

HTOP monitoring tool shortcut keys and function keys command diagram No. 7

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "How does yum install htop on CentOS 7?Explain in detail how to use the htop command in Linux", which is helpful to you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-736.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top