btop - Modern Resource Monitor¶
btop ist ein moderner, plattformübergreifender Ressourcenmonitor, der Nutzung und Statistiken für Prozessor, Speicher, Festplatten, Netzwerk und Prozesse zeigt. Es ist als Ersatz für Htop mit erweiterten Funktionen und einer besseren visuellen Präsentation konzipiert.
Installation¶
Ubuntu/Debian¶
```bash
Install from package manager (Ubuntu 22.04+)¶
sudo apt update sudo apt install btop
Install from snap¶
sudo snap install btop
Build from source¶
sudo apt install build-essential git cmake git clone https://github.com/aristocratos/btop.git cd btop make sudo make install ```_
CentOS/RHEL/Fedora¶
```bash
Fedora¶
sudo dnf install btop
CentOS/RHEL (EPEL required)¶
sudo yum install epel-release sudo yum install btop
Build from source¶
sudo yum groupinstall "Development Tools" sudo yum install git cmake gcc-c++ git clone https://github.com/aristocratos/btop.git cd btop make sudo make install ```_
macOS¶
```bash
Using Homebrew¶
brew install btop
Using MacPorts¶
sudo port install btop
Build from source¶
git clone https://github.com/aristocratos/btop.git cd btop make sudo make install ```_
Arch Linux¶
```bash
Install from official repository¶
sudo pacman -S btop
Install from AUR¶
yay -S btop-git ```_
FreeBSD¶
```bash
Install from ports¶
sudo pkg install btop
Build from ports¶
cd /usr/ports/sysutils/btop sudo make install clean ```_
Basisnutzung¶
Starten von btop¶
```bash
Start btop with default settings¶
btop
Start with specific theme¶
btop --theme Default
Start in minimal mode¶
btop --minimal
Start with specific update interval¶
btop --update 1000
Start with debug logging¶
btop --debug ```_
Kommandozeilenoptionen¶
```bash
Display help¶
btop --help btop -h
Show version information¶
btop --version btop -v
Use specific configuration file¶
btop --config /path/to/config
Start in low-color mode¶
btop --low-color
Start with UTF-8 disabled¶
btop --no-unicode
Start with specific log level¶
btop --loglevel INFO ```_
Schnittstelle Navigation¶
Keyboard Shortcuts¶
```bash
General Navigation¶
q, Ctrl+c, Esc # Quit btop h, F1 # Show help +, - # Add/remove boxes Tab # Toggle between CPU and memory graphs Shift+Tab # Reverse toggle
Process Control¶
k # Kill selected process t # Tree view toggle r # Reverse sorting order c # Toggle command/name display delete # Clear process search / # Start process search n # Next search result N # Previous search result
View Controls¶
m # Toggle memory unit (KB, MB, GB) d # Toggle disk unit display n # Toggle network unit display y # Toggle sync mode z # Toggle zero values a # Toggle auto-scaling graphs g # Toggle GPU stats (if available)
Process Sorting¶
F5, s # Sort by PID F6, S # Sort by program name F7, c # Sort by CPU usage F8, m # Sort by memory usage ```_
Maussteuerungen¶
```bash
Mouse Support (if enabled)¶
Mouse wheel # Scroll process list Left click # Select process Right click # Process context menu Double click # Process details ```_
Konfiguration¶
Konfiguration Dateiort¶
```bash
Linux¶
~/.config/btop/btop.conf
macOS¶
~/Library/Application Support/btop/btop.conf
Create default config¶
btop --create-config ```_
Konfigurationsoptionen¶
```ini
btop.conf example configuration¶
Color theme¶
color_theme = "Default"
Update rate in milliseconds¶
update_ms = 2000
Process sorting¶
proc_sorting = "cpu lazy"
Process tree view¶
proc_tree = false
Process command display¶
proc_colors = true proc_gradient = true proc_per_core = false
CPU settings¶
show_cpu_freq = true cpu_graph_upper = "total" cpu_graph_lower = "total" cpu_invert_lower = true cpu_single_graph = false
Memory settings¶
show_swap = true swap_disk = true show_disks = true only_physical = true use_fstab = true
Network settings¶
net_download = 100 net_upload = 100 net_auto = true net_sync = false net_color_fixed = false
Display settings¶
shown_boxes = "cpu mem net proc" update_check = true background_update = true custom_cpu_name = "" disks_filter = "" mem_graphs = true show_gpu_info = false
Interface settings¶
vim_keys = false rounded_corners = true graph_symbol = "braille" graph_symbol_cpu = "default" graph_symbol_mem = "default" graph_symbol_net = "default" graph_symbol_proc = "default" shown_boxes = "cpu mem net proc" proc_left = false cpu_bottom = false show_uptime = true check_temp = true show_coretemp = true temp_scale = "celsius" show_cpu_freq = true ```_
Themen¶
```bash
Available themes¶
Default Default_light Gruvbox_dark Gruvbox_light Monokai Nord Solarized_dark Solarized_light TTY
Custom theme creation¶
mkdir -p ~/.config/btop/themes cp /usr/share/btop/themes/Default.theme ~/.config/btop/themes/custom.theme
Edit custom.theme with your colors¶
```_
Erweiterte Funktionen¶
Prozessmanagement¶
```bash
Process filtering and searching¶
/ # Start search Esc # Clear search Enter # Confirm search
Process tree view¶
t # Toggle tree view ± # Expand/collapse tree nodes
Process details¶
Enter # Show detailed process info i # Show process I/O stats o # Show process open files l # Show process limits e # Show process environment ```_
Systemüberwachung¶
```bash
CPU monitoring¶
1-9 # Show individual CPU cores 0 # Show all CPU cores combined Ctrl+L # Toggle CPU frequency display
Memory monitoring¶
m # Cycle through memory units Shift+M # Toggle memory graph type
Disk monitoring¶
d # Toggle disk usage display Shift+D # Toggle disk I/O stats
Network monitoring¶
n # Toggle network interface display Shift+N # Toggle network graph type ```_
GPU Überwachung (falls unterstützt)¶
```bash
GPU stats (NVIDIA/AMD)¶
g # Toggle GPU information Shift+G # Cycle GPU display modes
GPU configuration in btop.conf¶
show_gpu_info = true gpu_mirror_graph = true check_gpu = true ```_
Leistungsoptimierung¶
Ressourcennutzungseinstellungen¶
```ini
Reduce update frequency for lower CPU usage¶
update_ms = 5000
Disable expensive features¶
proc_tree = false show_disks = false check_temp = false background_update = false
Simplify display¶
graph_symbol = "block" proc_gradient = false rounded_corners = false ```_
Speicheroptimierung¶
```bash
Run with minimal memory footprint¶
btop --minimal
Disable background updates¶
btop --no-update
Use simple graph symbols¶
Set graph_symbol = "block" in config¶
```_
Integration und Automatisierung¶
Scripting mit btop¶
```bash
!/bin/bash¶
Monitor system and log high CPU processes¶
btop --batch --iter 1|grep -E "CPU|MEM" > system_stats.log
Export configuration¶
btop --print-config > btop_backup.conf
Automated monitoring¶
while true; do btop --batch --iter 1 --delay 60 >> monitoring.log sleep 60 done ```_
Fernüberwachung¶
```bash
SSH with btop¶
ssh user@remote-host btop
Screen/tmux session¶
screen -S monitoring btop tmux new-session -d -s monitoring btop
Watch mode for continuous monitoring¶
watch -n 5 'btop --batch --iter 1' ```_
Analyse der Ergebnisse¶
```bash
Capture btop output¶
btop --batch --iter 10 > system_snapshot.txt
Parse CPU usage¶
btop --batch --iter 1|grep "CPU"|awk '\\{print $2\\}'
Monitor specific process¶
btop --batch|grep "process_name" ```_
Fehlerbehebung¶
Gemeinsame Themen¶
```bash
Permission issues¶
sudo btop # Run with elevated privileges
Terminal compatibility¶
export TERM=xterm-256color # Set terminal type btop --no-unicode # Disable Unicode characters btop --low-color # Use basic colors
Performance issues¶
btop --minimal # Minimal interface btop --update 5000 # Slower updates ```_
Debug Mode¶
```bash
Enable debug logging¶
btop --debug --loglevel DEBUG
Check log files¶
tail -f ~/.config/btop/btop.log
Test configuration¶
btop --config /dev/null # Run without config btop --create-config # Recreate default config ```_
Systemkompatibilität¶
```bash
Check system requirements¶
uname -a # System information echo $TERM # Terminal type locale # Locale settings
Test terminal capabilities¶
tput colors # Color support tput cols; tput lines # Terminal dimensions ```_
Vergleich mit anderen Tools¶
btop vs htop¶
```bash
btop advantages¶
- Modern C++ codebase
- Better visual design
- GPU monitoring support
- More detailed process information
- Cross-platform consistency
- Active development
htop advantages¶
- Lower resource usage
- Wider distribution availability
- More mature and stable
- Simpler configuration ```_
btop vs top¶
```bash
btop advantages¶
- Interactive interface
- Real-time graphs
- Mouse support
- Process tree view
- Better process management
- Modern terminal features
top advantages¶
- Universal availability
- Lower resource usage
- Scriptable output
- Minimal dependencies ```_
Erweiterte Konfigurationsbeispiele¶
Benutzerdefinierte Farbschema¶
```ini
Custom theme file: ~/.config/btop/themes/custom.theme¶
theme[main_bg]="#1e1e2e" theme[main_fg]="#cdd6f4" theme[title]="#f38ba8" theme[hi_fg]="#89b4fa" theme[selected_bg]="#45475a" theme[selected_fg]="#cdd6f4" theme[inactive_fg]="#6c7086" theme[graph_text]="#f9e2af" theme[meter_bg]="#313244" theme[proc_misc]="#f5c2e7" theme[cpu_box]="#89b4fa" theme[mem_box]="#a6e3a1" theme[net_box]="#fab387" theme[proc_box]="#f38ba8" theme[div_line]="#6c7086" theme[temp_start]="#a6e3a1" theme[temp_mid]="#f9e2af" theme[temp_end]="#f38ba8" theme[cpu_start]="#89b4fa" theme[cpu_mid]="#cba6f7" theme[cpu_end]="#f38ba8" theme[free_start]="#a6e3a1" theme[free_mid]="#f9e2af" theme[free_end]="#f38ba8" theme[cached_start]="#89b4fa" theme[cached_mid]="#cba6f7" theme[cached_end]="#f38ba8" theme[available_start]="#a6e3a1" theme[available_mid]="#f9e2af" theme[available_end]="#f38ba8" theme[used_start]="#f38ba8" theme[used_mid]="#fab387" theme[used_end]="#f9e2af" theme[download_start]="#89b4fa" theme[download_mid]="#cba6f7" theme[download_end]="#f38ba8" theme[upload_start]="#a6e3a1" theme[upload_mid]="#f9e2af" theme[upload_end]="#f38ba8" theme[process_start]="#f38ba8" theme[process_mid]="#fab387" theme[process_end]="#f9e2af" ```_
Einrichtung zur Überwachung der Leistung¶
```ini
High-performance monitoring configuration¶
update_ms = 1000 proc_sorting = "cpu lazy" proc_tree = true proc_colors = true proc_gradient = true show_cpu_freq = true cpu_graph_upper = "total" cpu_graph_lower = "total" show_swap = true show_disks = true net_auto = true shown_boxes = "cpu mem net proc" graph_symbol = "braille" rounded_corners = true background_update = true check_temp = true show_uptime = true ```_
Dieses umfassende btop cheatsheet umfasst Installation, Konfiguration, Nutzung und erweiterte Funktionen. btop bietet moderne Systemüberwachungsfunktionen mit einer intuitiven Schnittstelle für Echtzeit-Leistungsanalyse und Prozessmanagement.