Getting a quick idea of the performance of your server, particularly when troubleshooting can be invaluable. There are various methods for achieving this, but I’ve found gtop to give me everything I need on one screen.
Also you can leave it up on your screen to impress colleagues or friends. Don’t just take my word for it…
This is what gtop looks like when it’s running. Glorious:
Install Node.js (optional)
You’ll need Node (v4+) running to be able to use gtop. If you’ve already got it installed on your system, continue to the next step, otherwise, run this command to install Node 7 – the latest and greatest LTS version:
$ sudo curl -sL https://deb.nodesource.com/setup_7.x -o nodesource_setup.sh
Run it like so:
$ sudo bash nodesource_setup.sh
Finally, install the actual Node package:
$ sudo apt-get install nodejs
Now, continue on to install gtop.
Install and use gtop
Installation is easy as pie:
$ npm install -g gtop
Then, run gtop like so:
You can sort the process table by pressing
p: Process Id
c: CPU usage
m: Memory usage
You’ve installed gtop and can now view all of your system stats on one jazzy page. Enjoy!