CPU-Grid is an ultra-lightweight, real-time, terminal-based system monitoring tool written in Rust. It provides a clean, color-coded overview of your system's performance, including CPU frequencies, hardware temperatures, memory utilization, Zswap metrics, network throughput, storage telemetry, and user activity.
- Architecture: Full support for x86, ARM (incl. Apple Silicon), RISC-V, and IBM processor architectures via standard Linux kernel sysfs interfaces.
- OS Enforcement: Strictly targets Linux at compile time (
#![cfg(target_os = "linux")]).
- Real-time Monitoring: Tracks per-core CPU frequency, RAM/Swap usage, hardware thermals, network speeds, storage I/O, and user idle time.
- Preferred Cores & Hardware Cache (New in v4.1.0): Automatically discovers your top-performing physical cores via ACPI CPPC endpoints (or legacy max frequencies) and highlights them dynamically based on their performance tier. Discovers and displays L1, L2, and L3 cache pools directly in the processor banner.
- Internet Gateway Tracking (New in v4.1.0): Scans routing tables to identify active default internet gateways. Interfaces are highlighted and ranked to instantly show your primary connection and failover priorities.
- Advanced Storage Topology Engine: Pierces the Linux Page Cache illusion to track exact physical hardware throughput. Natively discovers and aggregates multi-device arrays across BTRFS, ZFS, MD RAID, LVM, BCacheFS, F2FS, and XFS. Filesystem types (
btrfs,zfs,ext4, etc.) are now seamlessly aligned within the data grids. - Dynamic Anti-Fragmentation Grid: Ensures the TUI never breaks. Storage arrays with excessively long mount paths automatically detach from the primary 2-column grid and print legibly at the bottom to preserve perfect column alignment.
- Zero-Allocation & SIMD Accelerated: Background telemetry is handled via strict zero-allocation pipelines, FPU-math elimination, and SIMD-backed iterators. Background threads are explicitly squeezed to 512KB memory stacks for a near-invisible system footprint.
- Copy-on-Write (COW) Scaling: Automatically detects BTRFS, ZFS, and BCacheFS filesystems, dynamically lowering the capacity color thresholds (85% vs 95%) to warn users of impending COW fragmentation degradation.
- Advanced Memory & Zswap Insights: Monitors individual swap device utilization, Zswap compression algorithms (
zstd,lz4,lzo,deflate), pool statistics, and compression ratios. - Room Temperature: Integrates with
temper-pollto display ambient room temperature, including dynamic text warnings if room heat reaches critical levels (>=40°C).
CPU-Grid employs strict, read-only, zero-ioctl Virtual File System (VFS) telemetry to monitor disks. No destructive system calls are ever made. Your data, arrays, and parity calculations are 100% physically isolated and safe.
Color shade gradually changes between the ranges defined underneath.
| Metric | Color Scale |
|---|---|
| CPU Freq | Green (0-50%) → Yellow (50-70%) → Orange (70-85%) → Hot Red (85-100%) → Violet (>100% overclock) |
| Preferred Cores | The Best (Gold) / 2nd Best (Deep Sky Blue) / 3rd Best (Magenta). Multiple cores sharing a color usually indicates Hyper-Threading or an exact performance tie. |
| RAM Load | Green (0-50%) → Yellow (50-70%) → Orange (70-85%) → Hot Red (85-95%) → Violet (>=95%) (Used and Available share the same color to indicate total memory pressure) |
| Swap Load | Green (0-50%) → Yellow (50-70%) → Orange (70-80%) → Hot Red (80-90%) → Violet (>=90%) |
| Network Gateways | 1st (Gold) / 2nd (Deep Sky Blue) / 3rd (Magenta) priority default routes. |
| Network Load | Green (Low) → Yellow → Orange → Hot Red (Near Interface Max) → Violet (Exceeds Theoretical) |
| Storage Space | Green (0-75%) → Yellow (75-85%) → Orange (85-90%) → Hot Red (90-95%) → Violet (>=95%) (Note: BTRFS/ZFS/BCacheFS limits scale earlier to account for fragmentation) |
| Storage ↓↑ | Green (Baseline) → Yellow → Orange → Hot Red (Highest Known HW/HR) → Violet (Spiking to New Max) |
| CPU Temp | Green (Cool) → Red (Thermal Throttle Limit) → Violet (Exceeds Limit) (Note: Limit is dynamic, set by your specific CPU hardware) |
| Room Temp | Green (<=24°C) → Yellow (27°C) → Orange (31°C) → LtRed (35°C) → Violet (>=40°C) |
| Zswap Status | Green (Enabled) → Bright Red (Disabled) → Yellow (Unknown Status) → Violet (Not Present) |
| Zswap Algo | Green (zstd) → Yellow (lz4) → Orange (lzo) → Red (deflate) → Violet (Other) |
| Zswap Ratio | Violet (<1:1) → Red (1:1) → Orange (1.5:1) → Yellow (2.5:1) → Green (4:1+) |
| User Activity | Cyan (Active) → Green → Yellow → Orange → Red → Violet (1+ Year Idle) |
- OS: Linux (Target strictly enforced at compile time. Requires access to
/procand/sys/class/hwmon). - Rust/Cargo: Rust Edition 2024 required to build from source.
- Dependencies:
crossterm(v0.29.0),which(v6.0),libc(v0.2). - External (OPTIONAL):
temper-pollmust be installed and in system PATH for ambient room temperature. Optional fallback binaries for user idle tracking:busctl(Wayland/GNOME/KDE) orxprintidle(X11).
Values are in seconds. Boundaries are strictly enforced.
-n, --cpu-stats-interval <secs>: Interval for CPU stats (0.1 - 60s, default 0.5)-r, --room-temp-interval <secs>: Interval for Room Temp (1 - 3600s, default 5.0)-m, --mem-stats-interval <secs>: Interval for Memory stats (0.5 - 60s, default 0.5)-t, --net-interval <secs>: Interval for Network traffic (0.5 - 60s, default 0.5)-d, --disk-interval <secs>: Interval for Storage telemetry (0.5 - 60s, default 1.0)-h, --help: Prints help document-v, --version: Prints version and copyright
- Clone the repository:
git clone [https://github.com/StatusCode404/CPU-Grid.git](https://github.com/StatusCode404/CPU-Grid.git) cd cpu-grid cargo build --release - To run without Zswap monitoring...
./target/release/cpu_grid
- To run with Zswap monitoring requires sudo privileges...
sudo ./target/release/cpu_grid
- If you have optional Temper USB thermometers for room temperature and you have temper-py (https://pypi.org/project/temper-py/) drivers:
- temper-py installed only for $USER and not system-wide:
./target/release/cpu_grid
- temper-py installed only for $USER, not system-wide, but with Zswap monitoring:
sudo -E ./target/release/cpu_grid
- temper-py installed system-wide and with Zswap monitoring:
sudo ./target/release/cpu_grid
- temper-py installed only for $USER and not system-wide:

