How to use the htop command to monitor system processes in real time
The htop command in Linux is a command line utility that allows users to monitor important system processes in real time.
Benefits of htop command
You can track important system resources or processes in real time. The color used in the output makes it much easier to read than the monochrome output of the top command.
Advantages of htop command are:
- Support mouse operation
- Allows you to scroll both horizontally and vertically, to view all processes and to complete the command line
- Lets you end a process without knowing the PID
- Start faster than the top command
- The top command requires you to enter a PID or priority value to change the priority or extend a process, and the htop does not.
Use the htop command
This command is easily called from the Command Prompt:
# htop
The use of the command is divided into 3 parts.
- In the first section (upper left corner), we see the bars that show the processor usage, the memory in use, and the swap memory (virtual RAM) in use respectively.
- The second part (upper right corner) displays standard information, such as task summary, load average and uptime.
- The last section is at the bottom, where you will see 12 columns, including:
- PID - Process ID
- USER - The process owner's username (or user ID if the name cannot be specified)
- PRI - The kernel's internal priority for the process
- NI - Nice value of a process - from low priority, 19 to high priority, -20
- VIRT - The total capacity of the program in memory
- RES - Resident Set Size (memory that the process uses)
- SHR - The size of the process share page
- S - Process status ( S - sleep / inactive, R - running, D - disk sleep / Drive sleep state, Z - zombie, T - suspended)
- W - Paging (memory management mechanism that allows real address spaces to allocate for scattered, discontinuous processes)
- CPU% - Percentage of CPU processes currently in use
- MEM% - Percentage of process memory currently in use
- TIME + - Time (calculated according to the time the process has taken of system and user time)
- Command - The full path of the command
As with most Linux commands, there are also options.
# htop [-dChusv]
- –D - delay (shows the delay between updates, in 1/10 seconds).
- –C - no-color (monochrome mode)
- –H - help (display the help message and exit)
- –U - user = USERNAME (only shows the progress of a given user)
- –H - pid = PID (shows only the given PID)
- –S - sort-key COLUMN (Sort by this column)
- –V - version (output and exit version information)
You can also use interactive commands while the command is running to change the arrangement / appearance of the window, like:
- Arrow,
Page Up
,Page Down
,Home
,End
- Scroll the progress list - Space - tag or untag a process
U
- Untag all processess
- keep track of system callsF1
- HelpF2
- SettingF3
- SearchF4
- FilterF5
- Tree viewF6
- SortF7
- Increase the priority of the selected processF8
- Decreases the priority of the selected processF9
- Destroy the processF10
- Exit (Esc
also works)
You can also sort columns simply by using the mouse.
Both new and experienced Linux users should use the man command to see all the features that the command provides.
# man htop
This command is not only an invaluable utility for experienced Linux users' toolkit, but also useful for new Linux users, helping to better understand how Linux works and explore many interesting things. taste.
You should read it
- Learn about Activity Monitor on Mac
- How to monitor network usage for Linux processes
- Instructions for using pstree command on Linux
- 11 uses of ps command in Linux
- The best applications to monitor system performance on Android
- Use the Top command to see the processes running in Linux
- How to fix the problem of too many background processes running on Windows PC
- How to monitor network connections in Linux with pktstat
- How to generate a system performance report in Windows 10
- How to run a program periodically using the Watch command on Linux
- New Symbiote malware is capable of infecting all processes running on Linux computers
- How to Check System Performance in Windows 8
Maybe you are interested
What to do when open command window here does not appear?
How to switch users on the Linux command line
How to fix Mac Homebrew error 'zsh: command not found: brew'
What is the Command key on Windows?
How to use read command in Linux
Basic Linux commands everyone needs to know - Operations on Linux are much faster