top is a traditional command-line tool for monitoring real-time processes in a Unix/Linux systems, it’s comes preinstalled on most if not all Linux distributions and shows a useful summary of system information including uptime, total number of processes (and number of: running, sleeping, stopped and zombie processes), CPU and RAM usage, and a list of processes or threads currently being managed by the kernel.
Read Also: Find Top 15 Processes By Memory Usage in Linux
Htop is an interactive, ncurses-based processes viewer for Linux systems. It is practically a top-like tool, but it displays colorful text, and uses ncurses to implement a text-graphical interface, and allows for output scrolling. It doesn’t come preinstalled on most mainstream Linux distributions.
Why Htop is Better Than Top Monitoring Tool
Htop has become increasingly popular among Linux users, due to its modern features and ease of use. In fact, this has sparked a “top Vs htop” debate. The following are some of htop features not present in top – why Linux users now prefer htop to its old counterpart top:
- It has a nicer text-graphics interface, with colored output.
- It is easy to use and highly configurable.
- Allows for scrolling process list vertically and horizontally to see all processes and complete command lines.
- It also displays a process tree and comes with mouse support.
- Allows you to easily perform certain functions related to processes (killing, renicing etc) which can be done without entering their PIDs.
- Htop is also much faster than top.
Another important thing to share that, in recent version of Ubuntu 18.04, htop package comes preinstalled, it’s in the list of default Bionic packages.
Read Also: 20 Command Line Tools to Monitor Linux Performance
In addition, the htop package has been moved from the Universe repository (which contains community-maintained free and open-source packages) into the main repository (which contains free and open-source packages supported by Canonical), as shown by the publishing history of htop package in Ubuntu, on Launchpad.
Bearing in mind these recent advancements concerning the htop package in the Ubuntu repositories, coupled with its growing popularity among Linux users, the big question here is, will htop replace top as the default process monitoring tool on Linux Systems? Let’s watch the space!
There are also other tools in the mix, such as glances and atop; the former is cross-platform, the most advanced of them all, and it’s becoming popular as well. Glances is highly configurable, it can run in: standalone, client/server and web server mode.
Read Also: Use Glances to Monitor Remote Linux in Web Server Mode
Although htop has modern process monitoring features and is easier to use, top has been around for a long time, and it is proven and tested. What is your take on this issue? Which of these tools would you say is better for Linux process monitoring? Use the feedback form below to share your thoughts with us.
Hi, the top command can do some things you said it can’t:
'k'
. Your target process will be pre-entered (see “default”).'V'
.'z'
. Customize colors:'Z'
'm'
and't'
repeatedly.cheers!
What about ‘glances‘ instead of ‘htop‘ or ‘top‘ ?
Glances
https://nicolargo.github.io/glances/
https://github.com/nicolargo/glances
https://www.tecmint.com/glances-an-advanced-real-time-system-monitoring-tool-for-linux/
https://glances.readthedocs.io/en/stable/
https://www.youtube.com/watch?v=ZwhyLD-wquk
@DannyB
Yes, i personally prefer glances to all these monitoring tools, it is modern, more advanced and feature-rich. Thanks for the contribution.
You can’t kill a process from Glances.
top command can do these things too you mention, or are you testing these thing on RHEL6?
@Kees
Atleast top doesn’t support mouse operations, it is not configurable, requires a PID to kill or renice a process and others. Does it even display a process tree, i haven’t seen this feature yet.
Your article is not correct, your arguments here make it even worse. Sure it doesn’t have mouse support, how many terminal applications do? I can only think of vim and tmux, and it’s hardly used. If you want a GUI with mouse support (and pretty colors?..) then use GNOME system monitor.
top needs a PID, of course, you want to tune/kill a specific process. This tool is meant for production, not to kill your LibreOffice processes. For a process tree, hit
c
and thenV
in top. Please update this article and do your research, if you can even call reading a man/help page ‘research’.