Lightweight dashboard to monitor a mini PC: CPU, RAM, temperature sensors, disk usage, and Docker containers. Backend is Axum + Tokio; frontend uses Tailwind CDN.
- JSON endpoint
/api/statusexposes CPU usage, RAM used/total, sensor temps, disk usage, and Docker containers. - Static UI page (
/) shows live data with a 2s polling interval. - Disk and sensor stats via
sysinfo; Docker integration viabollard.
- Rust toolchain (stable, edition 2024)
- Linux/macOS with access to sensors and disks (sysfs/procfs)
- Docker socket at
/var/run/docker.sockif you want container status (optional)
- Install Rust dependencies (e.g., via
rustup). - From repo root, run:
cargo run --releaseThe app listens on http://localhost:9999.
GET /api/status→ JSONFullStatus
Sample response:
{
"cpu_usage": 12.5,
"ram_used_mb": 1024,
"ram_total_mb": 8096,
"sensors": [["CPU", 54.0]],
"disks": [{"name": "sda1", "mount_point": "/", "total_gb": 100, "used_gb": 42}],
"containers": [{"name": "web", "status": "Up 5 minutes", "state": "running"}]
}- Backend and router:
src/main.rs - UI page with Tailwind CDN:
src/index.html - Crate config:
Cargo.toml
- If no Docker socket is present, the container list will be empty but the server still runs.
- Available temperature sensors depend on hardware/kernel; some machines may not expose data.