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

How to use htop

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

In this article, the editor introduces "how to use htop" in detail, the content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to use htop" can help you solve your doubts.

Detailed explanation of htop usage

I. introduction to the use of Htop

You may be familiar with top monitoring software. today, I would like to introduce another monitoring software, Htop, which is called the enhanced version of top, which has many advantages compared to top. As follows:

Compared with the two, top is more cumbersome

Mouse operation of graphical interface is supported by default.

You can scroll through the list of processes horizontally or vertically to see all the processes and the complete command line

There is no need to enter the process number when killing the process.

Two. acquisition and installation of software

The installation of Htop can not only be compiled and installed through the source package, but also be downloaded and installed on the network after configuring the yum source.

2.1 Source installation

Because I have already installed, so you will look at the above after each compilation process ^ c, is not to perform this line of operation Ctrl+c cancel, here is just to tell how to compile and install, everyone's environment is different, there may be errors in the compilation process, according to the error, can be solved.

2.2 yum and rpm package installation

Personally recommend yum installation, can automatically solve the package dependency, installation can be.

III. The use of Htop

After the installation is complete, directly tap the htop command on the command line to enter the interface of htop

The items from top to bottom are described as follows:

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

The above items are:

PID: identification number of the progress

USER: the user running this process

PRI: priority of the process

NI: the priority value of the process. The default is 0, which can be adjusted.

VIRT: virtual memory value consumed by the process

RES: the value of physical memory consumed by the process

SHR: the value of shared memory consumed by the process

S: the running state of the process. R means running, S means dormant, waiting for wake up, Z indicates dead state.

% CPU: CPU usage occupied by the process

% MEM: percentage of physical memory and total memory consumed by the process

TIME+: the total CPU time taken by the process after it was started

COMMAND: the name of the startup command that the process started

F1: display help information

H,?

F1

View htop usage instructions

S

F2

Htop Settin

/

F3

Search process

\

F4

Incremental process filter

T

F5

Show tree structure

F6

Select sorting method

[

F7

Reducing the nice value can increase the priority of the corresponding process.

]

F8

Can increase the nice value and reduce the priority of the corresponding process

K

F9

Can signal to the process

Q

F10

End htop

U

The process of displaying only a given user

U

Unmark all processes

H

Show or hide user threads

K

Show or hide kernel threads

F

Track the process

P

Sort by CPU usage

M

Sort by memory usage

T

Sort by Time+ usage

L

Show files opened by the process

I

Reverse sort order

S

Select a process and press s: track the system call of the process with strace

F2 Htop Settin

Click Setup or press F2 to go to the page set by htop

Under the Setup option:

1.Meters

Set the top display information, divided into left and right sides, Left column represents the information displayed on the left, Right column represents the information displayed on the right, if you want to add new options, you can select Available meters to add, F5 to the upper left, F6 to the upper right. Under Left column and Right column, you can choose how the information is displayed, such as LED, Bar (progress bar) and Text (text mode), which can be set according to your preferences.

2. Display options

Select the content to be displayed, press the space x to show it, and then press F10 to save.

3.Colors

Set the color of the interface to display, I think it is of little use, everyone has different preferences, if we choose Black on White, the display effect is as follows

4.Colums

The function is to add or cancel the contents to be displayed. After selection, F7 (move up), F8 (move Down), F9 (cancel display, F10 (Save changes)) add PPID and PGRP here, and display that information according to each person's needs.

F3 search process

Press F3 or enter "/" directly under the interface to enter the search mode directly, which is searched according to the process name. For example

The searched process will be marked with the set color for easy viewing.

F4: filter

It is equivalent to fuzzy search, and is not case-sensitive. After entering the content to be searched below, the interface only displays the content found, making it easier to view, for example:

F5: display in a tree

F6: sort by

After pressing F6, it jumps to the screen above, allowing you to choose how to sort, and under Sort by, select what you want to sort.

F7dF8: adjust the nice value of the process

F7 means decrease nice value (increase priority), F8 increase nice value (decrease priority), select a process, press F7 or F8 to increase or decrease nice value, the range of nice value is-20-19, here I adjusted the nice value of apache to 19.

F9: kill the process

Select a process and press F9 to kill the process, which is very convenient

F10: exit htop

After reading this, the article "how to use htop" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.

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

Development

Wechat

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

12
Report