s-tui

Terminal UI that graphs CPU temperature, frequency, power and utilization, with a built-in CPU stress test and thermal throttle indicators.

install

s-tui is a terminal-based CPU monitoring and stress-testing tool written in Python. It graphs CPU temperature, frequency, power and utilization in a urwid-based TUI, with a sidebar for choosing which graphs and summaries to show and a text readout of all sensors at the bottom. It does not need an X server, and it reads hardware data through psutil. It is not a process monitor like htop. The README compares it to the AIDA64 stress test rather than a task manager.

A built-in CPU stress test runs with no extra dependencies. If numpy is installed, it uses repeated dense matrix multiplication (BLAS). Without numpy it falls back to SHA-256 hashing. The external stress or stress-ng tools can be added for memory, I/O and sync workers. You switch between stressed and regular operation with the radio buttons under 'Modes'. This lets you watch how frequency and temperature change under load.

s-tui flags throttling by changing the color of the frequency graph and appending a reason label. On Intel with root and the msr module, labels include T (thermal), H (PROCHOT), C (critical), W (power limit), A (current limit) and X (cross-domain). On AMD with root and msr, it reports Pc for a P-state cap. Without root, a sysfs fallback reports core (Tc) and package (Tp) thermal throttling. Temperature sensors that exceed their high value or a user threshold (default 80°C, set with -tt) change color. Shell scripts placed in ~/.config/s-tui/hooks.d/tempsource.sh run every 30 seconds while the CPU temperature stays above the threshold.

Command-line options include --csv to log stats to a CSV file, --terminal for a single line of stats without the TUI, --json for single-line JSON output, and --no-mouse for TTY systems that crash on mouse input. Settings can be saved to ~/.config/s-tui/s-tui.conf. It targets Linux and other UNIX-like systems and is tested on Raspberry Pi 1 through 4. Power readings need an Intel Core CPU of the second generation or newer, or an AMD Family 17h CPU with the amd_energy driver. Typical users are people checking cooling, overclocks or thermal throttling on desktops, servers and single-board computers.

Installation

# via apt
sudo apt install s-tui
# via pip
pip install s-tui --user
# via pacman
sudo pacman -S s-tui

Alternatives & related tools

add a badge to your README

Maintain s-tui? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/s-tui.svg)](https://www.trmn.sh/tools/s-tui?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/s-tui?utm_source=badge"><img src="https://www.trmn.sh/badge/s-tui.svg" alt="Featured on trmn" height="20"></a>