Aller au contenu

Commandes bottom

bottom (commande : btm) est un moniteur système graphique multiplateforme écrit en Rust. Il fournit la visualisation du CPU, de la mémoire, du réseau, du disque et des processus dans une interface terminal personnalisable avec des widgets.

Installation

# Using cargo (Rust)
cargo install bottom

# macOS
brew install bottom

# Ubuntu/Debian
curl -sSfL https://github.com/ClementTsang/bottom/releases/latest/download/bottom_amd64.deb \
  -o bottom.deb
sudo dpkg -i bottom.deb

# Arch Linux
sudo pacman -S bottom

# Fedora/RHEL
sudo dnf install bottom

# Nix
nix-env -i bottom

# Snap
sudo snap install bottom

# Verify installation
btm --version

Utilisation de base

# Launch bottom
btm

# Launch with specific update rate (milliseconds)
btm -r 500

# Launch with Celsius temperatures (default is Celsius)
btm -C

# Launch with Fahrenheit
btm -f

# Launch with basic mode (simplified view)
btm -b

Raccourcis clavier

q / Ctrl+c    Quit
Esc           Close dialog / Return to normal mode
?             Open help menu
Tab           Move to next widget
Shift+Tab     Move to previous widget
e             Toggle process search
/             Open process search

Vue des processus

dd            Kill selected process (sends SIGTERM)
Enter         Expand/collapse process tree
s             Sort menu
I             Invert current sort
%             Toggle percentage display for CPU/memory
P             Sort by PID
N             Sort by process name
C             Sort by CPU usage
M             Sort by memory usage
T             Toggle tree mode

Vues graphiques

h / Left      Scroll left (zoom in on time axis)
l / Right     Scroll right (zoom out on time axis)
+             Zoom in
-             Zoom out
=             Reset zoom
Up/Down       Navigate items in lists
g             Jump to top of list
G             Jump to bottom of list

Vue des processus

# Process view shows:
# - PID
# - Process name
# - CPU usage (%)
# - Memory usage (% and absolute)
# - Read/Write disk I/O
# - Total CPU time
# - User
# - State

# Process tree mode
# Press 'T' to toggle tree view
# Shows parent-child process relationships

# Search processes
# Press '/' or 'e' to open search
# Type process name to filter
# Supports regex patterns:
#   /nginx.*worker
#   /^python

Widget CPU

# CPU widget shows:
# - Per-core CPU usage graphs over time
# - Average CPU usage line
# - Color-coded per core

# Toggle CPU display
# Tab to CPU widget
# Press 'a' to toggle average CPU line
# Press 'l' to toggle legend

Widget mémoire

# Memory widget shows:
# - RAM usage graph over time
# - Swap usage graph over time
# - Percentage and absolute values

# Memory display format:
# RAM: 8.2 GiB / 16.0 GiB (51.2%)
# SWP: 0.5 GiB / 8.0 GiB (6.3%)

Widget réseau

# Network widget shows:
# - Upload and download rates over time
# - Total data transferred
# - Per-interface breakdown

# Network units toggle
# Press 'b' to toggle between bits and bytes

Widget disque

# Disk widget shows:
# - Mount point
# - Used / Total space
# - Read/Write rates
# - Filesystem type

# Example:
# /      ext4   45.2 GiB / 100.0 GiB (45.2%)  R: 1.2 MB/s  W: 0.5 MB/s
# /home  ext4   120.5 GiB / 500.0 GiB (24.1%)  R: 0.0 MB/s  W: 0.1 MB/s

Widget batterie

# Battery widget (laptops only) shows:
# - Charge percentage
# - Charge/discharge rate
# - Time to full/empty
# - Battery health

# Enable battery widget
btm --battery

Widget température

# Temperature widget shows:
# - CPU core temperatures
# - GPU temperature (if available)
# - Other hardware sensors

# Switch temperature unit
btm -C     # Celsius (default)
btm -f     # Fahrenheit
btm -k     # Kelvin

Filtrage

# In process view, press '/' to search
# Search supports:

# Simple text match
/nginx

# Regex patterns
/^python3

# Case-insensitive search (default)
/NGINX

# Case-sensitive search
/cs:Nginx

# Search by PID
/pid:1234

# Search by user
/user:root

# Combine filters with OR
/nginx|apache

# Press Esc to close search
# Press Ctrl+u to clear search

Fichier de configuration

# Configuration file location:
# Linux:   ~/.config/bottom/bottom.toml
# macOS:   ~/Library/Application Support/bottom/bottom.toml

# Create config directory
mkdir -p ~/.config/bottom
# ~/.config/bottom/bottom.toml

# General settings
[flags]
rate = "1s"                    # Update rate
temperature_type = "celsius"   # celsius, fahrenheit, kelvin
default_widget_type = "proc"   # Default focused widget
show_table_scroll_position = true
enable_gpu = false
enable_cache_memory = true
tree = true                    # Start in tree mode
battery = true                 # Show battery widget

# Process columns
[processes]
columns = ["PID", "Name", "CPU%", "Mem%", "R/s", "W/s", "User"]

# Colors
[colors]
table_header_color = "LightBlue"
cpu_core_colors = ["Red", "Green", "Yellow", "Blue", "Magenta", "Cyan"]
ram_color = "Green"
swap_color = "Yellow"
rx_color = "Green"
tx_color = "Red"
border_color = "Gray"
highlighted_border_color = "LightBlue"
selected_text_color = "Black"
selected_bg_color = "LightBlue"

Dispositions personnalisées

# Custom layout in bottom.toml
# Create a 3-row layout

[[row]]
  ratio = 30
  [[row.child]]
    type = "cpu"

[[row]]
  ratio = 40
  [[row.child]]
    ratio = 50
    type = "mem"
  [[row.child]]
    ratio = 50
    type = "net"

[[row]]
  ratio = 30
  [[row.child]]
    type = "proc"
    default = true  # Start focused on this widget
# Side-by-side layout
[[row]]
  [[row.child]]
    ratio = 60
    [[row.child.child]]
      type = "cpu"
    [[row.child.child]]
      type = "proc"
  [[row.child]]
    ratio = 40
    [[row.child.child]]
      type = "mem"
    [[row.child.child]]
      type = "net"
    [[row.child.child]]
      type = "disk"

Options de ligne de commandes

# Basic mode (no graphs, just tables)
btm -b

# Grouped processes (aggregate by name)
btm -g

# Start with process tree view
btm -T

# Specific default widget
btm --default_widget_type cpu
btm --default_widget_type mem
btm --default_widget_type net
btm --default_widget_type proc

# Dot marker style instead of braille
btm --dot_marker

# Disable mouse support
btm --disable_click

# Use specific config file
btm -C /path/to/config.toml

# Left legend for CPU
btm --cpu_left_legend

# Whole-word search default
btm -W

# Show average CPU in row
btm -a

Conseils

# Alias for quick access
alias top='btm'
alias htop='btm'

# Compare with other monitors
# btm vs htop: btm has network/disk graphs, htop has more process control
# btm vs glances: btm is lighter, glances has more plugins
# btm vs gotop: btm is more configurable, actively maintained

# Remote monitoring via SSH
ssh server 'btm -b'  # Basic mode works best over SSH

# Export process list (use procs or ps for that)
# btm is interactive-only, not designed for scripting