Btop | Terminal Based Resource Monitor

It seems that just like when I am happily excited about a tool I enjoy and still think it’s the new hotness, I find out it is no longer the new hotness and I’m just an old man that is seemingly behind the times… chronically…

This is a brief overview of Btop, the terminal based, resource monitor, a little history, some features and what I think is fantastic about it. This is the latest in a line of incredibly useful and fantastic looking terminal based system monitoring tools for us to use in the open source world.

Short History

That said, what is so great about btop over the last system monitoring tool, bpytop, by the same developer? This is written in C++ instead of python. It is also the main effort. The first monitoring tool like this is called bashtop which had it’s last change log committed on 20 July 2020. According to the Github repository, this is primarily written in bash, which would make sense because that is in its name.

There is 6% Python code in the project which is, perhaps, what inspired the next iteration was called bpytop. Just speculation, but maybe Python would be more portable and could therefore be used on more platforms. Just speculation but that would be a reason I would go with Python as a continuation.

Like bashtop, bpytop was also an charmingly crafted presentation in the terminal of your system processes, and resource usage. From what I can tell this is visually identical to its progenitor and written entirely in Python. It also boasted more features and had rapid development. I was largely stuck on this because of how good it was. It received its last commit on 22 December 2021. I happily used it for 3 years and even lately, enjoying the fact that it is in the main openSUSE Tumbleweed repositories so I didn’t have to do the manual pip3 installation method.

A New Beginning

Btop or Btop++ as it is writting largely in C++ with the latest commit (at the time of writing) 01 March 2024 and has a pretty regular cadence of updates. Since C++ is not an interpreted language like Python, that makes Btop significantly more efficient than bpytop.

Installation

Btop is available in the main repository of openSUSE Tumbleweed but not the other variants of openSUSE. There are community repos that have it available, so do not worry at all. So long as you have OPI installed on openSUSE, you should be able to get whatever software you would like.

For openSUSE Tumbleweed, simply run in the terminal:

sudo zypper install btop

For all other openSUSE distributions (I can’t speak for the immutable options).

sudo opi btop

For other distributions, see the Github page. Once installed you can begin your grand voyage through btop by simply running in the terminal, btop.

Lighting up the Terminal

Most people think very little of the terminal. Some even call it “DOS” which is rather unsettling. The terminal is, like it or not, a rather spartan work environment but one that allows for incredible control of your Linux systems. It is at the core the best way to manipulate a computer. Btop takes that already powerful interface and lights it up with real time metrics of your computer in a scintillating display of colorful graphs and charts.

Main Window

The main window, as it is displayed in “Preset 0” is essentially perfect for my liking. The proc area is a bit crammed and doesn’t show you all the details but pressing the left and right arrow keys will provide the columns not readily visible that may be of interest to you.

There are 3 other presets that you can cycle through by pressing p that may display the information more to your liking. If none of these quite fit your personal tastes, you are free to create your own preset in the Options menu.

The first section is your CPU information box with a few extras. Some stand-out smile makers here is you can see real-time information about your battery usage too. Depending on what I’m doing besides watching the graph tic by, you can see how many watts your system is consuming. I don’t have any way to verify the usage information but I am willing to bet it is pretty accurate.

Options

The options are broken down into six sections, General, CPU, GPU, Mem, Net, and Proc. One might say that there is an almost exhaustive list of options here so I will just highlight the options I find to be most interesting

General

Perhaps one of the more interesting things to do here is to change the them to your liking. I happen to find the default just as I prefer but we all have different tastes in the terminal experience. For those that like VIM key combinations, that is also available here and if you are on some sort of mobile device with a battery, you can toggle the battery information on and off.

CPU

I left this section at its defaults. I do like that the options here will allow you to move the CPU graph and customize what you see here.

GPU

Unfortunately, for my Intel based laptop, I wasn’t able to explore the GPU stats for nerds here. Maybe someday but not today. I will probably end up testing this out on another system at some point with dedicated graphics.

Memory

The memory category provides options on RAM and storage statistics to include IO speeds. There are options about hiding ZFS datasets which is something I don’t have to mess around with myself.

The Disks filter option allows you to exclude specific partitions which can make for a clearer view of your storage.

Network

The most notable option here is the style of graph to display the information. I did end up keeping it the “braille” option because I just happen to think it looks the best to my eyes.

Proc

The proc section just may be the most useful when it comes to interacting with your system. Here you can define where you would like it “box” located. This is useful if you have specific preferences for where your eyes want to go to see the processes. Another interesting feature here is to view the processes in a tree displaying the parent and child process relationship. This can also be toggled in the main view by pressing e.

Help

The last area of note is the Help menu. This is a great cut sheet for interacting with btop. Very handy for getting started with btop.

What I Like

The right level of simplicity with the correct sprinkling of complexity. Looking at this level of system detail can be a bit of an eye strain but the way this is displayed, segmented out in boxes of like information, moving from one part of your system’s status to another is very easy to ascertain in just a glance. Drilling down further for details is near effortless by the way the information is arranged within each box.

Being that this is written in C++, that means that, in theory, this is portable to every architecture out there. With enough drive and determination, it would be quite possible to port this or parts of this to something a bit older, like the Amiga or other Motorola 68k machines. Did I look into this? No, I am just saying this hoping that someone happens to read this and find that to be a good idea and do it. In my defense, there have been other applications and games written in C/C++ for x86 machines that have been successfully ported over so it can’t be an impossibility at all.

What I Don’t Like

There is really only one thing I don’t like about btop and that is my Intel, integrated GPU isn’t registering on the GPU portion of the system monitoring tool. I’m sure that there isn’t much of a demand there so that is the reason why.

Final Thoughts

Without any hesitation, btop is the greatest terminal based system monitor ever created. It is a fine and dandy way to very rapidly acquire a thorough picture of the system’s status in the terminal. I would go so far as to say, there is more information packed in one screen of the terminal than any graphic based application has ever provided. Additionally, the default theme of btop is absolutely excellent. The color combinations define everything so perfectly.

I can’t help but wonder what is next for btop. Maybe there will be a Rust version next or will C++ be the way forward for this accomplished programmer? Whatever he does, I am grateful for btop as well as all that came before it. Jakob P. Liljenberg has brought an immense amount of enjoyment to me in my terminal life and overall satisfaction with using Linux. If you would like more on this project and others, visit aristocratos on Github to see the breadth of talent pouring from his fingertips. If you have the means, you like what he does and has helped you in your time behind your screen, be sure to tip your developers and remember to Linux responsibly.

References

Jakob P. Liljenberg (aristocratos) on Github
Bashtop in Github
Bpytop in Github
Install Btop on Ubuntu


Discover more from CubicleNate.com

Subscribe to get the latest posts sent to your email.


Comments

One response to “Btop | Terminal Based Resource Monitor”

  1. Georgi Avatar
    Georgi

    amazing app ! thanks to the creator

Leave a Reply

Discover more from CubicleNate.com

Subscribe now to keep reading and get access to the full archive.

Continue reading