Top Related Projects
A TUI system monitor written in Rust
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
htop - an interactive process viewer
Yet another cross-platform graphical process/system monitor.
Terminal-based CPU stress and monitoring utility
System monitoring dashboard for terminal
Quick Overview
Bpytop is a resource monitor for Unix-like systems that shows usage and stats for processor, memory, disks, network, and processes. It's written in Python and aims to be an alternative to top and htop with a more visually appealing and informative interface.
Pros
- Beautiful and intuitive user interface with graphs and color-coded information
- Highly customizable with themes and configuration options
- Responsive and efficient, with minimal system resource usage
- Cross-platform compatibility (Linux, macOS, FreeBSD)
Cons
- Requires Python 3.6+ to be installed on the system
- May not be as lightweight as traditional tools like top or htop
- Some advanced features of htop are not available in bpytop
Getting Started
To install and run bpytop:
# Install using pip (requires Python 3.6+)
pip install bpytop
# Run bpytop
bpytop
For macOS users with Homebrew:
# Install using Homebrew
brew install bpytop
# Run bpytop
bpytop
Once running, you can use the following key bindings:
- 'q' or 'Esc': Quit
- 'm': Change view mode
- 'h': Show help menu
- 'f': Show/hide function bar
Customize bpytop by editing the configuration file located at ~/.config/bpytop/bpytop.conf
. You can change color schemes, update refresh rates, and modify various display options to suit your preferences.
Competitor Comparisons
A TUI system monitor written in Rust
Pros of ytop
- Written in Rust, potentially offering better performance and memory safety
- Lightweight and minimal design, focusing on essential system monitoring features
- Cross-platform support, including Windows
Cons of ytop
- Less feature-rich compared to bpytop
- Limited customization options
- Development appears to be less active, with fewer recent updates
Code Comparison
ytop (Rust):
pub fn get_cpu_usage() -> f64 {
let cpu = sys_info::cpu_num().unwrap();
let load = sys_info::loadavg().unwrap();
load.one / cpu as f64 * 100.0
}
bpytop (Python):
def get_cpu_usage():
cpu_percent = psutil.cpu_percent(interval=1)
return cpu_percent
Both projects aim to provide system monitoring functionality, but they differ in implementation and feature set. ytop is written in Rust, which may offer performance benefits, while bpytop is written in Python, allowing for easier customization and extension.
bpytop provides a more comprehensive set of features and a highly customizable interface, making it suitable for users who want detailed system information and a visually appealing display. ytop, on the other hand, focuses on simplicity and lightweight design, which may be preferable for users who prioritize minimal resource usage and cross-platform compatibility.
The code comparison shows different approaches to retrieving CPU usage, with ytop using the sys_info crate and bpytop utilizing the psutil library. This reflects the language-specific ecosystem and available tools for system monitoring in Rust and Python, respectively.
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
Pros of Glances
- More comprehensive system monitoring, including network, disk I/O, and processes
- Supports remote monitoring and web interface
- Highly customizable with plugins and export options
Cons of Glances
- Less visually appealing interface compared to bpytop's modern design
- May have higher resource usage due to its extensive feature set
- Steeper learning curve for advanced features and customization
Code Comparison
Glances (Python):
from glances_api import GlancesApi
glances = GlancesApi(host='localhost', port=61208)
cpu_percent = glances.getCpu()['total']
print(f"CPU Usage: {cpu_percent}%")
bpytop (Python):
import psutil
cpu_percent = psutil.cpu_percent(interval=1)
print(f"CPU Usage: {cpu_percent}%")
Both projects use Python for system monitoring, but Glances offers a more extensive API for accessing various system metrics. bpytop focuses on a streamlined, visually appealing interface with core system information. Glances provides more detailed data and customization options, while bpytop emphasizes simplicity and aesthetics. The choice between them depends on the user's specific monitoring needs and preferences for interface design.
htop - an interactive process viewer
Pros of htop
- Written in C, resulting in lower resource usage and faster performance
- More mature project with a longer history and wider adoption
- Supports a broader range of Unix-like systems, including older versions
Cons of htop
- Less visually appealing interface compared to bpytop's modern design
- Fewer customization options for colors and layout
- Limited graphical representations of system resources
Code Comparison
htop (C):
static void Process_writeCommand(Process* this, int attr, int baseattr, RichString* str) {
char* comm = this->comm;
int commLen = strlen(comm);
RichString_appendnAscii(str, attr, comm, commLen);
}
bpytop (Python):
def get_cpu_name() -> str:
"""Return the CPU name"""
if SYSTEM == "Darwin":
return popen("sysctl -n machdep.cpu.brand_string").read().strip()
elif SYSTEM == "Linux":
return popen("cat /proc/cpuinfo | grep 'model name' | uniq").read().split(":")[-1].strip()
Both projects aim to provide system monitoring tools, but htop focuses on efficiency and broad compatibility, while bpytop prioritizes a modern, visually appealing interface with more customization options. The code snippets highlight the language difference (C vs. Python) and showcase typical operations in each project.
Yet another cross-platform graphical process/system monitor.
Pros of bottom
- Written in Rust, offering better performance and memory safety
- Cross-platform support, including Windows, macOS, and Linux
- More customizable configuration options
Cons of bottom
- Less visually appealing interface compared to bpytop
- Steeper learning curve for configuration and customization
- Fewer built-in themes and color schemes
Code Comparison
bpytop (Python):
def get_cpu_freq():
freq = {}
for cpu, f in psutil.cpu_freq(percpu=True):
freq[f"cpu{cpu}"] = f.current
return freq
bottom (Rust):
fn get_cpu_freq() -> HashMap<String, f64> {
let mut freq = HashMap::new();
for (cpu, f) in sys.cpu_freq().iter().enumerate() {
freq.insert(format!("cpu{}", cpu), f.current);
}
freq
}
Both projects aim to provide system monitoring functionality, but bottom focuses on performance and cross-platform compatibility, while bpytop emphasizes a more user-friendly interface and easier setup. The code comparison shows similar approaches to retrieving CPU frequency information, with bottom utilizing Rust's strong typing and performance benefits.
Terminal-based CPU stress and monitoring utility
Pros of s-tui
- Lightweight and focused specifically on stress testing and monitoring
- Simpler interface, potentially easier for beginners to use
- Built-in stress testing capabilities
Cons of s-tui
- Less visually appealing and modern interface compared to bpytop
- More limited in scope, focusing primarily on CPU and temperature monitoring
- Fewer customization options for the display
Code Comparison
s-tui sample code:
def get_cpu_freq():
cpu_freq = psutil.cpu_freq()
return cpu_freq.current if cpu_freq else None
def get_cpu_temp():
try:
temp = psutil.sensors_temperatures()['coretemp'][0].current
return temp
except:
return None
bpytop sample code:
def get_cpu_stats():
cpu_percent = psutil.cpu_percent(interval=None, percpu=True)
cpu_freq = psutil.cpu_freq(percpu=True)
return cpu_percent, cpu_freq
def get_mem_stats():
mem = psutil.virtual_memory()
return mem.total, mem.available, mem.percent
Both projects use the psutil
library for system monitoring, but bpytop offers a more comprehensive set of monitoring features and a more polished user interface. s-tui is more focused on stress testing and basic CPU monitoring, making it a good choice for users who need those specific features in a lightweight package.
System monitoring dashboard for terminal
Pros of gtop
- Lightweight and fast, written in JavaScript
- Simple and easy to use interface
- Cross-platform compatibility (works on Windows, macOS, and Linux)
Cons of gtop
- Less detailed system information compared to bpytop
- Fewer customization options
- Limited graphical representations of system metrics
Code Comparison
gtop (JavaScript):
const si = require('systeminformation');
const blessed = require('blessed');
const contrib = require('blessed-contrib');
// Main application logic
bpytop (Python):
import psutil
import curses
import time
# Main application logic
Summary
gtop is a lightweight system monitoring tool written in JavaScript, offering a simple interface and cross-platform compatibility. However, it provides less detailed information and fewer customization options compared to bpytop. bpytop, written in Python, offers more comprehensive system monitoring capabilities and a highly customizable interface, but may have a slightly higher resource footprint. The choice between the two depends on the user's specific needs and preferences for system monitoring tools.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Index
- News
- Documents
- Description
- Features
- Themes
- Support and funding
- Prerequisites (Read this if you are having issues!)
- Dependencies
- Screenshots
- Installation
- Configurability
- License
News
C++ Version
18 September 2021
The Linux version of btop++ is complete. Released as version 1.0.0
Get it at https://github.com/aristocratos/btop
The development plan right now:
- 1.1.0 Mac OsX support
- 1.2.0 FreeBSD support
- 1.3.0 Support for GPU monitoring
- 1.X.0 Other platforms and features...
2 May 2021
I've started work on the third iteration of bashtop->bpytop.
It's being written in C++ and will simply be called btop
.
I'm aiming at releasing a beta version around August this year and will publish the repo when I've got the core functionality and structure ready for anybody that wanna help out.
This project is gonna take some time until it has complete feature parity with bpytop, since all system information gathering will likely have to be written from scratch without any external libraries. And will need some help in the form of code contributions to get complete support for BSD and OSX.
If you got suggestions of C++ libraries that are multi-platform and are as extensive as psutil are for python, feel free to open up a new thread in Discussions, it could help speed up the development a lot.
Will post any updates about this project here until the repo is made available.
Documents
CHANGELOG.md
CONTRIBUTING.md
CODE_OF_CONDUCT.md
Description
Resource monitor that shows usage and stats for processor, memory, disks, network and processes.
Python port and continuation of bashtop.
Features
- Easy to use, with a game inspired menu system.
- Full mouse support, all buttons with a highlighted key is clickable and mouse scroll works in process list and menu boxes.
- Fast and responsive UI with UP, DOWN keys process selection.
- Function for showing detailed stats for selected process.
- Ability to filter processes, multiple filters can be entered.
- Easy switching between sorting options.
- Send SIGTERM, SIGKILL, SIGINT to selected process.
- UI menu for changing all config file options.
- Auto scaling graph for network usage.
- Shows message in menu if new version is available
- Shows current read and write speeds for disks
Themes
Bpytop uses the same theme files as bashtop so any theme made for bashtop will work.
See themes folder for available themes.
The make install
command places the default themes in /usr/local/share/bpytop/themes
.
If installed with pip3
the themes will be located in a folder called bpytop-themes
in the python3 site-packages folder.
User created themes should be placed in $HOME/.config/bpytop/themes
.
Let me know if you want to contribute with new themes.
Support and funding
You can sponsor this project through github, see my sponsors page for options.
Or donate through paypal or ko-fi.
Any support is greatly appreciated!
Prerequisites
Mac Os X
Will not display correctly in the standard terminal (unless truecolor is set to False)! Recommended alternative iTerm2
Will also need to be run as superuser to display stats for processes not owned by user.
OsX on Apple Silicon (arm) requires psutil version 5.8.0 to work and currently has no temperature monitoring.
Upgrade psutil with sudo pip3 install psutil --upgrade
Linux, Mac Os X and FreeBSD
For correct display, a terminal with support for:
- 24-bit truecolor (See list of terminals with truecolor support)
- 256-color terminals are supported through 24-bit to 256-color conversion when setting "truecolor" to False in the options or with "-lc/--low-color" argument.
- Wide characters (Are sometimes problematic in web-based terminals)
Also needs a UTF8 locale and a font that covers:
- Unicode Block âBraille Patternsâ U+2800 - U+28FF
- Unicode Block âGeometric Shapesâ U+25A0 - U+25FF
- Unicode Block "Box Drawing" and "Block Elements" U+2500 - U+259F
Notice (Text rendering issues)
If you are having problems with the characters in the graphs not looking like they do in the screenshots, it's likely a problem with your systems configured fallback font not having support for braille characters.
See Terminess Powerline for an example of a font that includes the braille symbols.
See comments by @sgleizes link and @XenHat link in issue #100 for possible solutions.
If text are misaligned and you are using Konsole or Yakuake, turning off "Bi-Directional text rendering" is a possible fix.
Characters clipping in to each other or text/border misalignments is not bugs caused by bpytop, but most likely a fontconfig or terminal problem where the braille characters making up the graphs aren't rendered correctly. Look to the creators of the terminal emulator you use to fix these issues if the previous mentioned fixes don't work for you.
Notice (SSH)
Dropbear seems to not be able to set correct locale. So if accessing bpytop over ssh, OpenSSH is recommended.
Dependencies
Python3 (v3.7 or later)
psutil module (v5.7.0 or later)
Optionals for additional stats
(Optional OSX) coretemp (recommended), or osx-cpu-temp (less accurate) needed to show CPU temperatures.
Screenshots
Main UI showing details for a selected process.
Main UI in mini mode.
Main menu.
Options menu.
Installation
I only maintain the PyPi package, so will not take responsibility for issues caused by any other install method!
PyPi (will always have latest version)
Install or update to latest version
pip3 install bpytop --upgrade
Mac OsX
Install with Homebrew
brew install bpytop
Optional coretemp (Shows temperatures for cpu cores)
brew install hacker1024/hacker1024/coretemp
Alternatively install with MacPorts
port install bpytop
OsX on Apple Silicon (arm) requires psutil version 5.8.0 to work and currently has no temperature monitoring.
Upgrade psutil with sudo pip3 install psutil --upgrade
Arch Linux
Available in the Arch Linux [community] repository as bpytop
Installation
sudo pacman -S bpytop
Debian based
Available in official Debian repository since Debian 11
Installation
sudo apt install bpytop
Available for debian/ubuntu from Azlux's repository
FreeBSD package
Available in FreeBSD ports
Install pre-built package
sudo pkg install bpytop
Fedora/CentOS 8 package
Available in the Fedora and EPEL-8 repository.
Installation
sudo dnf install bpytop
Gentoo / Calculate Linux
Available from adrien-overlay
Installation
sudo emerge -av sys-process/bpytop
Mageia Cauldron (Mageia 8)
Available in Mageia Cauldron and then Mageia 8 when it is released.
Installation
sudo urpmi bpytop
sudo dnf install bpytop
MX Linux
Available in the MX Test Repo as bpytop
Please use MX Package Installer MX Test Repo tab to install.
http://mxrepo.com/mx/testrepo/pool/test/b/bpytop/
Void Linux
Available in void repo and void-packages ports tree
Installation
sudo xbps-install bpytop
Snap package
(Note! There is some issues caused by the snap sandboxing)
by @kz6fittycent
https://github.com/kz6fittycent/bpytop-snap
Install the package
sudo snap install bpytop
The config folder will be located in ~/snap/bpytop/current/.config/bpytop
Manual installation
Dependencies installation Linux
Install python3 and git with a package manager of you choice
Install psutil python module (sudo might be required)
python3 -m pip install psutil
Dependencies installation OSX
Install homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Install python3 if not already installed
brew install python3 git
Install psutil python module
python3 -m pip install psutil
Install optional dependency coretemp (recommended), or osx-cpu-temp (less accurate)
brew install hacker1024/hacker1024/coretemp
brew install osx-cpu-temp
Dependencies installation FreeBSD
Install with pkg and pip
sudo pkg install git python3 py37-psutil
Manual installation Linux, OSX and FreeBSD
Clone and install
git clone https://github.com/aristocratos/bpytop.git
cd bpytop
sudo make install
to uninstall it
sudo make uninstall
Configurability
All options changeable from within UI. Config files stored in "$HOME/.config/bpytop" folder
bpytop.cfg: (auto generated if not found)
"/etc/bpytop.conf" will be used as default seed for config file creation if it exists. ("/usr/local/etc/bpytop.conf" on BSD)
#? Config file for bpytop v. 1.0.64
#* Color theme, looks for a .theme file in "/usr/[local/]share/bpytop/themes" and "~/.config/bpytop/themes", "Default" for builtin default theme.
#* Prefix name by a plus sign (+) for a theme located in user themes folder, i.e. color_theme="+monokai"
color_theme="monokai"
#* If the theme set background should be shown, set to False if you want terminal background transparency
theme_background=False
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor=True
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
shown_boxes="cpu mem net proc"
#* 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=2000
#* Processes update multiplier, sets how often the process list is updated as a multiplier of "update_ms".
#* Set to 2 or higher to greatly decrease bpytop cpu usage. (Only integers)
proc_update_mult=2
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu responsive",
#* "cpu lazy" updates top process over time, "cpu responsive" updates top process directly.
proc_sorting="cpu lazy"
#* Reverse sorting order, True or False.
proc_reversed=False
#* Show processes as a tree
proc_tree=False
#* Which depth the tree view should auto collapse processes at
tree_depth=3
#* Use the cpu graph colors in the process list.
proc_colors=True
#* Use a darkening gradient in the process list.
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
#* Show process memory as bytes instead of percent
proc_mem_bytes=True
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available, see:
#* https://psutil.readthedocs.io/en/latest/#psutil.cpu_times for attributes available on specific platforms.
#* Select from a list of detected attributes from the options menu
cpu_graph_upper="total"
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available, see:
#* https://psutil.readthedocs.io/en/latest/#psutil.cpu_times for attributes available on specific platforms.
#* Select from a list of detected attributes from the options menu
cpu_graph_lower="total"
#* Toggles if the lower CPU graph should be inverted.
cpu_invert_lower=True
#* Set to True to completely disable the lower CPU graph.
cpu_single_graph=False
#* Shows the system uptime in the CPU box.
show_uptime=True
#* Check cpu temperature, needs "osx-cpu-temp" on MacOS X.
check_temp=True
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
cpu_sensor=Auto
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found
show_coretemp=True
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine"
temp_scale="celsius"
#* Show CPU frequency, can cause slowdowns on certain systems with some versions of psutil
show_cpu_freq=True
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
draw_clock="%H:%M"
#* Update main ui in background 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=""
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with a comma ",".
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot, /home/user"
disks_filter="exclude=/boot"
#* Show graphs instead of meters for memory values.
mem_graphs=True
#* If swap memory should be shown in memory box.
show_swap=True
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk=True
#* If mem box should be split to also show disks info.
show_disks=True
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical=True
#* Read disks list from /etc/fstab. This also disables only_physical.
use_fstab=True
#* Toggles if io stats should be shown in regular disk usage view
show_io_stat=True
#* Toggles io mode for disks, showing only big graphs for disk read/write speeds.
io_mode=False
#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined=False
#* Set the top speed for the io graphs in MiB/s (10 by default), use format "device:speed" separate disks with a comma ",".
#* Example: "/dev/sda:100, /dev/sdb:20"
io_graph_speeds=""
#* Set fixed values for network graphs, default "10M" = 10 Mibibytes, possible units "K", "M", "G", append with "bit" for bits instead of bytes, i.e "100mbit"
net_download="100Mbit"
net_upload="100Mbit"
#* Start in network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto=True
#* Sync the scaling for download and upload to whichever currently has the highest scale
net_sync=False
#* If the network graphs color gradient should scale to bandwidth usage or auto scale, bandwidth usage is based on "net_download" and "net_upload" values
net_color_fixed=False
#* Starts with the Network Interface specified here.
net_iface="br0"
#* Show battery stats in top right if battery is present
show_battery=True
#* Show init screen at startup, the init screen is purely cosmetical
show_init=False
#* Enable check for new version from github.com/aristocratos/bpytop at start.
update_check=True
#* Set loglevel for "~/.config/bpytop/error.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level=DEBUG
Command line options:
usage: bpytop.py [-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 in config
LICENSE
Top Related Projects
A TUI system monitor written in Rust
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
htop - an interactive process viewer
Yet another cross-platform graphical process/system monitor.
Terminal-based CPU stress and monitoring utility
System monitoring dashboard for terminal
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot