2019-09-17 02:54:39 +00:00
# bottom
2019-09-04 03:27:25 +00:00
2020-03-02 05:08:12 +00:00
[![Build Status ](https://travis-ci.com/ClementTsang/bottom.svg?token=1wvzVgp94E1TZyPNs8JF&branch=master )](https://travis-ci.com/ClementTsang/bottom)
[![crates.io link ](https://img.shields.io/crates/v/bottom.svg )](https://crates.io/crates/bottom)
2020-03-02 05:09:15 +00:00
[![tokei ](https://tokei.rs/b1/github/ClementTsang/bottom?category=code )](https://github.com/ClementTsang/bottom)
2020-03-20 15:09:55 +00:00
[![All Contributors ](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square )](#contributors-)
2019-09-15 02:29:40 +00:00
2020-02-22 05:41:55 +00:00
A cross-platform graphical process/system monitor with a customizable interface and a multitude of features. Supports Linux, macOS, and Windows. Inspired by both [gtop ](https://github.com/aksakalli/gtop ) and [gotop ](https://github.com/cjbassi/gotop ).
2019-09-04 03:27:25 +00:00
2020-04-03 01:23:11 +00:00
![Quick demo recording showing off searching, maximizing, and process killing. ](assets/summary_and_search.gif ) _Theme based on [gruvbox ](https://github.com/morhetz/gruvbox ) (see [sample config ](./sample_configs/demo_config.toml ))._ Recorded on version 0.2.0.
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
This documentation is relevant to version 0.3.0. Please refer to [release branch ](https://github.com/ClementTsang/bottom/tree/release/README.md ) or [crates.io ](https://crates.io/crates/bottom ) for the most up-to-date _release_ version.
## Table of Contents
- [Installation ](#installation )
- [Manual ](#manual )
- [Cargo ](#cargo )
- [AUR ](#aur )
- [Debian (and Debian-based) ](#debian )
- [Homebrew ](#homebrew )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Scoop ](#scoop )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Chocolatey ](#chocolatey )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Usage ](#usage )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Flags ](#flags )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Options ](#options )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Keybindings ](#keybindings )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [General ](#general )
- [CPU bindings ](#cpu-bindings )
- [Process bindings ](#process-bindings )
- [Process search bindings ](#process-search-bindings )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Features ](#features )
2020-02-20 03:24:05 +00:00
2020-04-03 01:23:11 +00:00
- [Process filtering ](#process-filtering )
2020-02-12 02:16:43 +00:00
2020-04-03 01:23:11 +00:00
- [Zoom ](#zoom )
2020-02-12 02:16:43 +00:00
2020-04-03 01:23:11 +00:00
- [Maximizing ](#maximizing )
2020-03-10 05:26:30 +00:00
2020-04-03 01:23:11 +00:00
- [Config files ](#config-files )
2020-03-05 04:13:00 +00:00
2020-04-03 01:23:11 +00:00
- [Config flags ](#config-flags )
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
- [Theming ](#theming )
2020-02-21 04:33:23 +00:00
2020-04-03 01:23:11 +00:00
- [Layout ](#layout )
- [Compatibility ](#compatibility )
- [Contributors ](#contributors )
- [Thanks ](#thanks )
2020-02-20 03:24:05 +00:00
2019-09-09 04:09:58 +00:00
## Installation
2019-09-05 22:28:54 +00:00
2020-04-03 01:23:11 +00:00
Note that binaries are built on the stable version of Rust, and I mainly test and release for 64-bit.
2020-02-23 04:49:45 +00:00
2020-04-03 01:23:11 +00:00
### Manual
2020-01-19 07:02:44 +00:00
2020-04-03 01:23:11 +00:00
Clone from this repo or from [Releases ](https://github.com/ClementTsang/bottom/releases ), and build with `cargo build --release` .
2020-02-26 04:28:56 +00:00
### Cargo
```bash
cargo install bottom
```
2020-02-22 05:41:55 +00:00
2020-04-03 01:23:11 +00:00
### AUR
2020-02-21 02:24:49 +00:00
```bash
yay bottom
2020-04-03 01:23:11 +00:00
# If you instead want the binary version:
2020-02-28 00:01:50 +00:00
yay bottom-bin
2020-02-21 02:24:49 +00:00
```
2020-01-05 00:20:54 +00:00
2020-04-03 01:23:11 +00:00
### Debian
2020-02-22 23:38:18 +00:00
2020-02-26 04:28:56 +00:00
A `.deb` file is provided on each [release ](https://github.com/ClementTsang/bottom/releases/latest ):
2020-02-22 23:38:18 +00:00
```bash
2020-02-25 17:28:48 +00:00
curl -LO https://github.com/ClementTsang/bottom/releases/download/0.2.2/bottom_0.2.2_amd64.deb
sudo dpkg -i bottom_0.2.2_amd64.deb
2020-02-22 23:38:18 +00:00
```
2020-04-03 01:23:11 +00:00
### Homebrew
2020-02-22 20:00:17 +00:00
```bash
2020-04-03 01:23:11 +00:00
brew tap clementtsang/bottom
brew install bottom
# If you need to be more specific, use:
brew install clementtsang/bottom/bottom
2020-02-22 20:00:17 +00:00
```
2019-09-09 04:09:58 +00:00
2020-04-03 01:23:11 +00:00
### Scoop
2020-04-03 00:52:57 +00:00
```bash
scoop install bottom
```
2020-04-03 01:23:11 +00:00
### Chocolatey
2020-02-21 02:24:49 +00:00
```bash
2020-04-03 01:23:11 +00:00
choco install bottom
# Version number may be required for newer releases:
choco install bottom --version=0.2.2
2020-02-21 02:24:49 +00:00
```
2019-09-08 05:28:03 +00:00
2020-01-03 01:31:58 +00:00
## Usage
2019-10-10 22:05:26 +00:00
2020-01-10 04:36:24 +00:00
Run using `btm` .
2020-04-03 01:23:11 +00:00
### Flags
2019-09-17 02:39:57 +00:00
2020-04-03 01:23:11 +00:00
```
-h, --help Prints help information, including flags and options
-a, --avg_cpu Shows the average CPU usage in addition to per-core
-m, --dot-marker Uses a dot marker instead of the default braille marker
-c, --celsius Displays the temperature type in Celsius [default]
-f, --fahrenheit Displays the temperature type in Fahrenheit
-k, --kelvin Displays the temperature type in Kelvin
-l, --left_legend Displays the CPU legend to the left rather than the right
-u, --current_usage Sets process CPU usage to be based on current total CPU usage
-g, --group Groups together processes with the same name by default
-S, --case_sensitive Search defaults to matching cases
-W, --whole Search defaults to searching for the whole word
-R, --regex Search defaults to using regex
-s, --show_disabled_data Shows disabled CPU entries in the CPU legend
-b, --basic Enables basic mode, removing charts and condensing data
```
2020-03-03 05:05:49 +00:00
2020-04-03 01:23:11 +00:00
### Options
2020-03-09 01:56:30 +00:00
2020-04-03 01:23:11 +00:00
```
-r, --rate < MS > Set the refresh rate in milliseconds [default: 1000]
-C, --config < PATH > Use the specified config file; if it does not exist it is automatically created
-t, --default_time_value < MS > Sets the default time interval for charts in milliseconds [default: 60000]
-d, --time_delta < MS > Sets the default amount each zoom in/out action changes by in milliseconds [default: 15000]
```
2020-03-09 01:56:30 +00:00
2019-12-22 22:37:07 +00:00
### Keybindings
2019-09-17 01:45:48 +00:00
#### General
2020-04-03 01:23:11 +00:00
| | |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `q` , `Ctrl-c` | Quit bottom |
| `Esc` | Close dialog windows, search, widgets, or exit maximized mode |
| `Ctrl-r` | Reset display and any collected data |
| `f` | Freeze/unfreeze updating with new data |
| `Ctrl` -arrow key< br > `Shift`-arrow key< br > `H/J/K/L` | Move to a different widget (on macOS some keybindings may conflict) |
| `Up` ,`k` | Scroll up in tables |
| `Down` , `j` | Scroll down in tables |
| `?` | Open help menu |
| `gg` , `Home` | Jump to the first entry of a table |
| `Shift-g` , `End` | Jump to the last entry of a table |
| `Enter` | Maximize widget |
| `+` | Zoom in on a chart |
| `-` | Zoom out on a chart |
| `=` | Reset zoom |
| Mouse scroll | Table: Scrolls through the list Chart: Zooms in or out by scrolling up or down respectively |
#### CPU bindings
| | |
| ------- | -------------------------------------------- |
| `/` | Open filtering for showing certain CPU cores |
| `Space` | Toggle enabled/disabled cores |
| `Esc` | Exit filtering mode |
#### Processes bindings
| | |
| ------------- | ---------------------------------------------------------- |
| `dd` | Kill the selected process |
| `c` | Sort by CPU usage, press again to reverse sorting order |
| `m` | Sort by memory usage, press again to reverse sorting order |
| `p` | Sort by PID name, press again to reverse sorting order |
| `n` | Sort by process name, press again to reverse sorting order |
| `Tab` | Group/un-group processes with the same name |
| `Ctrl-f` , `/` | Open process search widget |
#### Process search bindings
| | |
| ------------ | -------------------------------------------- |
| `Tab` | Toggle between searching by PID or name |
| `Esc` | Close the search widget (retains the filter) |
| `Ctrl-a` | Skip to the start of the search query |
| `Ctrl-e` | Skip to the end of the search query |
| `Alt-c` /`F1` | Toggle matching case |
| `Alt-w` /`F2` | Toggle matching the entire word |
| `Alt-r` /`F3` | Toggle using regex |
2020-01-03 05:00:05 +00:00
2020-04-03 01:23:11 +00:00
## Features
2020-01-03 05:00:05 +00:00
2020-04-03 01:23:11 +00:00
As yet _another_ process/system visualization and management application, bottom supports the typical features:
2020-02-20 03:21:18 +00:00
2020-04-03 01:23:11 +00:00
- CPU, memory, and network usage visualization
2020-03-10 05:51:11 +00:00
2020-04-03 01:23:11 +00:00
- Display information about disk capacity and I/O per second
2020-03-10 05:51:11 +00:00
2020-04-03 01:23:11 +00:00
- Display temperatures from sensors
2020-03-10 05:51:11 +00:00
2020-04-03 01:23:11 +00:00
- Process management (process killing _is_ all you need, right?)
2020-02-17 01:21:42 +00:00
2020-04-03 01:23:11 +00:00
It also aims to be:
2020-02-17 01:21:42 +00:00
2020-04-03 01:23:11 +00:00
- Lightweight
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
- Cross-platform - supports Linux, Windows, and macOS
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
In addition to these things, bottom also currently has the following features:
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
### Process filtering
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
On any process widget, hit `/` to bring up a search bar. If your layout has
multiple process widgets, note this search is independent of other widgets. Searching
supports regex, matching case, and matching entire words. Use `Tab` to toggle between
searching by PID and by process name.
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
### Zoom
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
Using the +/- keys or the scroll wheel will move adjust the current time intervals of the currently selected widget. Widgets
can hold different time intervals independently.
2020-01-09 03:54:14 +00:00
2020-04-03 01:23:11 +00:00
### Maximizing
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
Only care about the CPU widget right now? Then go to the widget and hit `Enter` to make it take
up the entire drawing area.
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
### Config files
2020-02-03 04:20:53 +00:00
2020-04-03 01:23:11 +00:00
bottom supports reading from a config file to customize its behaviour and look. By default, bottom will look at `~/.config/bottom/bottom.toml` or `C:\Users\<USER>\AppData\Roaming\bottom\bottom.toml` on Unix and Windows systems respectively.
2020-02-03 04:20:53 +00:00
2020-04-03 01:23:11 +00:00
Note that if a config file does not exist at either the default location or the passed in location via `-C` or `--config` , one is automatically created with no settings applied.
2020-01-12 23:45:11 +00:00
2020-04-03 01:23:11 +00:00
#### Config flags
2020-01-18 00:59:01 +00:00
2020-04-03 01:23:11 +00:00
The following options can be set under `[flags]` to achieve the same effect as passing in a flag on runtime. Note that if a flag is given, it will override the config file.
2020-01-18 00:59:01 +00:00
2020-04-03 01:23:11 +00:00
These are the following supported flag config values:
| Field | Type |
|------------------------|---------------------------------------------------------------------------------------|
| `avg_cpu` | Boolean |
| `dot_marker` | Boolean |
| `left_legend` | Boolean |
| `current_usage` | Boolean |
| `group_processes` | Boolean |
| `case_sensitive` | Boolean |
| `whole_word` | Boolean |
| `regex` | Boolean |
| `show_disabled_data` | Boolean |
| `basic` | Boolean |
| `rate` | Unsigned Int (represents milliseconds) |
| `default_time_value` | Unsigned Int (represents milliseconds) |
| `time_delta` | Unsigned Int (represents milliseconds) |
| `temperature_type` | String (one of ["k", "f", "c", "kelvin", "fahrenheit", "celsius"]) |
| `default_widget_type` | String (one of ["cpu", "proc", "net", "temp", "mem", "disk"], same as layout options) |
| `default_widget_count` | Unsigned Int (represents which `default_widget_type` ) |
2020-01-22 00:28:39 +00:00
2020-04-03 01:23:11 +00:00
#### Theming
2020-02-17 05:20:31 +00:00
2020-04-03 01:23:11 +00:00
The config file can be used to set custom colours for parts of the application under the `[colors]` object. The following labels are customizable with strings that are hex colours, RGB colours, or specific named colours.
2020-02-17 05:20:31 +00:00
2020-04-03 01:23:11 +00:00
Supported named colours are one of the following strings: `Reset, Black, Red, Green, Yellow, Blue, Magenta, Cyan, Gray, DarkGray, LightRed, LightGreen, LightYellow, LightBlue, LightMagenta, LightCyan, White` .
2020-02-17 05:20:31 +00:00
2020-04-03 01:23:11 +00:00
| Labels | Details | Example |
| ------------------------------- | ---------------------------------------------- | ------------------------------------------------------- |
| Table header colours | Colour of table headers | `table_header_color="255, 255, 255"` |
| CPU colour per core | Colour of each core. Read in order. | `cpu_core_colors=["#ffffff", "white", "255, 255, 255"]` |
| Average CPU colour | The average CPU color | `avg_cpu_color="White"` |
| RAM | The colour RAM will use | `ram_color="#ffffff"` |
| SWAP | The colour SWAP will use | `swap_color="#ffffff"` |
| RX | The colour rx will use | `rx_color="#ffffff"` |
| TX | The colour tx will use | `tx_color="#ffffff"` |
| Widget title colour | The colour of the label each widget has | `widget_title_color="#ffffff"` |
| Border colour | The colour of the border of unselected widgets | `border_color="#ffffff"` |
| Selected border colour | The colour of the border of selected widgets | `highlighted_border_color="#ffffff"` |
| Text colour | The colour of most text | `text_color="#ffffff"` |
| Graph colour | The colour of the lines and text of the graph | `graph_color="#ffffff"` |
| Cursor colour | The cursor's colour | `cursor_color="#ffffff"` |
| Selected text colour | The colour of text that is selected | `scroll_entry_text_color="#ffffff"` |
| Selected text background colour | The background colour of text that is selected | `scroll_entry_bg_color="#ffffff"` |
2020-02-17 05:20:31 +00:00
2020-04-03 01:23:11 +00:00
#### Layout
2020-01-12 19:25:47 +00:00
2020-04-03 01:23:11 +00:00
bottom supports customizable layouts via the config file. Currently, layouts are controlled by using TOML objects and arrays.
2019-09-17 01:45:48 +00:00
2020-04-03 01:23:11 +00:00
For example, given the sample layout:
2019-12-31 02:05:39 +00:00
2020-04-03 01:23:11 +00:00
```toml
[[row]]
[[row.child]]
type="cpu"
[[row]]
ratio=2
[[row.child]]
ratio=4
type="mem"
[[row.child]]
ratio=3
[[row.child.child]]
type="temp"
[[row.child.child]]
type="disk"
```
2020-03-09 04:52:29 +00:00
2020-04-03 01:23:11 +00:00
This would give a layout that has two rows, with a 1:2 ratio. The first row has only the CPU widget.
The second row is split into two columns with a 4:3 ratio. The first column contains the memory widget.
The second column is split into two rows with a 1:1 ratio. The first is the temperature widget, the second is the disk widget.
This is what the layout would look like when run:
![Sample layout. ](assets/sample_layout.png )
Each `[[row]]` represents a _row_ in the layout. A row can have any number of `child` values. Each `[[row.child]]`
represents either a _column or a widget_ . A column can have any number of `child` values as well. Each `[[row.child.child]]`
represents a _widget_ . A widget is represented by having a `type` field set to a string.
The following `type` values are supported:
| | |
|---------|--------------------------|
| `cpu` | CPU chart and legend |
| `mem` | Memory chart |
| `proc` | Process table and search |
| `net` | Network chart and legend |
| `temp` | Temperature table |
| `disk` | Disk table |
| `empty` | An empty space |
Each component of the layout accepts a `ratio` value. If this is not set, it defaults to 1.
For an example, look at the [default config ](./sample_configs/default_config.toml ), which contains the default layout.
...and yes, you can have duplicate widgets. This means you could do something like:
```toml
[[row]]
ratio=1
[[row.child]]
type="cpu"
[[row.child]]
type="cpu"
[[row.child]]
type="cpu"
[[row]]
ratio=1
[[row.child]]
type="cpu"
[[row.child]]
type="empty"
[[row.child]]
type="cpu"
[[row]]
ratio=1
[[row.child]]
type="cpu"
[[row.child]]
type="cpu"
[[row.child]]
type="cpu"
```
2020-03-06 04:54:39 +00:00
2020-04-03 01:23:11 +00:00
and get the following CPU donut:
![CPU donut ](./assets/cpu_layout.png )
2020-03-06 04:54:39 +00:00
2020-04-03 01:23:11 +00:00
### Compatibility
2020-02-26 13:09:03 +00:00
2020-04-03 01:23:11 +00:00
| OS | CPU | Memory | Disks | Temperature | Processes/Search | Networks |
| ------- | --- | ------ | ----- | ----------- | ---------------- | -------- |
| Linux | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Windows | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ |
| macOS | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
2020-02-26 13:09:03 +00:00
2020-04-03 01:23:11 +00:00
## Contributors
2020-02-26 13:09:03 +00:00
2020-04-03 01:23:11 +00:00
Contribution is always welcome - just submit a PR! Note that I currently develop and test on stable Rust.
2020-03-06 04:54:39 +00:00
2020-04-03 01:23:11 +00:00
Thanks to all contributors ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
2020-03-06 04:54:39 +00:00
2020-03-20 15:09:55 +00:00
<!-- ALL - CONTRIBUTORS - LIST:START - Do not remove or modify this section -->
<!-- prettier - ignore - start -->
<!-- markdownlint - disable -->
< table >
< tr >
2020-04-03 00:54:18 +00:00
< td align = "center" > < a href = "http://shilangyu.github.io" > < img src = "https://avatars3.githubusercontent.com/u/29288116?v=4" width = "100px;" alt = "" / > < br / > < sub > < b > Marcin Wojnarowski< / b > < / sub > < / a > < br / > < a href = "https://github.com/ClementTsang/bottom/commits?author=shilangyu" title = "Code" > 💻< / a > < a href = "#platform-shilangyu" title = "Packaging/porting to new platform" > 📦< / a > < / td >
2020-03-20 15:09:55 +00:00
< td align = "center" > < a href = "http://neosmart.net/" > < img src = "https://avatars3.githubusercontent.com/u/606923?v=4" width = "100px;" alt = "" / > < br / > < sub > < b > Mahmoud Al-Qudsi< / b > < / sub > < / a > < br / > < a href = "https://github.com/ClementTsang/bottom/commits?author=mqudsi" title = "Code" > 💻< / a > < / td >
< / tr >
< / table >
<!-- markdownlint - enable -->
<!-- prettier - ignore - end -->
2020-04-03 01:23:11 +00:00
2020-03-20 15:09:55 +00:00
<!-- ALL - CONTRIBUTORS - LIST:END -->
2020-04-03 01:23:11 +00:00
## Thanks
- This project is very much inspired by both
[gotop ](https://github.com/cjbassi/gotop ) and [gtop ](https://github.com/aksakalli/gtop ).
- Basic mode is heavily inspired by [htop's ](https://hisham.hm/htop/ ) design.
- This application was written with many, _many_ libraries, and built on the
work of many talented people. This application would be impossible
without their work.