If you are a user Linuxyou may want to monitor and optimize your Linux system or want to know some important information about your computer like:
Join the channel Telegram of the AnonyViet 👉 Link 👈 |
- System CPU usage, memory usage and disk usage
- System information
- Disk usage of each folder or file and when was the last time you used them.
- Memory and CPU consumption of running processes
- Startup Application
Knowing such information will allow you to optimize your system.
So in this article, I will introduce you to 3 tools that allow you to do all of the above and much more.
3 Linux system optimization and monitoring tools
htop – View Processes
htop is a process viewer. htop allows you to view information related to the command line such as its memory, CPU consumption and uptime.
I usually use htop whenever I notice my computer’s speed is slowing down and want to find out which process is having a big impact on my computer’s speed. I also use htop to keep track of how many cores and how much memory is being used when running a program.
htop is available in most distributions (not on Ubuntu). To run htop, enter the following command:
htop
You will see a dashboard like the one below:
In the image above, the instructions are sorted by %CPU. It seems that processes /opt/brave, com/brave/brave consume the most CPU out of all running processes.
Some keyboard shortcuts to try:
- F4: Show only processes whose name matches the input text
- F5: Display processes as a tree. Import + or – to expand or collapse the subtree.
- F6: On the sorted view, select the option to sort.
- Home: Scroll to the top of the progress list and select the first process.
- End: Scroll to the bottom of the progress list and select the last one.
View all keyboard shortcuts here.
Baobab – Disk Usage Analyzer
If you want a graphical representation of your disk usage, try Baobab. I often use this tool to find out which applications are taking up a lot of disk space but have not been used for a long time. Knowing this will help me delete files or folders that I no longer need.
Like htop, Baobab is also available in most distributions. To run Baobab, type:
baobab
By using graphs to visualize the disk usage of each folder and file, help you see which folders or files are taking up the most disk in your computer.
You can also see the size of folders or files, how many files they have, and when was the last time they were modified.
Stacer – System Monitor and Optimizer
Stacer is the tool that I like the most out of the three tools above. It allows you to track many important information such as:
- System information
- Download and upload speed
- Search
- System Service
- Processes. This can be considered as a simplified version of htop. While it doesn’t give you as many options as htop, it’s easier to use and understand.
- Install packages
- History of CPU and memory
Stacer also allows you to optimize your computer by:
- Specify which applications to run when your computer starts
- Clean up the system
- Send alert message when CPU percentage, memory percentage and disk percentage are lower than certain percentage
And much more.
You can install Stacer here.
Conclusion
You just learned how to monitor and optimize your Linux machine using htop, Baobab and Stacer. Having more control over your machine will allow you to prioritize running tasks and remove unnecessary applications or processes.