Here’s a cool program that can be pretty helpful: htop (http://htop.sourceforge.net/).
Monitoring the vital stats on a Linux server can be difficult; you’ve got a ton of utilities like top, free, /proc, vmstat, sar, al
ong with logs to sort through. Imagine if on Linux you could watch each process, view its threads and sub processes, track memory usage and sort your entire systems performance by whatever variables you desired? This is possible and much more with htop.
Htop calls itself “an interactive process viewer for Linux” that runs from the console as an ncurses-built application. Once you load it, right away you’ll notice some considerable improvements over the standard top. The use of ncurses gives htop visually pleasing and functional text-based graphical interface. Along the top of the screen you’ve got color coded bars:
- CPU usage, color coded to show cpu time by normal, kernel, irq, and io-wait usage
- Memory usage, color coded to show actual usage vs. cached and buffer usage–a huge timesaver instead of trying to interpret the output of vmstat or free!
- Uptime and load averages.
The process list in htop is also vastly improved. You can scroll through it (arrow keys), view it in tree mode (F5) to show links between threads spawned by a process, sort by columns (F6) any of the defined metrics, search for keywords (F3), change nice level (F7,F8) or even interactively kill a specific process (F9).
Enter setup (F2) and you’ll find that everything about the main window is customizable. You can display as little or as much information as you want it to. You can also change the style of or add additional meters to the top, as well as change the default color coding. The columns in the main part of the display are also entirely customizable allowing you to choose from a wide variety of available system monitors and resource counters.
The best part about htop is that is easy to use and understand, even a novice can get a look at what’s going on under the hood of their machine, but it’s still powerful enough to use as a serious timesaving device for the advanced user. Once you get in the habit of using htop, it’s something you’ll want to have at your fingertips at all times.


