Monitoring system resources with htop - from installation to usage
System monitoring with htop (ubuntu based)
htop is a terminal-based program that allows you to easily and quickly check the resource usage of your system, such as CPU, memory, swap, processes, etc.It is similar to the task manager in Windows, but it provides more diverse and detailed information, and you can manage processes with keyboard shortcuts.
In this post, I will show you how to install and use htop on ubuntu.
Installing htop
To install htop on ubuntu, you need to first open the terminal and update and upgrade your system.This is an essential step to maintain the stability and compatibility of your system.
Please enter the following command.
1 | sudo apt update && sudo apt upgrade | cs |
After updating and upgrading your system, you can install htop with the following command.
1 | sudo apt install htop | cs |
When the installation is complete, you can run htop by typing htop in the terminal.
Using htop
When you run htop, you will see a screen like this.The top of the screen shows the resource usage of your system in graph form.
If you have multiple CPUs, you can see the usage rate of each one.
On the right, it shows the information about the number and status of processes, load average, etc.
The middle of the screen shows the information about each process.
The middle of the screen shows the information about each process.
It consists of columns such as PID, USER, PR, NI, VIRT, RES, SHR, S, %CPU, %MEM, TIME+, COMMAND, etc., and their meanings are as follows.
- PID: Process ID number
- USER: Process owner
- PR: Process priority
- NI: The nice value of the process that affects the priority
- VIRT: The amount of virtual memory used by the process
- RES: The amount of physical RAM used by the process
- SHR: The amount of shared memory used by the process
- S: The current state of the process (zombied, sleeping, running, uninterruptedly sleeping, traced)
- %CPU: The usage rate of the processor time used by the process
- %MEM: The usage rate of the RAM used by the process
- TIME+: The time used by the processor
- COMMAND: The command that started the process
F1 ~ F10 are defined as shortcuts for each function, and they do the following.
- F1 (help): Shows how to use htop
- F2 (Setup): htop setting shortcut key
- F3 (Search): Search for the process you want
- F4 (Filter): Enter the term you want and filter it
- F5 (Tree): Shows the parent-child relationship of processes in a tree form
- F6 (Sort): Sorts processes by the column you want
- F7 (Nice -): Decreases the nice value of the process to increase its priority
- F8 (Nice +): Increases the nice value of the process to decrease its priority
- F9 (Kill): Terminates the process
- F10 (Quit): Quits htop
Conclusion
htop is a useful program that allows you to easily monitor and manage your system’s resource usage and process status on linux.On ubuntu, you can install and use htop with simple commands and check your system’s situation in real time on the terminal.
I hope htop helps you improve your system’s performance and solve problems.
댓글
댓글 쓰기