You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bpytop/README.md

293 lines
8.5 KiB

4 years ago
# ![bpytop](Imgs/logo.png)
4 years ago
![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)
![Usage](https://img.shields.io/badge/Usage-System%20resource%20monitor-blue)
4 years ago
![Python](https://img.shields.io/badge/Python-v3.6%5E-orange?logo=python)
![bpytop_version](https://img.shields.io/github/v/tag/aristocratos/bpytop?label=version)
4 years ago
[![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)
## Index
* [Documents](#documents)
* [Description](#description)
* [Features](#features)
4 years ago
* [Themes](#themes)
4 years ago
* [Support and funding](#support-and-funding)
4 years ago
* [Prerequisites](#prerequisites)
4 years ago
* [Dependencies](#dependencies)
4 years ago
* [Screenshots](#screenshots)
4 years ago
* [Installation](#installation)
* [Configurability](#configurability)
* [TODO](#todo)
4 years ago
* [License](#license)
## Documents
#### [CHANGELOG.md](CHANGELOG.md)
#### [CONTRIBUTING.md](CONTRIBUTING.md)
#### [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
## 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.
* Full mouse support, all buttons with a highlighted key is clickable and mouse scroll works in process list and menu boxes.
4 years ago
* 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.
4 years ago
* 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.
4 years ago
See [themes](themes) folder for available themes.
4 years ago
The `make install` command places the default themes in `/usr/local/share/bpytop/themes`.
User created themes should be placed in `$HOME/.config/bpytop/themes`.
4 years ago
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!
4 years ago
## Prerequisites
4 years ago
4 years ago
#### Mac Os X
4 years ago
4 years ago
Will not display correctly in the standard terminal!
4 years ago
Recommended alternative [iTerm2](https://www.iterm2.com/)
4 years ago
Will also need to be run as superuser to display stats for processes not owned by user.
4 years ago
4 years ago
#### Linux, Mac Os X and FreeBSD
4 years ago
For correct display, a terminal with support for:
4 years ago
* 24-bit truecolor ([See list of terminals with truecolor support](https://gist.github.com/XVilka/8346728))
* Wide characters (Are sometimes problematic in web-based terminals)
4 years ago
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
4 years ago
Dropbear seems to not be able to set correct locale. So if accessing bpytop over ssh, OpenSSH is recommended.
4 years ago
## Dependencies
**[Python3](https://www.python.org/downloads/)** (v3.6 or later)
**[psutil module](https://github.com/giampaolo/psutil)** (v5.7.0 or later)
## Optionals for additional stats
(Optional OSX) **[osx-cpu-temp](https://github.com/lavoiesl/osx-cpu-temp)** Needed to show CPU temperatures.
## Screenshots
Main UI showing details for a selected process.
![Screenshot 1](Imgs/main.png)
Main UI in mini mode.
![Screenshot 2](Imgs/mini.png)
4 years ago
Main menu.
![Screenshot 3](Imgs/menu.png)
4 years ago
Options menu.
![Screenshot 4](Imgs/options.png)
4 years ago
## Installation
PyPi packaging for installation with `pip` will be setup later.
If you want to help speed this up, help with setting up proper testing is welcome!
#### 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
```
4 years ago
#### 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
4 years ago
``` bash
python3 -m pip install psutil
4 years ago
```
>Install optional dependency osx-cpu-temp
``` bash
brew install osx-cpu-temp
```
#### Dependencies installation FreeBSD
>Install with pkg and pip
``` bash
sudo pkg install python3 git
sudo python3 -m ensurepip
sudo python3 -m pip install psutil
4 years ago
```
#### Manual installation Linux, OSX and FreeBSD
>Clone and install
``` bash
git clone https://github.com/aristocratos/bpytop.git
cd bpytop
4 years ago
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
#### bpytop.cfg: (auto generated if not found)
"/etc/bpytop.conf" will be used as default seed for config file creation if it exists.
4 years ago
```bash
#? Config file for bpytop v. 1.0.0
4 years ago
#* 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="Default"
4 years ago
#* 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
4 years ago
#* 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
4 years ago
#* Show processes as a tree
proc_tree=False
#* 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
#* Check cpu temperature, needs "vcgencmd" on Raspberry Pi and "osx-cpu-temp" on MacOS X.
check_temp=True
4 years ago
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
draw_clock="%X"
4 years ago
#* 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
4 years ago
#* Custom cpu model name, empty string to disable.
custom_cpu_name=""
4 years ago
#* Optional filter for shown disks, should be last folder in path of a mountpoint, "root" replaces "/", separate multiple values with comma.
#* Begin line with "exclude=" to change to exclude filter, oterwise defaults to "most include" filter. Example: disks_filter="exclude=boot, home"
disks_filter=""
4 years ago
#* Show graphs instead of meters for memory values.
mem_graphs=True
4 years ago
#* If swap memory should be shown in memory box.
show_swap=False
4 years ago
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk=True
4 years ago
#* If mem box should be split to also show disks info.
show_disks=True
#* Show init screen at startup, the init screen is purely cosmetical
show_init=True
#* Enable check for new version from github.com/aristocratos/bpytop at start.
update_check=True
#* Enable start in mini mode, can be toggled with shift+m at any time.
mini_mode=False
#* 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=WARNING
4 years ago
```
#### Command line options: (not yet implemented)
``` text
USAGE: bpytop [argument]
4 years ago
Arguments:
-m, --mini Start in minimal mode without memory and net boxes
-v, --version Show version info and exit
-h, --help Show this help message and exit
--debug Start with loglevel set to DEBUG overriding value set in config
4 years ago
```
## TODO
- [ ] See TODOs from [Bashtop](https://github.com/aristocratos/bashtop#todo).
## LICENSE
[Apache License 2.0](LICENSE)