btop/README.md

208 lines
7.2 KiB
Markdown
Raw Normal View History

2021-05-06 20:32:03 +02:00
# ![btop++](Img/logo.png)
![Linux](https://img.shields.io/badge/-Linux-grey?logo=linux)
![Usage](https://img.shields.io/badge/Usage-System%20resource%20monitor-yellow)
![c++20](https://img.shields.io/badge/cpp-c%2B%2B20-green)
![btop_version](https://img.shields.io/github/v/tag/aristocratos/btop?label=version)
[![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
* [News](#news)
* [Documents](#documents)
* [Description](#description)
* [Features](#features)
* [Themes](#themes)
* [Support and funding](#support-and-funding)
* [Prerequisites](#prerequisites) (Read this if you are having issues!)
* [Screenshots](#screenshots)
* [Installation](#installation)
* [Configurability](#configurability)
* [License](#license)
## News
### Under development
##### 5 May 2021
2021-05-30 21:46:10 +02:00
This project is gonna take some time until it has complete feature parity with bpytop, since all system information gathering will have to be written from scratch without any external libraries.
2021-05-06 20:32:03 +02:00
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](https://github.com/giampaolo/psutil) are for python, feel free to open up a new thread in Discussions, it could help speed up the development a lot.
## 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.
C++ version and continuation of [bashtop](https://github.com/aristocratos/bashtop) and [bpytop](https://github.com/aristocratos/bpytop).
## Features (at release)
* 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
Btop++ uses the same theme files as bpytop and bashtop (some color values missing in bashtop themes) .
See [themes](https://github.com/aristocratos/btop/tree/master/themes) folder for available themes.
The `make install` command places the default themes in `[$PREFIX or /usr/local]/share/btop/themes`.
2021-05-30 21:46:10 +02:00
User created themes should be placed in `$XDG_CONFIG_HOME/btop/themes` or `$HOME/.config/btop/themes`.
2021-05-06 20:32:03 +02: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!
## Prerequisites
For best experience, a terminal with support for:
2021-05-06 20:32:03 +02:00
* 24-bit truecolor ([See list of terminals with truecolor support](https://gist.github.com/XVilka/8346728))
* 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" arguments.
* 16 color TTY mode will be activated if a real tty device is detected. Can be forced with "-t/--tty_on" arguments.
2021-05-06 20:32:03 +02:00
* 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 (Not needed in TTY mode or with graphs set to type: block or tty.)
2021-05-06 20:32:03 +02:00
* 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](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.
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.
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 btop, but most likely a fontconfig or terminal problem where the braille characters making up the graphs aren't rendered correctly.
2021-05-06 20:32:03 +02:00
Look to the creators of the terminal emulator you use to fix these issues if the previous mentioned fixes don't work for you.
## Screenshots
Main UI showing details for a selected process.
![Screenshot 1]()
Main UI in mini mode.
![Screenshot 2]()
Main menu.
![Screenshot 3]()
Options menu.
![Screenshot 4]()
2021-08-28 22:13:03 +02:00
## Manual compilation and installation
2021-05-06 20:32:03 +02:00
2021-08-28 22:13:03 +02:00
**Needs GCC 10 or higher, (GCC 11 or above strongly recommended for better CPU efficiency in the compiled binary).**
2021-05-06 20:32:03 +02:00
2021-08-28 22:13:03 +02:00
**The makefile also needs GNU coreutils and sed (should already be installed on any modern distribution).**
2021-08-28 22:13:03 +02:00
> **Install dependencies (example for Ubuntu 21.04 Hirsute)**
``` bash
sudo apt install coreutils sed git build-essential gcc-11 g++-11
2021-08-28 22:13:03 +02:00
# use gcc-10 g++-10 if gcc-11 isn't available
```
2021-05-30 21:46:10 +02:00
2021-08-28 22:13:03 +02:00
> **Clone and compile**
**NOTICE! Manually set PLATFORM and ARCH if not compiling for host system**
2021-05-06 20:32:03 +02:00
``` bash
git clone https://github.com/aristocratos/btop.git
cd btop
make
```
2021-08-28 22:13:03 +02:00
> **Install**
2021-05-06 20:32:03 +02:00
``` bash
2021-07-21 03:30:41 +02:00
# use "make install PREFIX=/target/dir" to set target, default: /usr/local
# only use "sudo" when installing to a NON user owned directory
sudo make install
2021-05-06 20:32:03 +02:00
```
2021-08-28 22:13:03 +02:00
> **Set suid bit to make btop always run as root (or other user)**
No need for `sudo` to enable signal sending to any process and to prevent /proc read permissions problems on some systems.
``` bash
# run after make install and use same PREFIX if any was used at install
# set SU_USER and SU_GROUP to select user and group, default is root:root
sudo make setuid
```
2021-08-28 22:13:03 +02:00
> **Uninstall**
2021-05-06 20:32:03 +02:00
``` bash
sudo make uninstall
```
2021-08-28 22:13:03 +02:00
> **Remove any object files from source dir**
2021-05-06 20:32:03 +02:00
```bash
2021-05-30 21:46:10 +02:00
make clean
2021-05-06 20:32:03 +02:00
```
2021-08-28 22:13:03 +02:00
> **Remove all object files, binaries and created directories in source dir**
```bash
make distclean
```
2021-05-06 20:32:03 +02:00
## Configurability
All options changeable from within UI.
2021-05-30 21:46:10 +02:00
Config and log files stored in `$XDG_CONFIG_HOME/btop` or `$HOME/.config/btop` folder
2021-05-06 20:32:03 +02:00
#### btop.cfg: (auto generated if not found)
```bash
#? Config file for btop v. 0.0.1
```
#### Command line options:
```text
usage: btop [-v]
```
## LICENSE
[Apache License 2.0](LICENSE)