The vtop is a graphical activity monitor for the command line written in Node.js. How do I install vtop on my Linux server?
Command-line tools like “top” make it difficult to see CPU usage across multi-process applications (like Apache and Chrome), spikes over time, and memory usage. That’s why we created vtop. Vtop is a free and open source activity monitor for the command line. It is written in node.js and can be easily extended. This page explains how to install and use vtop graphical terminal activity monitor on Linux.
Tutorial requirements | |
---|---|
Operating system/app | Linux distro with nodejs |
Root privileges required | Yes |
Difficulty | Easy (rss) |
Estimated completion time | 5m |
How to install and use vtop on Ubuntu Linux
For demo purposes I am going to use Ubuntu or Debian Linux. First install Node.js if not installed on your system using the apt command:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install nodejs
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libdns-export1107 libicu65 libisc-export1104 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libc-ares2 libnode64 libuv1 nodejs-doc Suggested packages: npm The following NEW packages will be installed: libc-ares2 libnode64 libuv1 nodejs nodejs-doc 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 6887 kB of archives. After this operation, 30.9 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libuv1 amd64 1.34.2-1ubuntu1 [80.4 kB] Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 libc-ares2 amd64 1.15.0-1build1 [37.8 kB] Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64 libnode64 amd64 10.19.0~dfsg-3ubuntu1 [5765 kB] Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64 nodejs-doc all 10.19.0~dfsg-3ubuntu1 [942 kB] Get:5 http://archive.ubuntu.com/ubuntu focal/universe amd64 nodejs amd64 10.19.0~dfsg-3ubuntu1 [61.1 kB] Fetched 6887 kB in 4s (1682 kB/s) Selecting previously unselected package libuv1:amd64. (Reading database ... 20584 files and directories currently installed.) Preparing to unpack .../libuv1_1.34.2-1ubuntu1_amd64.deb ... Unpacking libuv1:amd64 (1.34.2-1ubuntu1) ... Selecting previously unselected package libc-ares2:amd64. Preparing to unpack .../libc-ares2_1.15.0-1build1_amd64.deb ... Unpacking libc-ares2:amd64 (1.15.0-1build1) ... Selecting previously unselected package libnode64:amd64. Preparing to unpack .../libnode64_10.19.0~dfsg-3ubuntu1_amd64.deb ... Unpacking libnode64:amd64 (10.19.0~dfsg-3ubuntu1) ... Selecting previously unselected package nodejs-doc. Preparing to unpack .../nodejs-doc_10.19.0~dfsg-3ubuntu1_all.deb ... Unpacking nodejs-doc (10.19.0~dfsg-3ubuntu1) ... Selecting previously unselected package nodejs. Preparing to unpack .../nodejs_10.19.0~dfsg-3ubuntu1_amd64.deb ... Unpacking nodejs (10.19.0~dfsg-3ubuntu1) ... Setting up libc-ares2:amd64 (1.15.0-1build1) ... Setting up libuv1:amd64 (1.34.2-1ubuntu1) ... Setting up libnode64:amd64 (10.19.0~dfsg-3ubuntu1) ... Setting up nodejs-doc (10.19.0~dfsg-3ubuntu1) ... Setting up nodejs (10.19.0~dfsg-3ubuntu1) ... update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode Processing triggers for libc-bin (2.31-0ubuntu9) ...
vtop – A Linux process and memory activity monitoring tool
Once nodejs installed on Linux, we can type the following command to install vtop:
$ sudo npm install -g vtop
Sample outputs:
Fig.01: Installing vtop
How do I use vtop command?
Open the terminal app and then type the vtop command:
$ vtop
Sample outputs:
Fig.01: vtop in action
$ vtop -t wizard
Possible theme options: acid, becca, brew, dark, monokai, parallax, seti and wizard:
$ vtop -t parallax
Sample outputs:
Gif 01: vtop in action
Keyboard shortcuts
- Press u to update to the latest version of vtop.
- Arrow up or kto move up the process list.
- Arrow down or j to move down.
- Press g to go to the top of the process list.
- Press G to move to the end of the list.
- Hit dd to kill all the processes in that group.
How to change theme color
Run the following command:
vtop --theme wizard
OR
vtop -t wizard
Possible values for theme are acid, becca, brew, certs, dark, gooey, gruvbox, monokai, nord, parallax, seti and wizard. I can see all using a bash for loop as follows:
in="acid|becca|brew|certs|dark|gooey|gruvbox|monokai|nord|parallax|seti|wizard" IFS='|' for i in $in do vtop -t $i done
Even though vtop is pretty fancy. I recommend htop tool or atop utility or top command only for server usage.
Conclusion
We shown how to install and use vtop on Linux. See the following resources for more information:
- Install and Use nmon Tool To Monitor Linux Systems Performance
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- Linux: Keep An Eye On Your System With Glances Monitor
- Visit the vtop project page for more info.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 2 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Htop is nice and can be installed through apt-get
Interestingly, it doesn’t show the proper CPU usage in the process list window. It shows the proper usage in the graph, but I have a VMWare VM currently doing a process that’s eating up (according to htop) 376% CPU (4 virtual CPUs, 400% is all 4 pegged). vtop shows in the graph that we’re nearly pegged, but the process list just has vmware listed once, taking up a mere 9.1% of the CPU.
vtop is neat, but for accuracy on my particular system, I’ll stick to top and htop.