Monitoring tools are vital and every system admin knows it. With the help of resource monitoring applications, we can continually observe the health of a system's resources when a task is running. Today, we will be discussing two system resource monitors namely Bashtop and Bpytop to monitor system resources in Linux and Unix-like operating systems. Bashtop and Bpytop resource monitors will show you the system's usage and stats for processor, memory, disks, network and processes.
The author of this duo monitoring tools has developed Bashtop first and then created the Python port of Bashtop and named it as Bpytop. They don't have much difference. Both utilities serves the same purpose and have the same set of features. The only difference is both are written in different programming languages. Bashtop is written in Bash and Bpytop is written in Python. Bashtop and Bpytop supports GNU/Linux, Mac OS and FreeBSD.
The developer claims Bpytop is faster than Bashtop and Bpytop has more features and suggest us to use Bpytop instead of Bashtop. It is however your personal choice. You can try both and pick on that suits for you.
Table of Contents
Install Bashtop resource monitor on Linux
Bashtop should work on any modern *nix systems that have the following dependencies:
- Terminal with support for 24-bit truecolor,
- Bash 4.4 or newer versions,
- Git,
- GNU Coreutils,
- GNU sed,
- GNU awk,
- GNU grep,
- ps from procps-ng (v3.1.15 or later),
- Python 3.6 or later versions,
- Psutil (v5.7.0 or later),
- Optional packages;
- Lm-sensors - to show CPU temperatures,
- iostat (part of sysstat) - to show disk read/write stats and are not using psutil data collection,
- curl - download bashtop themes and get messages about updates.
Install bashtop on Arch Linux
Even though Bashtop is new, it became quite popular within a short period of time and made it to the official repositories of popular Linux distributions.
On Arch Linux, Bashtop is included in [Community] repository. To install Bashtop on Arch Linux and its variants like Manjaro Linux, run:
$ sudo pacman -S bashtop
It is also available in AUR, so you can install it using any AUR helper programs for example Yay.
$ yay -S bashtop-git
Install bashtop on Debian
Bashtop is available in official Debian repository since Debian 11. To install Bashtop on Debian, run:
$ sudo apt install bashtop
Install bashtop on Fedora
$ sudo dnf install bashtop
Install bashtop on CentOS 8 / RHEL 8
$ sudo dnf config-manager --set-enabled PowerTools
$ sudo dnf install epel-release
$ sudo dnf install bashtop
Install bashtop on Ubuntu
Bashtop is available in official Ubuntu repository since Ubuntu 20.10.
To install Bashtop on Ubuntu and derivatives such as Linux Mint, run:
$ sudo apt install bashtop
Install bashtop from Snap store
It is also available as Snap aplication:
$ sudo snap install bashtop
Install bashtop from PPA
There is also an official PPA available. Add Bashtop PPA and install it on Ubuntu by running the following commands one by one:
$ sudo add-apt-repository ppa:bashtop-monitor/bashtop
$ sudo apt update
$ sudo apt install bashtop
Install Bashtop from source
You can also install it from source. Just make sure you have installed the aforementioned dependencies.
Git clone the Bashtop repository using command:
$ git clone https://github.com/aristocratos/bashtop.git
The above command will clone the contents of Bashtop github repository in a directory named "bashtop" in the current directory. Go to the cloned directory:
$ cd bashtop
And run the following command to install Bashtop from source:
$ sudo make install
To uninstall it, simply run the following command from the bashtop directory:
$ sudo make uninstall
Install Bpytop resource monitor on Linux
Bpytop is the python port of Bashtop. The author claims that Bpytop is quite lot faster and has more features than Bashtop.
Bpytop is available as snap application. To install Bpytop on Linux distributions that supports snapd, run:
$ sudo snap install bpytop
Install Bpytop from source
Make sure your system has following dependencies:
- A Terminal with 24-bit truecolor support,
- Python 3 (v3.6 or later),
- psutil module (v5.7.0 or later).
After installing the prerequisites, git clone the Bpytop repository using command:
$ git clone https://github.com/aristocratos/bpytop.git
The above command will clone the contents of bpytop in a local directory named "bpytop". Cd into it and install it like below:
$ cd bpytop $ sudo make install
To uninstall Bpytop, simply run the following command from bpytop directory:
$ sudo make uninstall
Monitor System Resources With Bashtop And Bpytop In Linux
Like I already said, Bashtop and Bpytop serves the same purpose i.e monitoring system resources and display the stats for CPU, memory, disks, processes, and network etc.
To start monitoring your Linux system resources, run Bashtop or Bpytop like below:
$ bashtop
Or,
$ bpytop
Sample output:
As you can see in the above output, Bashtop displays the following details:
- CPU usage graph,
- Processor clock speed,
- Total CPU usage,
- Usage of each CPU core,
- Total RAM,
- Used RAM,
- Free RAM,
- Cache memory,
- Available cache memory,
- Swap usage (used and free),
- Current read and write speeds for disks.
The default refresh rate for Bashtop/Bpytop is 2500 milliseconds. Press (+, A, a) keys to add 100ms to update timer. Press (-, S, s) keys to subtract 100ms from update timer.
Select and view processes
Use UP/DOWN keys to navigate through the processes or use. Press Pg Up and Pg Down keys to jump 1 page in process list. Press (Home or End) keys to jump to first or last page in process list.
The processes section displays the following details in column-wise:
- Process ID (PID),
- Process name,
- Arguments,
- Threads,
- Owner of the process,
- Memory usage details of the process,
- CPU usage of the process.
You can switch between the columns with (Left or Right) arrow keys.
The process names are arraged by PID in descending order. I.E. the largest PID will be shown in top. You can use (R, r) keys to reverse sorting order in processes section.
To display the detailed information for a selected process, hit ENTER.
To close the selected process details box, hit ENTER key.
Filter processes
To filter processes by a specific string, press (F, f) keys and type the string name. For instance if you type "ssh", you will see all processes that starts with "ssh" letters.
To clear any entered filter, press (C, c) keys.
Terminate processes
You can terminate selected process with SIGTERM by pressing (T, t) keys.
Kill processes
To kill a selected process with SIGKILL, press (K, k) keys.
This is equaivalent to "kill -9 <pid>" command.
Interrupt processes
To interrupt selected process with SIGINT, press (I, i) keys.
Display help
You can type F1, H, h keys to display the help section.
You can bring up the Bashtop/Bpytop Main menu by pressing press Esc, M, m keys.
Exit Bashtop/Bpytop
To exit Bashtop/Bpytop, simply press (Ctrl-C, Q, q) keys.
Configure Bashtop/Bpytop
Bashtop and Bpytop config files are stored in "$HOME/.config/bashtop" and "$HOME/.config/bpytop" folders respectively.
You can view the current configuration options of Bashtop/Bpytop by looking at file.
Bashtop config file:
$ cat ~/.config/bashtop/bashtop.cfg
Bpytop config file:
$ cat ~/.config/bashtop/bpytop.cfg
Sample output:
#? Config file for bashtop v. 0.9.25 #* Color theme, looks for a .theme file in "$HOME/.config/bashtop/themes" and "$HOME/.config/bashtop/user_themes" #* Should be prefixed with either "themes/" or "user_themes/" depending on location, "Default" for builtin default theme color_theme="Default" #* Update time in milliseconds, increases automatically if set below internal loops processing time, recommended 2000 ms or above for better sample times for graphs update_ms="2300" #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive" #* "cpu lazy" updates sorting over time, "cpu responsive" updates sorting directly proc_sorting="pid" #* Reverse sorting order, "true" or "false" proc_reversed="false" #* Show processes as a tree proc_tree="false" #* Check cpu temperature, only works if "sensors", "vcgencmd" or "osx-cpu-temp" commands is available check_temp="false" #* Draw a clock at top of screen, formatting according to strftime, empty string to disable draw_clock="%X" #* Update main ui when menus are showing, set this to false if the menus is flickering too much for comfort background_update="true" #* Custom cpu model name, empty string to disable custom_cpu_name="" #* Enable error logging to "$HOME/.config/bashtop/error.log", "true" or "false" error_logging="true" #* Show color gradient in process list, "true" or "false" proc_gradient="true" #* If process cpu usage should be of the core it's running on or usage of the total available cpu power proc_per_core="false" #* Optional filter for shown disks, should be names of mountpoints, "root" replaces "/", separate multiple values with space disks_filter="" #* Enable check for new version from github.com/aristocratos/bashtop at start update_check="true" #* Enable graphs with double the horizontal resolution, increases cpu usage hires_graphs="false" #* Enable the use of psutil python3 module for data collection, default on OSX use_psutil="true"
Just change the settings as per your liking.
Alternatively, you can view the current options from Bashtop/Bpytop TUI by pressing "m" letter.
Related read:
Resources:
3 comments
yay -S bashtop will install the Arch community package just like sudo pacman -S bashtop. However, yay -S bashtop-git will install the AUR VCS package. π
Yeah, you are right! Updated the guide now. Thanks for the heads up.
Hi,
Thanks a lot
Very useful command