2020-08-24 15:02:46 +00:00
# ![bpytop](https://github.com/aristocratos/bpytop/raw/master/Imgs/logo.png)
2020-07-01 17:42:22 +00:00
2020-10-01 09:13:45 +00:00
< a href = "https://repology.org/project/bpytop/versions" >
< img src = "https://repology.org/badge/vertical-allrepos/bpytop.svg" alt = "Packaging status" align = "right" >
< / a >
2020-07-01 17:42:22 +00:00
![Linux ](https://img.shields.io/badge/-Linux-grey?logo=linux )
![OSX ](https://img.shields.io/badge/-OSX-black?logo=apple )
![FreeBSD ](https://img.shields.io/badge/-FreeBSD-red?logo=freebsd )
2020-08-22 19:04:12 +00:00
![Usage ](https://img.shields.io/badge/Usage-System%20resource%20monitor-yellow )
2020-12-28 20:35:36 +00:00
![Python ](https://img.shields.io/badge/Python-v3.7%5E-green?logo=python )
2020-08-03 20:17:13 +00:00
![bpytop_version ](https://img.shields.io/github/v/tag/aristocratos/bpytop?label=version )
2020-08-22 19:04:12 +00:00
[![pypi_version ](https://img.shields.io/pypi/v/bpytop?label=pypi )](https://pypi.org/project/bpytop)
2021-01-02 21:46:51 +00:00
[![Test Status ](https://img.shields.io/github/workflow/status/aristocratos/bpytop/Testing?label=tests )](https://github.com/aristocratos/bpytop/actions?query=workflow%3Atesting)
2020-07-01 17:42:22 +00:00
[![Donate ](https://img.shields.io/badge/-Donate-yellow?logo=paypal )](https://paypal.me/aristocratos)
[![Sponsor ](https://img.shields.io/badge/-Sponsor-red?logo=github )](https://github.com/sponsors/aristocratos)
[![Coffee ](https://img.shields.io/badge/-Buy%20me%20a%20Coffee-grey?logo=Ko-fi )](https://ko-fi.com/aristocratos)
2020-11-05 16:45:16 +00:00
[![bpytop ](https://img.shields.io/badge/-snapcraft.io-black )](https://snapcraft.io/bpytop)[![bpytop](https://snapcraft.io//bpytop/badge.svg)](https://snapcraft.io/bpytop)
2020-07-01 17:42:22 +00:00
## Index
* [Documents ](#documents )
* [Description ](#description )
* [Features ](#features )
2020-07-01 17:48:58 +00:00
* [Themes ](#themes )
2020-07-01 17:42:22 +00:00
* [Support and funding ](#support-and-funding )
2021-01-04 16:16:02 +00:00
* [Prerequisites ](#prerequisites ) (Read this if you are having issues!)
2020-07-01 17:48:58 +00:00
* [Dependencies ](#dependencies )
2020-07-01 17:42:22 +00:00
* [Screenshots ](#screenshots )
2020-07-01 17:48:58 +00:00
* [Installation ](#installation )
* [Configurability ](#configurability )
* [TODO ](#todo )
2020-07-01 17:42:22 +00:00
* [License ](#license )
## Documents
2020-08-23 21:02:31 +00:00
#### [CHANGELOG.md](https://github.com/aristocratos/bpytop/blob/master/CHANGELOG.md)
2020-07-01 17:42:22 +00:00
2020-08-23 21:02:31 +00:00
#### [CONTRIBUTING.md](https://github.com/aristocratos/bpytop/blob/master/CONTRIBUTING.md)
2020-07-01 17:42:22 +00:00
2020-08-23 21:02:31 +00:00
#### [CODE_OF_CONDUCT.md](https://github.com/aristocratos/bpytop/blob/master/CODE_OF_CONDUCT.md)
2020-07-01 17:42:22 +00:00
## Description
Resource monitor that shows usage and stats for processor, memory, disks, network and processes.
Python port of [bashtop ](https://github.com/aristocratos/bashtop ).
## Features
* Easy to use, with a game inspired menu system.
2020-08-02 18:10:42 +00:00
* Full mouse support, all buttons with a highlighted key is clickable and mouse scroll works in process list and menu boxes.
2020-07-01 17:42:22 +00:00
* Fast and responsive UI with UP, DOWN keys process selection.
* Function for showing detailed stats for selected process.
2020-08-02 18:10:42 +00:00
* Ability to filter processes, multiple filters can be entered.
2020-07-01 17:42:22 +00:00
* 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
2020-08-02 18:10:42 +00:00
Bpytop uses the same theme files as bashtop so any theme made for bashtop will work.
2020-07-01 17:42:22 +00:00
2020-08-23 21:02:31 +00:00
See [themes ](https://github.com/aristocratos/bpytop/tree/master/themes ) folder for available themes.
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
The `make install` command places the default themes in `/usr/local/share/bpytop/themes` .
2020-09-05 20:16:49 +00:00
If installed with `pip3` the themes will be located in a folder called `bpytop-themes` in the python3 site-packages folder.
2020-08-02 18:10:42 +00:00
User created themes should be placed in `$HOME/.config/bpytop/themes` .
2020-07-01 17:42:22 +00:00
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 ](https://github.com/sponsors/aristocratos ) for options.
Or donate through [paypal ](https://paypal.me/aristocratos ) or [ko-fi ](https://ko-fi.com/aristocratos ).
Any support is greatly appreciated!
2020-08-03 16:44:42 +00:00
## Prerequisites
2020-07-01 17:42:22 +00:00
2020-08-03 16:44:42 +00:00
#### Mac Os X
2020-07-01 17:42:22 +00:00
2020-08-03 16:44:42 +00:00
Will not display correctly in the standard terminal!
2020-07-01 17:42:22 +00:00
Recommended alternative [iTerm2 ](https://www.iterm2.com/ )
2020-08-03 16:44:42 +00:00
Will also need to be run as superuser to display stats for processes not owned by user.
2020-07-01 17:42:22 +00:00
2020-12-21 20:37:06 +00:00
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`
2020-08-03 16:44:42 +00:00
#### Linux, Mac Os X and FreeBSD
2020-07-01 17:42:22 +00:00
For correct display, a terminal with support for:
2020-08-03 16:44:42 +00:00
* 24-bit truecolor ([See list of terminals with truecolor support](https://gist.github.com/XVilka/8346728))
2021-01-06 15:25:43 +00:00
* 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.
2020-08-03 16:44:42 +00:00
* Wide characters (Are sometimes problematic in web-based terminals)
2020-07-01 17:42:22 +00:00
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
2020-10-18 13:17:38 +00:00
#### Notice (Text rendering issues)
2020-09-14 17:49:20 +00:00
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.
2020-10-31 11:12:25 +00:00
See [Terminess Powerline ](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Terminus/terminus-ttf-4.40.1 ) for an example of a font that includes the braille symbols.
2020-09-20 13:46:34 +00:00
See comments by @sgleizes [link ](https://github.com/aristocratos/bpytop/issues/100#issuecomment-684036827 ) and @XenHat [link ](https://github.com/aristocratos/bpytop/issues/100#issuecomment-691585587 ) in issue #100 for possible solutions.
2020-09-14 17:49:20 +00:00
2020-09-26 22:03:03 +00:00
If text are misaligned and you are using Konsole or Yakuake, turning off "Bi-Directional text rendering" is a possible fix.
2020-10-18 13:17:38 +00:00
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.
2020-09-14 17:49:20 +00:00
2020-10-18 13:17:38 +00:00
#### Notice (SSH)
2020-07-01 17:42:22 +00:00
2020-08-03 16:46:28 +00:00
Dropbear seems to not be able to set correct locale. So if accessing bpytop over ssh, OpenSSH is recommended.
2020-07-01 17:42:22 +00:00
## Dependencies
2020-12-28 20:35:36 +00:00
**[Python3](https://www.python.org/downloads/)** (v3.7 or later)
2020-07-01 17:42:22 +00:00
**[psutil module](https://github.com/giampaolo/psutil)** (v5.7.0 or later)
## Optionals for additional stats
2020-09-15 00:55:31 +00:00
(Optional OSX) ** [coretemp ](https://github.com/hacker1024/coretemp )** (recommended), or ** [osx-cpu-temp ](https://github.com/lavoiesl/osx-cpu-temp )** (less accurate) needed to show CPU temperatures.
2020-07-01 17:42:22 +00:00
## Screenshots
Main UI showing details for a selected process.
2020-08-23 21:02:31 +00:00
![Screenshot 1 ](https://github.com/aristocratos/bpytop/raw/master/Imgs/main.png )
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
Main UI in mini mode.
2020-08-23 21:02:31 +00:00
![Screenshot 2 ](https://github.com/aristocratos/bpytop/raw/master/Imgs/mini.png )
2020-08-02 18:10:42 +00:00
2020-07-01 17:42:22 +00:00
Main menu.
2020-08-23 21:02:31 +00:00
![Screenshot 3 ](https://github.com/aristocratos/bpytop/raw/master/Imgs/menu.png )
2020-07-01 17:42:22 +00:00
Options menu.
2020-08-23 21:02:31 +00:00
![Screenshot 4 ](https://github.com/aristocratos/bpytop/raw/master/Imgs/options.png )
2020-07-01 17:42:22 +00:00
## Installation
2020-08-22 19:04:12 +00:00
### PyPi (will always have latest version)
2020-08-03 16:39:28 +00:00
2020-08-23 19:15:01 +00:00
> Install or update to latest version
2020-08-22 19:04:12 +00:00
``` bash
2020-08-23 19:15:01 +00:00
pip3 install bpytop --upgrade
2020-08-22 19:04:12 +00:00
```
2020-12-21 20:37:06 +00:00
### Mac OsX
>Install with Homebrew
```bash
brew install bpytop
```
>Optional coretemp (Shows temperatures for cpu cores)
```bash
brew install hacker1024/hacker1024/coretemp
```
>Alternatively install with MacPorts
```bash
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`
2020-08-22 19:16:52 +00:00
### Arch Linux
2020-08-22 19:04:12 +00:00
2020-12-13 00:46:02 +00:00
Available in the Arch Linux [community] repository as `bpytop`
2020-08-22 19:04:12 +00:00
2020-12-13 00:46:02 +00:00
>Installation
```bash
sudo pacman -S bpytop
```
2020-08-22 19:04:12 +00:00
2020-09-05 14:27:21 +00:00
### Debian based
2020-09-01 16:55:27 +00:00
2020-10-01 08:43:37 +00:00
Available in [official Debian repository ](https://tracker.debian.org/pkg/bpytop ) since Debian 11
2020-10-27 23:47:20 +00:00
>Installation
```bash
sudo apt install bpytop
```
2020-09-01 16:55:27 +00:00
Available for debian/ubuntu from [Azlux's repository ](http://packages.azlux.fr/ )
2020-08-22 19:16:52 +00:00
### FreeBSD package
Available in [FreeBSD ports ](https://www.freshports.org/sysutils/bpytop/ )
>Install pre-built package
``` bash
sudo pkg install bpytop
```
### Fedora/CentOS 8 package
[Available ](https://src.fedoraproject.org/rpms/bpytop ) in the Fedora and [EPEL-8 repository ](https://fedoraproject.org/wiki/EPEL ).
>Installation
``` bash
sudo dnf install bpytop
```
2020-09-08 16:22:17 +00:00
### Gentoo / Calculate Linux
2020-09-12 10:34:28 +00:00
Available from [adrien-overlay ](https://github.com/aaaaadrien/adrien-overlay )
2020-09-08 16:22:17 +00:00
>Installation
``` bash
sudo emerge -av sys-process/bpytop
```
2020-11-03 19:12:09 +00:00
### Mageia Cauldron (Mageia 8)
Available in Mageia Cauldron and then Mageia 8 when it is released.
>Installation
``` bash
sudo urpmi bpytop
sudo dnf install bpytop
```
2020-09-15 20:30:33 +00:00
### 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/
2020-08-22 19:04:12 +00:00
### Snap package
2020-09-01 19:10:45 +00:00
by @kz6fittycent
https://github.com/kz6fittycent/bpytop-snap
2020-08-22 19:04:12 +00:00
>Install the package
``` bash
sudo snap install bpytop
```
>Give permissions
``` bash
sudo snap connect bpytop:mount-observe
sudo snap connect bpytop:network-control
sudo snap connect bpytop:hardware-observe
sudo snap connect bpytop:system-observe
sudo snap connect bpytop:process-control
sudo snap connect bpytop:physical-memory-observe
```
2020-09-01 19:10:45 +00:00
The config folder will be located in `~/snap/bpytop/current/.config/bpytop`
2020-08-22 19:04:12 +00:00
## Manual installation
2020-08-03 16:39:28 +00:00
2020-08-02 18:10:42 +00:00
#### Dependencies installation Linux
>Install python3 and git with a package manager of you choice
>Install psutil python module (sudo might be required)
``` bash
python3 -m pip install psutil
```
2020-07-01 17:42:22 +00:00
#### Dependencies installation OSX
>Install homebrew if not already installed
``` bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
```
>Install python3 if not already installed
``` bash
brew install python3 git
```
>Install psutil python module
2020-08-02 18:10:42 +00:00
2020-07-01 17:42:22 +00:00
``` bash
2020-08-02 18:10:42 +00:00
python3 -m pip install psutil
2020-07-01 17:42:22 +00:00
```
2020-09-15 00:55:31 +00:00
>Install optional dependency coretemp (recommended), or osx-cpu-temp (less accurate)
``` bash
brew install hacker1024/hacker1024/coretemp
```
2020-07-01 17:42:22 +00:00
``` bash
brew install osx-cpu-temp
```
#### Dependencies installation FreeBSD
>Install with pkg and pip
``` bash
2020-08-08 14:45:19 +00:00
sudo pkg install git python3 py37-psutil
2020-07-01 17:42:22 +00:00
```
#### Manual installation Linux, OSX and FreeBSD
>Clone and install
``` bash
2020-08-02 18:10:42 +00:00
git clone https://github.com/aristocratos/bpytop.git
cd bpytop
2020-07-01 17:42:22 +00:00
sudo make install
```
>to uninstall it
``` bash
sudo make uninstall
```
## Configurability
All options changeable from within UI.
Config files stored in "$HOME/.config/bpytop" folder
2020-08-03 20:17:13 +00:00
#### bpytop.cfg: (auto generated if not found)
"/etc/bpytop.conf" will be used as default seed for config file creation if it exists.
2020-07-01 17:42:22 +00:00
```bash
2021-01-06 15:25:43 +00:00
#? Config file for bpytop v. 1.0.57
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
#* 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"
2021-01-06 15:25:43 +00:00
color_theme="Default"
2020-07-01 17:42:22 +00:00
2020-08-23 19:15:01 +00:00
#* If the theme set background should be shown, set to False if you want terminal background transparency
2021-01-06 15:25:43 +00:00
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
2020-09-05 14:27:21 +00:00
2021-01-02 21:15:14 +00:00
#* Manually set which boxes to show. Available values are "cpu mem net proc", seperate values with whitespace.
shown_boxes="cpu mem net proc"
2020-08-23 19:15:01 +00:00
2020-08-02 18:10:42 +00:00
#* 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
2020-07-01 17:42:22 +00:00
2020-12-30 13:18:06 +00:00
#* 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
2020-08-02 18:10:42 +00:00
#* 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
2020-07-01 17:42:22 +00:00
#* Show processes as a tree
2020-08-02 18:10:42 +00:00
proc_tree=False
2020-12-30 13:18:06 +00:00
#* Which depth the tree view should auto collapse processes at
tree_depth=3
2020-08-02 18:10:42 +00:00
#* 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.
2020-12-30 13:18:06 +00:00
proc_per_core=False
2020-08-23 19:15:01 +00:00
#* Show process memory as bytes instead of percent
proc_mem_bytes=True
2020-08-02 18:10:42 +00:00
2020-08-23 19:15:01 +00:00
#* Check cpu temperature, needs "osx-cpu-temp" on MacOS X.
2020-08-02 18:10:42 +00:00
check_temp=True
2020-07-01 17:42:22 +00:00
2020-12-30 13:18:06 +00:00
#* 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
2020-08-02 18:10:42 +00:00
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
2020-12-30 13:18:06 +00:00
draw_clock="%H:%M"
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
#* 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
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
#* Custom cpu model name, empty string to disable.
custom_cpu_name=""
2020-07-01 17:42:22 +00:00
2020-12-30 13:18:06 +00:00
#* 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, oterwise defaults to "most include" filter. Example: disks_filter="exclude=/boot, /home/user"
disks_filter="exclude=/boot"
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
#* Show graphs instead of meters for memory values.
mem_graphs=True
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
#* If swap memory should be shown in memory box.
2020-08-23 19:15:01 +00:00
show_swap=True
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk=True
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
#* If mem box should be split to also show disks info.
show_disks=True
2021-01-06 15:25:43 +00:00
#* 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=False
2020-08-23 19:15:01 +00:00
#* 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
2020-09-05 14:42:12 +00:00
#* Sync the scaling for download and upload to whichever currently has the highest scale
2020-12-30 13:18:06 +00:00
net_sync=True
2020-09-05 14:42:12 +00:00
2020-08-23 19:15:01 +00:00
#* If the network graphs color gradient should scale to bandwith usage or auto scale, bandwith usage is based on "net_download" and "net_upload" values
net_color_fixed=False
2021-01-06 15:25:43 +00:00
#* Starts with the Network Interface specified here.
net_iface=""
2020-12-30 13:18:06 +00:00
#* Show battery stats in top right if battery is present
show_battery=True
2020-08-02 18:10:42 +00:00
#* Show init screen at startup, the init screen is purely cosmetical
2020-09-05 14:27:21 +00:00
show_init=False
2020-08-02 18:10:42 +00:00
#* 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.
2020-12-30 13:18:06 +00:00
log_level=DEBUG
2020-07-01 17:42:22 +00:00
```
2020-08-23 19:15:01 +00:00
#### Command line options:
2020-07-01 17:42:22 +00:00
2020-08-02 18:10:42 +00:00
``` text
2021-01-06 15:25:43 +00:00
usage: bpytop.py [-h] [-b BOXES] [-lc] [-v] [--debug]
2021-01-02 21:15:14 +00:00
optional arguments:
-h, --help show this help message and exit
-b BOXES, --boxes BOXES
2021-01-06 15:25:43 +00:00
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
2020-07-01 17:42:22 +00:00
```
## TODO
2020-08-23 19:15:01 +00:00
- [ ] Add gpu temp and usage.
- [ ] Add cpu and mem stats for docker containers. (If feasible)
- [x] Change process list to line scroll instead of page change.
- [ ] Add options for resizing all boxes.
- [x] Add command line argument parsing.
- [ ] Miscellaneous optimizations and code cleanup.
2020-07-01 17:42:22 +00:00
## LICENSE
2020-08-23 21:02:31 +00:00
[Apache License 2.0 ](https://github.com/aristocratos/bpytop/blob/master/LICENSE )