Those who are familiar with Linux system must know the top command. We can monitor our system usage by using top command like cpu, memory etc. There is another command which does the similar things like top, but instead of displaying the output in a raw text format, gtop produce a nice graphical output. gtop is based on Node.js. Don’t worry, you don’t need to be a Node.js expert for running gtop, but for those who are not familiar with the name, Node.js is a JavaScript platform for general-purpose programming that allows users to build network applications quickly. In this tutorial we will see how to install gtop on an Ubuntu 16.04 system.
Installation
Before installing anything its better to keep your system up to date.
sudo apt update sudo apt upgrade
Before installing gtop we need to install Node.js. Type the below command to install Node.js.
sudo apt install nodejs-legacy
This will install Node.js on you system. You need Node Package Manager or npm which is an online repository for publishing open source Node.js project. It’s also a command line utility for interacting with the said repository . For now just install the npm by typing the below command.
sudo apt install npm
Finally install gtop.
sudo npm install gtop -g
This will install the gtop tool on your system.
Play with gtop
Type gtop on your terminal and press enter. if everything goes well you will see a screen like below. (Click on the images to see a better version of that image. Note that the value will not be the same.)
Observe the output on the screen. The screen is based on real time data collected from your current system. You can sort processes by typing P (for PID), C (for CPU), M (for memory). You can monitor your system usage data from one place and most importantly from a terminal window. Enjoy.
Thanks for reading the post. If you enjoyed the post, please share it with your network and let me know your thoughts in the comments.
About the Author: Imtiaz is working in a financial organization in Bangladesh and having experience in system, network and security administration. Feel free to contact with him on LinkedIn or Twitter.