Skip to main content

The Tops - 3 Amazing Tools for CLI based Performance Monitoring

Top is a command  line application that shows you system information like CPU, RAM (memory), and Network usage, as well as an ordered listing of your currently running processes and their system utilization with regard to CPU, RAM, and more.

Top is an excellent tool built into most *nix systems automatically, but there are some other *top applications that expand on what Top does and shows.

htop

First up we have htop.  While it looks quite similar to top at first glance, it is actually quite a change from the original.  Htop shows a nice graphical and numeric listing oc CPU and RAM usage at the top of the window, then lists the processes with various metrics below that area.  What sets Htop apart is the set of F* (function hotkeys) it has at the bottom of the window.  You can perform various actions with these keys including some heavy configuration of the htop view, columns, sorting, and more.

To install htop, you can use your system package manager via the CLI:

For Debian / Ubuntu based systems like mine, you simply enter

sudo apt install htop -y

For Arch, check the Arch Repos as well as the AUT, for Redhat, Fedora, CentOS, you'll use rpm, yum, or dnf depending, and so on for other package managers.

To run htop, simply use the command

htop

When you are ready to quit htop, simply press the q key on the keyboard.

vtop

Next we have vtop.  This nodejs based terminal tool takes a bit of a different spin on the original top, and provides a very nice graphical interface for CPU, RAM, and Network monitoring.  For the process list we see more of an application level view than the individual process view we've seen with top and htop.  It's a cleaner look at what applications / commands are using CPU and RAM.

As with htop, we have a list of hotkeys along the bottom of the vtop window which provide navigation in the process view, sorting options, and more.

To install vtop, we must first install nodejs and npm.  I would normally recommend installing NVM (Node Version Manager), then using that to install the latest version of NodeJS and NPM, but in this case the versions available straight from your repository package managers should be fine.

For Debian / Ubuntu based systems:

NodeJS
sudo apt install nodejs -y

NPM
sudo apt install npm -y

Once those are installed, you can now install vtop using the NPM (Node Package Manager) as follows:

npm install vtop -g

the -g above installs vtop globally so that it can be run by any user on the system.

Once installed, simply run the command

vtop

to start it up.  To quit the vtop window, simply type q.

gtop

Our last, but certainly not least, tool is gtop.  A familiar looking tool if you've already installed / used vtop, gtop provides a cleanly laid out user interface with graphical information about CPU, RAM, Disk, and Network usage, as well as an ordered process list.

Gtop, unlike our previous two options, does not appear to have any hotkeys for manipulating the useer interface, but is instead an attractive, straight-forward display of useful diagnostic information.

To install gtop, we again use NodeJS and NPM.  So, if you haven't already done so, use the installation information in the vtop section above to install NodeJS and NPM, then we can get on with installing gtop.

npm install gtop -g

Once installed you can run the application with the command:

gtop

To quit gtop, you again use the q key on the keyboard.

Bonus

Using a terminal emulator like Terminator or TMux that can be split into multiple panes each running their own commands, will allow you to run tools like htop, vtop, and gtop all at once for a very handy overview of your system / server preformance.

Install Terminator

sudo apt install terminator -y

Support my Channel and Content

Support my Channel and ongoing efforts through Patreon:
https://patreon.com/awesomeopensource