# s-tui

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

Stars: 5.1k · Language: Python · License: GPL-2.0 · Categories: System

- Repository: https://github.com/amanusk/s-tui
- Website: https://amanusk.github.io/s-tui/
- Page: https://www.trmn.sh/tools/s-tui

## Install

- apt: `sudo apt install s-tui`
- pip: `pip install s-tui --user`
- pacman: `sudo pacman -S s-tui`

## Overview

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

```bash
# via apt
sudo apt install s-tui
```

```bash
# via pip
pip install s-tui --user
```

```bash
# via pacman
sudo pacman -S s-tui
```

## Alternatives

- [Toolong](https://www.trmn.sh/tools/toolong.md): Terminal log viewer that tails, merges, and searches log files and JSONL, with web server log highlighting and support for multi-gigabyte files. (Python, 4.0k stars)
- [nvitop](https://www.trmn.sh/tools/nvitop.md): Interactive NVIDIA GPU and process monitor in Python with tree view, filtering, signal sending, a CUDA device selector (nvisel), and APIs for custom tools. (Python, 7.3k stars)
- [auto-cpufreq](https://www.trmn.sh/tools/auto-cpufreq.md): Linux CPU speed and power optimizer that adjusts governor and turbo boost based on battery state, CPU load and temperature. Includes CLI, daemon and GUI. (Python, 7.9k stars)
- [tuptime](https://www.trmn.sh/tools/tuptime.md): System uptime tracking tool that preserves historical uptime/downtime statistics across reboots with detailed reporting (Python, 321 stars)
- [bpytop](https://www.trmn.sh/tools/bpytop.md): Terminal-based system resource monitor showing CPU, memory, disk, network and process usage with interactive interface (Python, 10.9k stars)

---

Canonical: https://www.trmn.sh/tools/s-tui
