sys-monitor

sys-monitor

A fast, minimal terminal system monitor built with Rust.

sys-monitor is a terminal-native system monitor that gives developers instant clarity about their machine's performance. It shows CPU usage, memory consumption, and running processes in a clean, keyboard-driven interface.

It is not a clone of htop, btop, or glances. It is a minimal, focused performance dashboard built for developers who value clarity and performance.

Installation

macOS and Linux

Run the following command in your terminal:

curl -sSL https://raw.githubusercontent.com/youssefsz/sys-monitor-Rust/master/install.sh | bash

The install script detects your operating system and architecture, downloads the correct binary from the latest GitHub release, and installs it to /usr/local/bin.

Windows

Open PowerShell and run:

powershell -Command "irm https://raw.githubusercontent.com/youssefsz/sys-monitor-Rust/master/install.ps1 | iex"

From source

Requires Rust 1.85 or later.

git clone https://github.com/youssefsz/sys-monitor-Rust.git
cd sys-monitor-Rust
cargo build --release
cp target/release/sys-monitor /usr/local/bin/

Self-update

sys-monitor can update itself to the latest version:

sys-monitor upgrade

Usage

Launch sys-monitor with default settings:

sys-monitor

Available options:

Flag Description Default
--refresh-rate Refresh interval in milliseconds 250
--no-per-core Hide per-core CPU bars off

Examples

sys-monitor                      # launch with defaults
sys-monitor --refresh-rate 500   # slower refresh
sys-monitor --no-per-core        # aggregate CPU only

Keybindings

Key Action
q / Esc Quit
j / k Navigate process table up/down
g / G Jump to first / last process
s Cycle sort column (CPU, MEM, PID, Name)
S Reverse sort order
/ Filter processes by name
1 Toggle per-core CPU view
r Force refresh
? Show help overlay

Panels

Header bar

The header bar shows the application name, hostname, macOS version, uptime, and the 1-minute load average. It is always visible at the top of the screen.

CPU panel

Displays an aggregate CPU usage bar with color-coded fill based on load level. Press 1 to toggle the per-core breakdown, which shows individual load bars for each CPU core.

Memory panel

Shows RAM usage and swap usage with percentage bars and human-readable values (e.g., "13.2 / 16.0 GB"). Provides a quick overview of memory pressure.

Process table

Lists the top processes sorted by CPU usage by default. Each row shows the PID, process name, CPU percentage, and memory percentage. The table is scrollable, sortable, and filterable.

Architecture

src/
  main.rs          Entry point, CLI parsing, terminal setup
  app.rs           Application state and input handling
  event.rs         Event polling (keyboard, tick, resize)
  system/          Data collection (CPU, memory, processes, host)
  ui/              Ratatui widgets (header, CPU, memory, processes, help)
  theme/           Color palette and style definitions
  util/            Formatting helpers (bytes, uptime, percentages)

The application uses a single-threaded, polling-based event loop. On each tick, system data is collected via the sysinfo crate, application state is updated, and the UI is rendered using Ratatui. Keyboard events are handled synchronously between render frames.

Tech stack

Component Crate
TUI framework ratatui 0.30
Terminal backend crossterm 0.29
System metrics sysinfo 0.38
CLI parsing clap 4.5
macOS APIs libc 0.2

Contributing

Contributions are welcome. Please open an issue before submitting large changes.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-change)
  3. Commit your changes
  4. Open a pull request

The project is licensed under the MIT license. See the LICENSE file for details.