Those of us who work a lot in the terminal, either on our own computer or with servers, often need to see the performance of the equipment, consumption of
RAM, processes that consume the most, CPU, etc., for this there are several alternatives, several programs that we can use to display this information (and more) in the
terminal.
Top:
To run it in a terminal type the following and press Enter:
top
This is the simplest, it is installed by default in many distros and it shows us a lot of different information. For example, it shows us the number of users
assets, online time, also as we can see it shows us the amount of tasks or processes (Tasks: 154 total), the amount of them that are in
running, sleeping, detained or in zombie mode.
Below we see (in KiB) the amount of RAM being used (and free), just like the SWAP
Finally we have a list of the processes, of each one we can know the PID, user who executes it, amount of memory (real and virtual) that it uses, percent
CPU consumption, execution time and specific command / process.
As you can see it is a bit uncomfortable to read this information, however, if you press Z will be able to see the information with colors, which does a little
simpler to read all this data:
To get out of top just press Q and it will close.
htop:
To run it in a terminal type the following and press Enter:
htop
In several distros it is installed by default, in others (like ArchLinux) not, so if it is not opened with the previous command then they must install it.
If they use Ubuntu, Debian or derivatives it would be:
sudo apt-get install htop
If they use ArchLinux or derivatives it would be:
sudo pacman -S htop
As you can see, this shows us the more ordered information, less stuck, it is easier to read everything. It shows us almost the same as the previous top, no
However, in a better way to read it (even with 'bars' for the consumption of CPU, RAM and SWAP), but !, it offers us other options that you can see below.
These options can be used by pressing the keys F1 ... F2 ... and so on until F10, these allow us
search for specific processes in the list, see them arranged as a tree (processes and threads or associated processes), filter by those with more CPU or RAM
consume, kill processes, etc.
To get out of top just press F10 and it will close.
nmon:
This allows us to further customize the information that it shows us, when we open it it shows us several options, to put it simply, it gives us the
information in a modular way, that is, if we want it to only show us the info related to the CPU, we press a key, if we want it to also show us
In addition, the one related to RAM, we press another key, here is the screenshot of the home screen:
As you can see, if you want to see the information related to the CPU press the key c … The one related to the memory key m ...
with hard drives the d ... the kernel k ... the network n (lowercase), etc.
I leave you the combination of nmon + c + m + k
This should be installed, if you use Ubuntu, Debian or derivatives it would be:
sudo apt-get install nmon
If they use ArchLinux or derivatives it would be:
sudo pacman -S nmon
To get out of top just press Q and it will close.
The end!
Well, that's all. If any of you know of any other real-time system monitors in terminal, let me know in a comment 
regards