Lightweight system monitor with beautiful CLI, sparkline charts, and smart alerting. Zero dependencies.
curl -O https://raw.githubusercontent.com/Mehdi-dev-sudo/system-monitor/main/system_monitor.sh
chmod +x system_monitor.sh
./system_monitor.sh════════════════════════════════════════════════════════════
System Monitor v4.0.0
════════════════════════════════════════════════════════════
CPU Usage: [████████████░░░░░░░░░░░░░] 45% ✓ NORMAL ▂▃▄▅▆▇█▇▆▅
Memory Usage: [██████████████████░░░░░░░] 72% ⚠ WARNING ▅▆▇█▇▆▅▄▃▂▁
Disk Usage: [███████████░░░░░░░░░░░░░░] 44% ✓ NORMAL ▂▂▃▃▄▄▅▅▆▆
Swap Usage: [██░░░░░░░░░░░░░░░░░░░░░░░] 8% ✓ NORMAL
Temperature: [████████████░░░░░░░░░░░░░] 62°C ✓ NORMAL
────────────────────────────────────────────────────────────
Network: eth0 | RX: 1234 MB | TX: 567 MB
Disk I/O: Read: 45 GB | Written: 23 GB
────────────────────────────────────────────────────────────
Top Processes: root 12.3% (node) | www-data 5.2% (nginx)
────────────────────────────────────────────────────────────
Watchlist: ✓ nginx (PID: 1234) ⛔ redis (not running)
| Feature | Description |
|---|---|
| 📊 CPU, Memory, Disk, Swap | Color-coded progress bars |
| 📈 Sparkline Charts | ASCII trend graphs |
| 🌡️ Temperature Sensors | Linux thermal zones / sensors / macOS |
| 🌐 Network & Disk I/O | Bandwidth and throughput monitoring |
| 👁️ Process Watchlist | Monitor specific services |
| 🎨 5 Color Themes | default, mono, solarized, dracula, nord |
| 📋 JSON/CSV Export | For scripting and automation |
| 🔔 Smart Alerts + Sound | Auto-log + beep on threshold breach |
| 📦 Shell Completions | Bash, Zsh, Fish |
| 🔧 systemd Service | Run as daemon |
./system_monitor.sh # Interactive menu
./system_monitor.sh --once # One-shot display
./system_monitor.sh --once --json # JSON output
./system_monitor.sh --once --csv # CSV output
./system_monitor.sh --dashboard # Fixed layout, auto-refresh
./system_monitor.sh --theme dracula # Color themeRun ./system_monitor.sh --help for all options.
Edit ~/.config/system-monitor/config or use menu option 5.
CPU_THRESHOLD=80 # CPU alert threshold
MEM_THRESHOLD=85 # Memory alert threshold
DISK_THRESHOLD=90 # Disk alert threshold
SWAP_THRESHOLD=80 # Swap alert threshold
TEMP_THRESHOLD=80 # Temperature alert (°C)
CHECK_INTERVAL=5 # Refresh interval (seconds)
ENABLE_ALERTS=true # Log threshold breaches
ENABLE_SOUND=false # Beep on alert
THEME=default # Color theme
WATCH_PROCS= # Process watchlist (comma-separated)
SPARKLINE_ENABLED=true # Show trend charts# System-wide
sudo install -m 755 system_monitor.sh /usr/local/bin/sysmon
# Shell completions (Bash)
source completions/system_monitor.bash
# systemd daemon (Linux)
sudo cp systemd/system-monitor.service /etc/systemd/system/
sudo systemctl enable --now system-monitor- Bash 4.0+
- Linux or macOS
- Standard Unix tools (awk, grep, df, ps)
See CONTRIBUTING.md. Run shellcheck system_monitor.sh before PRs.
MIT — see LICENSE
Mehdi · @Mehdi-dev-sudo · 📧 mehdi@code-watch.dev