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

What is the use of Linux's htop command

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly explains "what is the use of Linux's htop command". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the use of Linux's htop command"?

Htop [non-internal command] an interactive process viewer that can dynamically observe the process status of the system

Add that the htop command is an interactive process viewer in the Linux system, 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.

Compared with the two, top is more tedious.

Disadvantages of top:

Only keyboard operations are supported.

The display is monotonous.

Syntax htop parameter-C-- no-color uses the monochrome color scheme-d-- delay=DELAY to set the delay between updates, showing only one specified user's process-p-pid=PID, [, PID,PID...] at ten seconds-s-sort-key=COLUMN column sort (try-- sort-key=help for a list)-u-- user=USERNAME Only show to the user-h-- help print this command to help-v-- version print version information option? F1: check htop usage instructions S F2: set / F3: search process\ F4: filter, search by keyword t F5: display tree structure F6: select sorting method [F7: reduce the nice value, so that you can increase the priority of the corresponding process] F8: increase the nice value This reduces the priority of the corresponding process k F9: kill the selected process Q F10: exit htop /: search character h: display help l: show the files opened by the process: if lsof is installed, press this key to display the files opened by the process u: show all users And you can select a specific user's process U: unmark all processes s: system call that will call strace to track the process t: show tree structure H: show / hide user thread I: reverse sort order K: show / hide kernel thread M: sort by memory usage P: sort by CPU T: sort by run time or PgUP PgDn: move the key around the selected process or Home, End: move the list Space (space): Mark / unmark a process. The command can be applied to multiple processes, such as "kill". It will be applied to all marked processes ````shell # Htop. Click Setup or press F2 to enter the page # 1. Meters sets the display information at the top, which is divided into left and right sides. Left column represents the information displayed on the left, and Right column represents the information displayed on the right. If you want to add a new option, you can select Available meters to add. F5 is added to the upper left and 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 selects the content to be displayed, and displays it by space x. After selection, press F10 to save # 3. I don't think it is useful to set the color of the Colors interface. The function of Colums is to add or cancel the contents to be displayed. After selection, F7 (move up), F8 (move Down), F9 (cancel display, F10 (Save changes)) PPID and PGRP are added here, and the information is displayed according to each person's needs. * * F3 search process * * you can enter the search mode directly by pressing F3 or typing "/" directly in the interface. The search is based on the process name, and the searched process will be marked with the set color for easy viewing. * * F4: filter * * is equivalent to fuzzy search and is not case-sensitive. After entering the content to be searched below, the interface only displays the content to be searched. It is more convenient to view * * F5: display * * F6 in a tree format: after pressing F6, it will jump to the tree display interface, allowing you to choose how to sort. Under Sort by, select what you want to sort F7 nice F8: adjust the process nice value * * F7 to decrease the nice value (increase the priority), F8 increase the nice value (decrease the priority), select a process, press F7 or F8 to increase or decrease the nice value, and the nice value ranges from-20 to 19 * * F9: kill the process. Select a process and press F9 to kill the process. Very convenient * * F10: exit the htop** to this point. I believe that you have a deeper understanding of "what is the use of Linux's htop command", you might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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