In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to install and use task manager htop under CentOS". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Htop is an interactive process viewer in Linux systems, a text-mode application (in the console or X terminal) that requires ncurses.
Compared with the traditional top of Linux, htop is more humanized. It allows users to operate interactively, supports color themes, scrolls through the list of processes horizontally or vertically, and supports mouse operation.
Compared with top, htop has the following advantages:
You can scroll through the list of processes horizontally or vertically to see all the processes and the complete command line.
Faster than top on startup.
You do not need to enter a process number when killing a process.
Htop supports mouse operation.
Top is very old.
Htop official website: http://htop.sourceforge.net/
Installation:
There is no htop in the CentOS yum library. You need to add an EPEL source:
CentOS 5 series installation:
The code is as follows:
Rpm-I http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
CentOS 6 Series installation:
The code is as follows:
Rpm-I http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
After installation, two yum source files, epel-testing.repo and epel.repo, will be generated under / etc/yum.repos.d/.
Install htop:
The code is as follows:
Yum install htop
Enter htop to run, and the interface is as follows:
Use htop
For htop, you can press the up and down keys to select the desired process, and press the left and right keys to move the field. In fact, htop can also directly select the process with the mouse.
Press [F1] to [F10] keys to operate various management functions. Such as:
The [F8] key increases the nice value, which reduces the priority of the corresponding process.
[F7] can reduce the nice value, which can increase the priority of the corresponding process.
[F9] can signal to the process
[F10] end htop
[F1] View htop usage instructions
At the same time, htop also supports the use of a single command character, such as pressing the [Q] key to leave htop
Here are more details from the Internet:
If you want to open htop directly every time you use the top command.
The code is as follows:
# vi / root/.bashrc
If [- f / usr/local/htop/bin/htop]; then
Alias top='/usr/local/htop/bin/htop'
Fi
# source / root/.bashrc
Common options:
C-no-color uses a monochrome color scheme.
-d-delay=DELAY sets the delayed update time (in seconds).
-h-help displays htop command help information.
-u-user=USERNAME shows only the process of a given user.
-v-version displays version information
It is recommended to man, man is very detailed.
In addition, when it is still in use
/: search character
H: displays a user's progress, with options on the left
T: show tree structure
H: show help
H: show / hide user threads
K: show / hide kernel threads
Select a process and press s: to track the system call of the process with strace
It is the same under P, T, M and top, sorted by CPU,Time+ and Memory usage.
Below are the functions of F1~F10 and the corresponding letter shortcuts.
This is the end of "how to install and use Task Manager htop under CentOS". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.