Replacing the Linux O & M tool of top tools-htop

Source: Internet
Author: User

Htop is a software running in Linux system monitoring and process management, used to replace the traditional top in Linux/Unix. htop is written in C language and uses the ncurses library, therefore, ncurses needs to be installed to use this function.
What are the advantages over top:
1. htop provides a list of all processes and identifies the status of CPU, swap, and memory in different colors.
2. more elegant display interface
3. vertical and horizontal scrolling makes it easier to see all processes and complete command lines.
4. The operation is more convenient and easier. You can directly kill and renice processes without entering the process number (the premise is to locate the object)
5. Supports mouse operations at the same time, which is very distinctive (the ncurses dependency package needs to be installed)
6. Start the htop command 0.5 seconds faster than the top command (I don't know if this is not an advantage ..............)
....
....

Htop Official Website: http://sourceforge.net/projects/htop

1. Installation
Two simple installation methods:
Source code installation:

wget http://sourceforge.net/projects/htop/files/htop/1.0.2/htop-1.0.2.tar.gz/downloadtar zxf htop-1.0.2.tar.gzcd htop-1.0.2./configuremake && make install

Yum installation:
Because the CentOS/RHEL yum library does not have a built-in htop package, you need to add the EPEL Source:

CentOS/RHEL 5.x installation: 32-bit system rpm-ivh ready-ivh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpmCentOS/RHEL 6.x installation: 32-bit system rpm-ivh kernel -- import/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL installation htop: yum-y install htop


2. Simple use
Run the htop command directly:
[Root @ twexdb1 ~] # Htop

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1Q4325S1-0.jpg "title =" 1.jpg"/>

The top lines show the CPU information. I have 16 CPUs (0-15 ),
In the upper left corner, the CPU usage is shown in the memory and swap area,
Information about the Process status, system load, and start time are displayed on the right,
The following describes the real-time status of a process.
The bottom line is the shortcut key operation. You can click it or press the corresponding shortcut key!

Common operation commands:
T: display the Tree Structure

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1Q432M44-1.jpg "title =" 2.jpg"/>

U: displays the process of a user. Select a user on the left.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1Q4324Z4-2.jpg "title =" 3.jpg"/>


The user currently running the relevant program is displayed under the All users list. You can use the mouse or keyboard's up and down arrow keys to locate the corresponding user and press Enter, displays the processes that the specified user is running.
I am positioning to display mysql users here:

H: Display help is equivalent to F1
H: Display/hide user threads
K: Display/hide kernel threads

Here, the tool is relatively simple and not complex, so it is easy to get started without further details. if you are still using top, do you think you are out? Directly alias top = "htop". For more details, see man htop.





This article is from the "->" blog, please be sure to keep this source http://opsmysql.blog.51cto.com/2238445/1214398

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.