Top is a Linux/Unix command line program that displays all of the PC’s tasks and processes. If you ever used CNTRL-ALT-DEL and a Windows computer to start the task manager, then you’re already somewhat familiar with the program.
TOP displays current information about the PC in use, and provides “Process ID’s” in your terminal. It’s pretty simple to run, and comes pre-packaged in most Linux distributions.
Here is an example screenshot of TOP.
As you can see for yourself, the single colored text is hard to decipher, but if you look hard enough you can see the following:
- Current commands being run
- Whose running them
- The percentage of CPU a task is using
- The process ID number
- Nice Level and PR (The importance of a task)
- Memory usage
These are all vital pieces of information for anyone debugging their current Linux distribution. Killing a process ID unfreezes just about any program, unlike Windows task manager which fails 50% of the time.
But TOP’s UI isn’t UF (user-friendly). Its boring to look at, and its lack of syntax highlighting adds another layer of complexity to a already complex screen.
HTOP, which was released on Github in 2014, is an attempt to liven up the screen with color, syntax highlighting, and artwork depicting memory usage.
The information presented is coded with color, and shows extra figures such as the “memory bar” on top which dynamically moves.
Everything’s there, and the color is better than the original top, but the refresh rate is high, and using the grep command to filter processes takes a while.
Now, there’s a Python library that tackles the issue of Proccess management in Linux once and for all.
The program is pretty awesome. The user interface is pleasant, it provides more information than TOP, and HTOP, it’s responsive to its current container, and even offers a web-browser version allowing users to bookmark the tab, and visit the link inside their own native browser.
Its also way faster with the GREP command. For example, running “glances | grep root” to see all processes run by root, the results are instant and accurate. It can also run on rooted androids, which is always fun to look at.
Glances, written by /u/nicolargo is a great package that every system admin should take a look at.