Introduction to Linux under Htop tools

Source: Internet
Author: User

Today we introduce the use of the Htop tool, which is a useful tool to see the system process, CPU utilization, memory usage and so on.

For our ops, it can be used to quickly locate which process is causing the system to clog up, which processes have been hogging the CPU for a long time, and which processes are in a zombie state and cannot exit memory to cause memory overflow.

Htop is a real-time display of the system situation, unlike the PS, Pstree, pidof, Vmsta and other snapshot tools, the snapshot tool can only show the command to execute the system one second before the situation. Htop highlights the key information and is friendly to us when we view process information with the naked eye. Before writing this blog I read the other big God related blog, are written well, recommended two blog for your reference.

Blog One: http://jyxnt.blog.51cto.com/9581167/1586708

Blog two: http://os.51cto.com/art/201406/441454.htm

Htop This tool is not integrated into the CENTOS6, we need to download the program's RPM package to install, or download the binary package for compilation and installation, binary package: http://pkgs.repoforge.org/htop/, Source package:/HTTP Hisham.hm/htop/releases/These two URLs are officially available and contain all versions of Htop binaries and source code.

Enter Htop in command line mode to enter the process management interface

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6B/7C/wKiom1UuiV3ApLklAAkPx2LvQRY446.jpg "title=" Htop1.png "alt=" Wkiom1uuiv3aplklaakpx2lvqry446.jpg "/>

Enter htop-d #表示进程信息多少时间刷新一次 (#是指定的时间单位是毫秒) in command-line mode

As # htop-d 100 indicates process information is refreshed 10 seconds


Entering htop-u username in command-line mode indicates that only the specified user process information is displayed

# Htop-u WUHF Specifies the process for displaying WUHF users

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6B/77/wKioL1UujXTxXeE_AAIRoALp59U945.jpg "title=" Image 7. PNG "alt=" wkiol1uujxtxxee_aairoalp59u945.jpg "/>

Enter htop-s column in command-line mode to display process information based on the specified field


When we enter the process management interface, we can see three parts:

One

Top left three information is CPU usage; memory utilization; Swap space usage

Top right Three information: system tasks and threads; system load balancing in 1-minute, 5-minute, and 15-minute situations; system run time

Two

The following left-to-right shows the PID of the process, the user who started the process, the priority, nice value, virtual memory usage, resident memory, shared memory, process state, CPU consumption, memory consumption, enabling time, commands, and so on.

Three

The bottom is the user-selectable menu:

F1 to use Help F2 is to display information settings, you can set the options you want to see, such as only display cpu,pid, memory, command, etc. F3 is the location of the keyword to locate the process F4 through the keyword to find the process and show this process separately F5 tree display process and its child processes F6 defines what information is sorted for the main option to display process information F7 to lower the Nice value (that is, the higher priority) for the selected process F8 the opposite of F7 F9 input some signals to the selected process, you can terminate the process execution F10 exit


Options for F2

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6B/7C/wKiom1UujM2y4GSpAAJXH5Rf0SY463.jpg "title=" Image 8. PNG "alt=" wkiom1uujm2y4gspaajxh5rf0sy463.jpg "/>

We also need to remember some of the most useful interactive commands:

P: Display process information as CPU-based

M: Display process information in memory-based key

T: Show process information as time-consuming for the main item

U: Filter only displays the specified user

A: Bind the selected process to the selected CPU (with multicore CPUs)

T: the same effect as F5

L: Displays all files opened by the selected process

S: Tracks all system calls initiated by the selected process

These interactive commands can use man to help get

You can also use F1 to view

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6B/77/wKioL1UujoCw50TSAARBBWljG2s803.jpg "title=" Image 9. PNG "alt=" wkiol1uujocw50tsaarbbwljg2s803.jpg "/>


This article is from the "Tongluowan" blog, make sure to keep this source http://wuhf2015.blog.51cto.com/8213008/1633220

Introduction to Linux under Htop tools

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.