Monitoring Linux system resources with bpytop

0

the bpytop tool is similar to other performance monitoring tools available for Linux systems like top, iotop, htop, bashtop, etc. It is a terminal-based resource monitor that works efficiently and is visually appealing.

The tool was ported from bashtop and rewritten in Python, so you must have Python – version 3.6 or higher – installed on your system to use it. (The “bpy” part of the name undoubtedly stands for “bash Python”.)

If Python is already installed on your system, you can check the version using one of these command sets:

Fedora                       Linux Mint
======                       ==========
$ which python               $ which python3
/usr/bin/python              /usr/local/bin/python3
$ python -V                  $ python3 -V
Python 3.9.7                 Python 3.8.10

Both systems shown run Python3, but the Fedora system has / usr / bin / python set up as a symbolic link to Python and the other system does not. So you’re both using Python3.

How to install bpytop on Fedora and Linux Mint. On Fedora, do the following:

$ sudo dnf install bpytop

If necessary, you can remove it with this command:

$ sudo dnf remove bpytop

The tool can also be installed from the Snap Store. If that’s what you prefer, use these commands:

$ sudo dnf install snapd
$ sudo ln -s /var/lib/snapd/snap /snap
$ sudo snap install bpytop

To install bpytop On Linux Mint, run the following commands.

$ sudo apt install python3-pip
$ sudo pip3 install bpytop
$ which bpytop
/usr/local/bin/bpytop

You can update with a command like this:

$ sudo pip3 install bpytop —upgrade

You can uninstall the Snap version with this command:

$ sudo pip3 uninstall bpytop

Using bpytop

As above, bpytop shows processor, memory, hard drive, network, process usage and statistics. The ad is very flexible, but it can take some time to learn all it can. To begin with, you may need to stretch your terminal window to provide the required screen real estate (at least 80 x 24). The tool complains when there is not enough space.

the bpytop Tool doesn’t install with a man page, but you can get a little help with the bpytop —Help Command.

$ man bpytop
No manual entry for bpytop
$
$ bpytop —help
usage: bpytop [-h] [-b BOXES] [-lc] [-v] [—debug]

optional arguments:
  -h, —help            show this help message and exit
  -b BOXES, —boxes BOXES
                        which boxes to show at start, example: -b “cpu mem net
                        proc”
  -lc, —low-color      disable truecolor, converts 24-bit colors to 256-color
  -v, —version         show version info and exit
  —debug               start with loglevel set to DEBUG overriding value set

The best way to learn how to use it bpytop is spending some time trying out different options. After a while, it will become easier to display exactly what you want to focus on.

Begin bpytop, just type “bpytop” into your command line.

$ bpytop

The tool has three modes: Full, Stat and Proc. The first time you use the tool, it will start in full mode and you should see “mode: full” on the top line of the display. Clicking mode: full takes you to mode: stat, and clicking again takes you to mode: proc. Each mode shows different amounts and types of data with good overlap. Proc mode focuses on processes, but all modes contain different data.

The following images illustrate the layout of each of the three modes.

Linux bpytop full view Sandra Henry-Stocker

Full mode

Figure 1: Full mode

Linux bpytop stat mode Sandra Henry-Stocker

Statistics mode

Figure 2: Statistics mode

Linux bpytop proc mode Sandra Henry-Stocker

Proc mode

Figure 3: Proc mode

It is important to understand that whichever mode you are using when you exit, bpytop is the mode in which the tool will be started the next time. However, you can direct the tool to the things you want to focus on. For example typing bpytop -b “memory CPU” get the tool on these performance issues. the -B -Argument selects which “boxes” with performance details you want to display.

The command shown below will start bpytop with all data options and restores them as default.

$ bpytop -b “cpu mem net proc”

Using the following command gives you the option to view memory usage in one of two graph forms. In order for it to start in full mode the next time you need to use the command shown above.

$ bpytop -b “mem”

In Full Mode or Proc Mode, you can use the up and down arrow keys to select a specific process. In proc mode you can then terminate, terminate or interrupt a process if you have sufficient permissions. To end a process, click on “Kill” in the bottom line of the display.

Type Q or ^ c break up.

Wrap up

the bpytop Tool is a great tool for viewing important performance statistics on your Linux system. It may take a while to get used to how it works, but you will likely enjoy it and find many helpful ways to check its performance.

Join the Network World communities on Facebook and LinkedIn to comment on topics that come first.

Copyright © 2021 IDG Communications, Inc.


Source link

Share.

Comments are closed.