back to home

amanusk / s-tui

Terminal-based CPU stress and monitoring utility

4,957 stars
173 forks
52 issues
PythonMakefileShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing amanusk/s-tui in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/amanusk/s-tui)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

The Stress Terminal UI: s-tui Stress-Terminal UI, s-tui, monitors CPU temperature, frequency, power and utilization in a graphical way from the terminal. Screenshot Table of Contents • The Stress Terminal UI: s-tui • Screenshot • What it does • Usage • Simple installation • pip (x86 ARM) • More installation methods • Ubuntu (18.10 and newer) • Ubuntu (18.04, 16.04) • Debian (10 and newer) • Arch Linux, Manjaro • OpenSUSE • Fedora • Options • Throttle Indicators • Dependencies • Configuration • Saving a configuration • Adding threshold scripts • Run from source code • Compatibility • FAQ • Development • Contributing • Tip What it does • Monitoring your CPU temperature/utilization/frequency/power • Shows performance dips caused by thermal throttling • Requires no X-server • Built-in CPU stress test (zero dependencies, works out of the box) • Optional integration with external stress tools (stress/stress-ng) Usage Simple installation pip (x86 + ARM) The most up to date version of s-tui is available with pip. Install with: (This usually creates an executable in ~/.local/bin/ dir. Make sure it is in your PATH) To install as root You might need to install first Installation in virtualenv with pipsi: More installation methods Ubuntu (18.10 and newer) Ubuntu (18.04, 16.04) A PPA is available but is not up to date Debian (10 and newer) Arch Linux, Manjaro is in the Arch repository: follows the master branch, maintained by @MauroMombelli Install it with: OpenSUSE Fedora is in the Fedora repository: Options Throttle Indicators When CPU throttling is detected, s-tui changes the frequency graph and summary text color and appends a reason label. Labels may be combined with (e.g. ). **With root + module** (detailed per-core reasons via ): | Label | Meaning | | ----- | ----------------------------------------------------- | | | Thermal — core temperature exceeded TjMax | | | PROCHOT — external thermal signal (VRM, GPU, battery) | | | Critical — near emergency shutdown temperature | | | Power limit — PL1/PL2 watt budget exceeded | | | Current limit — electrical current (amps) limit hit | | | Cross-domain — throttled by another domain (e.g. GPU) | **Without root** (sysfs fallback, thermal only): | Label | Meaning | | ----- | -------------------------------------------- | | | Core thermal throttle | | | Package thermal throttle (affects all cores) | When a temperature sensor exceeds the value defined by the sensor, or a user configured threshold (default 80°C), the sensor summary text summary and associated graph will change color to indicate this. Dependencies s-tui includes a built-in CPU stress test that works out of the box with no extra dependencies. For better stress performance, install numpy: or install numpy directly: When numpy is available, the built-in stresser uses mixed floating-point operations (multiply, sqrt, sin) for maximum thermal output. Without numpy, it falls back to hashlib SHA-256 hashing which still provides good CPU load. For additional stress options (memory, I/O, sync workers), you can optionally install the external or tool: Configuration s-tui is a self-contained application that can run out-of-the-box and doesn't need config files to drive its core features. However, additional features like running scripts when a certain threshold has been exceeded (e.g. CPU temperature) does necessitate creating a config directory. This directory will be made in by default. Saving a configuration Selecting \ will save the current configuration to . If you would like to restore defaults, simply remove the file. Adding threshold scripts s-tui gives you the ability to run arbitrary shell scripts when a certain threshold is surpassed, like your CPU temperature. You can define this custom behaviour by adding a shell file to the directory with one of the following names, depending on what threshold you're interested in reacting to: • : triggered when the CPU temperature threshold is exceeded If s-tui finds a script in the hooks directory with the name of a source it supports, it will run that script every 30 seconds as long as the current value of the source remains above the threshold. Note that at the moment only CPU temperature threshold hooks are supported. Run from source code Start by cloning the repository Install required dependencies as \[root\] or as (local user) Install stress (optional) Run the .py file Compatibility s-tui uses psutil to probe hardware information. If your hardware is not supported, you might not see all the information. s-tui uses urwid as a graphical engine. urwid only works with UNIX-like systems • Power read is supported on Intel Core CPUs of the second generation and newer (Sandy Bridge) and on AMD Family 17h CPUs through the amd_energy driver. • s-tui tested to run on Raspberry-Pi 4,3,2,1 FAQ **Q**: How is this different from htop? **A**: s-tui is not a processes monitor like htop. The purpose is to monitor your CPU statistics and have an option to test the system under heavy load. (Think AIDA64 stress test, not task manager). **Q**: I am using the TTY with no X server and s-tui crashes on start **A**: By default, s-tui is handles mouse inputs. This causes some systems to crash. Try running **Q**: I am not seeing all the stats in the sidebar. **A**: The sidebar is scrollable, you can scroll down with or or scroll to the bottom with or . You might consider also decreasing the size of the font that you use in your terminal.:) Development Install dev dependencies: Set up pre-commit hooks (runs ruff + pyright automatically before each push): Run checks manually: Auto-fix lint and formatting: Contributing New issues and Pull Requests are welcome :) If you notice a bug, please report it as a new issue, using the provided template. To open a Pull Request, please see CONTRIBUTING for more information. Tip If you like this work, please star it on GitHub. BTC: ETH: