When we delve into the world of Linux system administrationOne of the first things we need to know is what the heck is going on under the hood of our machine. For years, the command top It has been the undisputed standard, that old acquaintance that is always there to tell us which process is eating up the RAM or why the processor is smoking.
However, the open-source ecosystem isn't standing still, and alternatives have emerged that make the classic monitor seem like a relic from the 90s. Tools like btop And its predecessors have arrived to give us a much more visual, intuitive and, frankly, much more pleasing experience, turning the terminal into a true control center modern.
The essential classic: Mastering the top command
TOP (which is nothing more than an acronym for Table of ProcessesIt is the basic tool that comes installed on almost any Linux distribution or UNIX system. Its function is simple but vital: to allow us monitor and manage tasks that run in real time. It's the first line of defense for detecting zombie processes, identify CPU spikes or simply extract the PID of an application that has frozen.
Upon launching it, we find an interface divided into several sections. At the top, we have the activity time (similar to what we would see with the uptime command), where we can check the time, how long the server has been running, and the average CPU load at intervals of 1, 5, and 15 minutes. Just below, the task status details how many processes are running, sleeping, stopped, or in a zombie state.
In-depth analysis of resource usage in TOP
The CPU breakdown is fundamental to understanding performance. We'll see values such as us (user) for common applications, sy (system) for the kernel, and the value id (idle)which tells us how much CPU is free. An interesting fact is the steal time (st), which only appears in virtual machines and tells us how long the virtual CPU has been waiting for the real one.
Regarding memory, TOP differentiates us between the VIRT (total virtual memory), the ORS (actual physical RAM used) and the SHR (shared memory). To manage these processes, we can use keyboard shortcuts: the key M orders by memory, the P by CPU and the T per runtime. If we need to clean up, the key k It allows us to kill a process by entering its PID, and to force closure with the signal SIGKILL (9).
Advanced tricks and top settings
For those seeking more control, TOP allows you to modify the refresh rate with the do key using the command top -d It is also possible to filter the information by pressing the key o We can create rules, such as showing only processes that consume more than 0.2% of CPU (using %CPU>0.2If we want to save a record for later analysis, we can generate a snapshot redirecting the output to a file with top -b -n 5 > archivo.txt.
Btop: The visual and modern evolution
If top is the austere tool, btop It's the Ferrari of resource monitors. Written in C++, it's the third generation of a project that started with bashtop (in Bash) and continued with bpytop (in Python). Its main advantage is that it offers a graphical interface in the terminal which supports the use of the mouse, allowing us to click on menus and buttons as if we were in a desktop application.
The btop screen is a board full of real time graphicsWe not only see the list of processes, but we also have detailed charts showing the usage of each CPU core, network activity per interface, and the disk performance (read/write). All of this can be deeply customized through the options menu (M or Esc key), where we can change the color themes, such as the popular Catppuccino, or adjust the layout of the modules.
Btop installation and commissioning
Installing it is a piece of cake on most distributions. On Ubuntu, all you need to do is... sudo apt install btopIn Fedora we use sudo dnf install btop and on Arch Linux sudo pacman -S btopIf an error appears when running it... UTF-8 localeThis can be solved by forcing the encoding with btop --force-utf or by configuring the variable LONG in the user's .bashrc file.
In everyday use, btop simplifies task management. To finish a process, simply select it and press T (SIGTERM) o K (SIGKILL)If we want to delve deeper into a specific process, we press Enter and we will see its detailed statisticsIn addition, it allows you to quickly filter the process list with the F key, which is a lifesaver when the system is overloaded and there are hundreds of lines on the screen.
Bpytop: The Python-based alternative
Before btop became established in C++, there existed bpytopAlthough it shares the same visual philosophy and functionality as its successor, it is developed in Python and requires the library psutilIt remains a viable option, especially in environments where Python is already pre-installed and a Python installation is preferred. pip3.
Bpytop maintains mouse support and the ability to send signals such as SIGINT or SIGTERMLike btop, it allows you to change the appearance using bashtop-compatible themes, which are usually stored in the path .config/bpytop/themesIt's a powerful tool, although btop is often preferred nowadays because it has minor dependencies and more optimized performance.
Comparison and professional workflow
It's important to understand that none of these tools are the same. TOP is the option for supervivenciaIt's everywhere and it never fails. Btop is the choice of active monitoringIdeal for having it open on a panel tmux or screen while we work on another, giving us constant visibility of the hardware without changing windows.
However, btop and top are local view tools. If you manage a fleet of servers, the next logical step is to move to solutions from centralized monitoring like Prometheus and Grafana. While btop tells you what's happening right now on that machine, industrial solutions offer you historical data and alerts automatic when a service goes down, thus complementing the immediate reaction capability provided by terminal monitors.
We offer a range of options, from the technical simplicity of top to the visual sophistication of btop and bpytop, allowing you to choose the right tool depending on your needs: a lightweight, universal tool or an intuitive control panel with mouse support and graphs. Whether managing priorities with the Nice setting in top or customizing themes in btop, the goal is to maintain the system stability and optimize the use of CPU, RAM and network efficiently.





