ktop: Terminal CPU and GPU Monitor for LLM Workloads
ktop is a Rust terminal monitor that tracks CPU, GPU, memory, network, and temperature for hybrid LLM workloads in a single view.
ktop: Terminal CPU and GPU Monitor for LLM Workloads
ktop is a terminal-based system resource monitor built for tracking resource usage during hybrid LLM workloads. The project describes itself as a “terminal system resource monitor for hybrid LLM workloads” and is published as open source under the MIT license at https://github.com/brontoguana/ktop.
What it monitors
The tool collects several categories of metrics into one terminal view. CPU monitoring shows overall usage with a gradient bar chart and a sparkline history. GPU monitoring reports per-GPU utilization and memory usage with color-coded sparkline history, with support listed for NVIDIA and AMD devices. Memory monitoring covers RAM and swap usage through gradient progress bars, and network monitoring tracks upload and download speeds with separate colored sparklines.
A temperature strip displays CPU, memory, and per-GPU temperatures using mini bar charts with hardware-accurate thresholds. The process tables show the top 10 processes by memory, broken into used and shared figures, alongside the top processes by CPU usage reported as a per-core percentage and a system-wide percentage.
An OOM Kill Tracker surfaces recent out-of-memory events: the status bar shows the most recent OOM kill from the last 8 hours, covering both kernel OOM and systemd-oomd kills. For long training jobs that can exhaust memory, this gives a quick indication of why a process disappeared.
Implementation and installation
ktop is written in Rust. The README notes it was rewritten from Python to Rust to produce a single static binary with near-zero CPU overhead and instant startup. Because it ships as a static binary, the project states it has no runtime dependencies, with no Python, pip, or virtual environment required.
Installation uses a one-line script that downloads the latest binary and installs it to /usr/local/bin, prompting for sudo if needed:
curl -sSfL https://raw.githubusercontent.com/brontoguana/ktop/master/install.sh | bash
The same command upgrades an existing install, and installed versions can self-update with ktop update. Building from source is also supported with cargo build --release. The refresh interval defaults to one second and can be changed with the -r flag, for example ktop -r 2 for a two-second interval.
Interface and configuration
ktop runs as an interactive terminal UI with keyboard controls. Pressing q or ESC quits the program, and t opens a theme picker that offers 50 color themes with live preview, navigated with the arrow keys and confirmed with Enter. Theme choices persist across sessions. Pressing c toggles between truecolor output and a safer Basic color mode, a setting that also persists.
The interface uses gradient bar charts with smooth per-block color transitions from low to high across all bars. Input polling runs at 50ms for responsive keyboard navigation. Additional options include a simulation mode through --sim, a compatibility mode through --compat, and diagnostic commands such as diagnose-terminal and diagnose-render for troubleshooting display issues.
Where it fits
For developers running models locally, separate tools have traditionally handled different resources, with one utility for CPU and memory and vendor-specific tools for GPUs. ktop consolidates CPU, GPU, memory, network, and temperature readings, plus an OOM tracker, into a single terminal window. Its focus on hybrid LLM workloads and its lightweight static-binary design make it aimed at machines where models and supporting processes compete for both processor and accelerator resources.
Source: github.com
Related Tips
How the Model Context Protocol Handles Authorization
A look at the Model Context Protocol authorization spec: OAuth 2.1 roles, token validation, scopes, and the discovery flow between clients and servers.
Memory Systems for Long-Running AI Agents
How long-running AI agents manage memory through compaction, note-taking, and sub-agents, based on Anthropic's context engineering guidance.
Abliteration: Removing AI Refusals Explained
Abliteration uncensors language models by finding the refusal direction in the residual stream and orthogonalizing weights against it, without retraining.