- CMake 87.3%
- Python 7.2%
- HTML 2.5%
- Shell 1.7%
- JavaScript 0.6%
- Other 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- A number field that is blank, or holding text, reports an empty value - a stray space is enough in Firefox - so the dashboard posted null, the runner's int() raised, and it did so after the run directory and the recording had already started: the history page filled up with runs that failed with "int() argument must be a string... not 'NoneType'". Out-of-range values were started exactly as typed. - index.html checks each number field before asking for a run name, outlines the offending one and says which bound it broke. - _clean_params applies the same rules to the posted body, so the API cannot be talked into it either, and the launch is refused before any process or run directory exists. |
||
| archive | ||
| ascii | ||
| bin | ||
| lib | ||
| pip | ||
| procedures | ||
| share/cmake-3.22 | ||
| stressmon@0542e53315 | ||
| tests | ||
| webui | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| amddevids | ||
| BENCH-VALIDATION.md | ||
| compare.ptx | ||
| config.json | ||
| filters.json | ||
| IGNORE_PATTERNS | ||
| inteldevids | ||
| menu | ||
| PATTERNS | ||
| README.md | ||
| requirements.txt | ||
| rma-setup.sh | ||
| rsync-filter.txt | ||
| s76-burn-in.sh | ||
| s76-check.sh | ||
| s76-disable-suspend.sh | ||
| s76-gpu-burn.sh | ||
| s76-journalctl.sh | ||
| s76-kernel-benchmark.sh | ||
| s76-llvm-stress.sh | ||
| s76-setup-testpy.sh | ||
| s76-setup-unigine.sh | ||
| s76-stress-ng.sh | ||
| s76-stress-tests.sh | ||
| s76-stress.sh | ||
| s76-testguipy.sh | ||
| s76-testpy.sh | ||
| s76-unigine-valley.sh | ||
| s76-webui.sh | ||
| s76burnin.py | ||
| s76setuptestpy.py | ||
| s76utils.py | ||
| stress-ng_revert | ||
| sudomodule.py | ||
| system76_thelio_io_2_default.uf2 | ||
| test.py | ||
| test_gui.py | ||
| test_gui.tar.xz | ||
| trubble-stress-scripts.sh | ||
| valley_1.0.cfg | ||
| venids | ||
System76 Stress Test Scripts
Comprehensive hardware stress-testing framework with real-time sensor monitoring, a web UI, thermal characterization, and automated procedures. Designed for System76 hardware validation but works on any Linux system.
Architecture
s76-webui.sh → Web UI launcher: venv setup, RAPL chmod, smartctl sudoers
webui/app.py → Flask application — dashboard, monitor, APIs, recording
webui/sensors.py → SensorManager — samples the sensors, recovers late ones
webui/hwinfo.py → Hardware inventory for the config page and thermal reports
webui/thermal.py → Thermal characterization procedure
webui/filters.py → Journal filter profiles (include/exclude regex with context)
webui/journal.py → JournalEntryWatcher — polling-based journalctl reader
webui/runners.py → Subprocess runner with timeout, restart, and logging
webui/procedure.py → Procedure definition loader (multi-phase stress workflows)
webui/stressor_categories.py → Grouping and labels for the stressor picker
webui/config.py → Configuration file loader/saver (config.json, retention)
webui/ambient.py → Ambient temperature sensor client (network thermometer)
stressmon/ → Hardware sensor library (git submodule)
cpuusage.py ← CPU utilization (per-core % via psutil)
cpufreq.py ← CPU clock speeds
cputemp.py ← CPU core temperatures
cpuwatts.py ← CPU package power (RAPL)
memusage.py ← Memory usage (percent, used, total, available)
memtemp.py ← DIMM temperatures (spd5118)
sysfan.py ← System fan speeds
gpudata.py ← GPU sensors (temp, clock, fan, power, utilization, VRAM)
gpuhw.py ← PCI-level GPU discovery, integrated vs discrete
drivetemp.py ← NVMe/SATA drive temperatures
cpuinfo.py ← CPU model, vendor, P/E core topology
hwsensors.py ← Abstract base class for all sensors
updatepool.py ← Threaded update loop; reports failing sensors
recorder.py ← Shared CSV/summary recording for all three monitors
stressmon/tests/ → Sensor library tests (no hardware needed)
tests/ → Web UI tests (sensors, recording, run paths, journal)
procedures/ → JSON procedure definitions (multi-phase stress workflows)
Web UI
Start the web UI:
./s76-webui.sh # Port 5000
./s76-webui.sh 8080 # Custom port
The launcher also fixes what the sensors need: it makes the RAPL power files
world-readable (that permission does not survive a reboot) and offers to add a
sudoers rule so bin/smartctl can read NVMe SMART data without a password.
Dashboard (/)
Profile launcher with parameter tuning (runtime, integrated graphics toggle, etc). Shows running processes with live log streaming, stop controls, and elapsed time.
Available profiles:
| Profile | What it runs |
|---|---|
| Full Burn-in Test | Interactive multi-phase burn-in (serial number prompt) |
| CPU + Memory Stress | stress-ng CPU + VM, fixed runtime |
| GPU Burn | gpu_burn; optional Use tensor cores (-tc) checkbox |
| LLVM Stress Test | Repeated LLVM compilation, fixed runtime |
| Continuous Stress (stress-ng) | stress-ng + GPU until stopped |
| Continuous LLVM Rebuild | cmake → ninja → rm build → repeat, until stopped |
| Hybrid Cycle (stress-ng + LLVM) | Alternates the two above until stopped |
| Thermal Characterisation | Warmup → cooldown → N × (stress + cooldown), with report |
| Unigine Valley GPU | OpenGL benchmark, optional burn-in loop |
| Sensor Monitor | Points at the Monitor page |
Use tensor cores (-tc) is off by default: the gpu_burn build in bin/ works
the GPU less hard with tensor cores enabled, so it is only used when asked for.
Monitor (/monitor)
Real-time hardware sensor dashboard with SSE (Server-Sent Events) streaming, updated every 200ms.
Sensor groups shown:
| Section | Data | Units |
|---|---|---|
| CPU Utilization | Per-core usage %, overall average | % |
| CPU Frequency | Per-core clock speed | MHz |
| CPU Temperatures | Per-core + package | °C |
| CPU Power | Package, Cores, Platform (RAPL) | W |
| Memory | Used %, total/used/available | GB, % |
| DIMM Temperatures | Per-DIMM (spd5118 sensors) | °C |
| Fans | Per-driver fan speeds | RPM |
| Drives | NVMe/SATA composite + sensor temps | °C |
| GPUs | Temp, clock, fan, power, VRAM usage, utilization | °C/MHz/RPM/W/MB/% |
The CPU section is collapsible — by default only package-level values are shown; click "Show all cores" to expand per-core data.
Other features:
- Recording: Click "Record" to log all sensor data to CSV with timestamped
samples. Downloaded as
sensors-<timestamp>.csv. When a test is launched, recording happens inside the run directory instead. - Stale-sensor banner: If a sensor's update starts failing, its readings are whatever it last reported, and a banner names the sensor and the error instead of showing the old numbers as if they were live.
- Sensors that come online late: A sensor with nothing to report when the
web UI starts (CPU power before the RAPL chmod, drive temps before smartctl,
GPUs before the driver settles) is re-created in the background and picked up
automatically — sysfs sensors every 20-60s, GPUs after 2 minutes, drives after
5.
/api/sensorsreports which ones are still absent assensor_missing. - Summary bar: Quick-glance CPU model, core count, utilization, and memory.
Procedures (/procedures)
Multi-phase stress workflows defined as JSON in procedures/. Each procedure
can include:
- stress-ng phases: CPU, memory, I/O, HDD, VM, cache, socket stressors with per-stressor runtime config
- GPU burn phases: NVIDIA GPU stress via gpu_burn
- Thermal characterization: Automated cooldown → stress → cooldown cycle with sensor min/max reporting
- Sequential orchestration: Phases run in order; results collated per phase
Built-in procedures:
| Procedure | Phases |
|---|---|
| CPU Stress | stress-ng CPU × N cores |
| GPU Stress | GPU burn |
| CPU + GPU Mixed | stress-ng CPU + GPU burn (concurrent) |
| Advanced CPU | Per-core stress-ng with rotation |
| Compilation Stress | LLVM/clang parallel builds |
| Burn-in | CPU, memory, GPU, HDD, I/O, thermal in sequence |
| Thermal Test | Cooldown → stress-ng all cores → cooldown with sensor logging |
| Full System | CPU + memory + I/O + GPU (concurrent) |
| Full System Advanced | Full system + per-core CPU + HDD |
| Meta-Mix | Mixed stress-ng + GPU + compilation |
Run History (/runs)
Every launch gets a directory under ~/stress-tests-logs/, named
<YYYYMMDD_HHMMSS>_<profile>[_<custom name>] — the name is typed in the
"Run name" prompt when you launch, and is only a label, so runs are easy to
find again the next morning. Each run detail page shows:
- Sensor CSV data with graphs; Full View opens one sensor across every column (all cores, all fans) instead of the representative first one
- Thermal reports (min/max temperatures during stress)
- Journal log with filter profiles
- Run journal (journalctl entries tagged
stress-testfor the run duration) - Download ZIP of the whole run directory (
/api/runs/<dir>/download)
Run directories are pruned by age — see Retention.
Journal Viewer (/journal)
Live journalctl viewer with filter profiles:
- Include/Exclude patterns: Plain substring or
/regex/flagssyntax. Multiple patterns per profile. - Context lines: Configure
context_beforeandcontext_afterto capture stack traces and error context around matches. - Built-in profiles: Errors & Warnings (3 lines before, 10 after), Hardware Errors (3 before, 5 after), Stress Test Markers, All Entries.
- Custom profiles: Create and save via the inline editor.
- Test button: Test patterns live against the current journal.
- Duplicate collapsing: Consecutive duplicate lines are grouped with a count badge.
Configuration (/config)
Edit ambient temperature sensor IP/port, file server settings, and the cooling hardware in the thermal inventory. The page also lists the detected hardware.
The Bench Status card at the top is the morning check for an unattended
run: disk free on the volume the run logs live on, how many runs are on disk
and their total size, the newest and oldest run, what retention would delete,
which sensors never reported or went stale, and whether a recording is
running. The same data is machine-readable at /api/bench.
Retention itself is edited in config.json directly (see below).
Data Recording
Manual Recording
Click "Record" on the monitor page. All sensors are sampled every 200ms and
written to logs/REC_sensors.csv, with summary statistics in
logs/REC_sensors.txt. Click "Stop" to finalize; "Download CSV" retrieves the
same data.
Run Recording
When a test is launched, recording starts automatically into that run's
directory (~/stress-tests-logs/<run directory>/). Files created, all prefixed
with the run ID (R001, R002, …):
<run_id>_sensors.csv— Raw sensor time series, first column the run ID<run_id>_sensors.txt— Summary statistics (min/max/mean per column)<run_id>_manifest.json— What was launched, with any sensor caveats:sensor_errors(readings went stale),missing_sensors(no columns at all),sensors_online_mid_run(the sensor came back during the run, so its data has no column in the CSV)*journal.log— Journal entries tagged withstress-test(the run ID prefix, orrun_journal.logfor the thermal procedure)- Thermal reports —
thermal_report.txtandthermal_report.json(generated during thermal characterization)
The CSV columns are chosen when the recording starts and kept for the whole run, so every row has the same width and lines up with the header. That is why a sensor that appears part way through is written to the manifest instead of into the file.
Retention
Run directories older than retention.keep_days are deleted on startup and
every six hours; the newest retention.keep_runs runs are always kept, and a
run that is still going is never touched.
{
"retention": { "keep_days": 90, "keep_runs": 200 }
}
"keep_days": 0 keeps everything.
Hardware Sensors
All sensors follow the HWSensorBase abstract class and are updated
concurrently via a ThreadPoolExecutor every 200ms.
| Sensor | Source | Data Fields |
|---|---|---|
| CPU Utilization | psutil.cpu_percent(percpu=True) |
Per-core + overall average % |
| CPU Frequency | psutil.cpu_freq() |
Per-core current/min/max/mean MHz |
| CPU Temperature | psutil.sensors_temperatures()['coretemp'|'k10temp'] |
Per-core + package °C |
| CPU Power | RAPL sysfs (/sys/class/powercap/intel-rapl:*) |
Package, Cores, Platform, Uncore W |
| Memory | psutil.virtual_memory() |
Percent, used, total, available, free |
| DIMM Temp | psutil.sensors_temperatures()['spd5118'] |
Per-DIMM °C |
| Fans | psutil.sensors_fans() |
Per-driver RPM |
| GPU | NVML (NVIDIA), pyamdgpuinfo (AMD), PCI sysfs | Temp, clock, fan %, power, utilization %, VRAM MB |
| Drives | pySMART (NVMe/SATA) |
Composite + per-sensor °C |
RAPL power needs /sys/class/powercap/intel-rapl:*/energy_uj to be readable;
s76-webui.sh sets that, and the sensor is picked up on its own once the file
becomes readable.
Journal Integration
The web UI runs a background thread that polls journalctl for entries
with a custom identifier:
journalctl -t stress-test
Scripts output structured journal entries:
echo "Stressor started: cpu_all_cores" | systemd-cat -t stress-test
The journal viewer applies regex-based filter profiles with context extraction — matching lines plus N lines before/after are displayed.
Thermal Characterization
The thermal test procedure (procedures/thermal_test.json) runs a three-phase
cycle:
- Initial cooldown — Waits for system to reach idle temperatures
- Stress phase — Runs stress-ng CPU stressors on all cores while recording sensor snapshots every second
- Final cooldown — Monitors sensor recovery after stress stops
Outputs:
thermal_report.txt— Human-readable min/max for all sensors during stressthermal_report.json— Machine-readable report for further analysis
Tests
Two suites, both pure standard-library unittest — no root, no network, no
GPU, no smartctl and no pytest needed. From the repository root:
venv/bin/python -m unittest discover -s stressmon/tests -t . # sensor library
venv/bin/python -m unittest discover -s tests -t . # web UI layer
They cover the things that silently corrupt a result file: CSV heading/data alignment and column order, accumulator resets, the RAPL spike filter, GPU driver guards, run-path traversal rejection, journal de-duplication, sensor re-probe and adoption, and run-log retention.
Everything they cannot cover — a reboot, smartctl access, a real GPU, a desktop session — is listed as a check in BENCH-VALIDATION.md, with the commands to run and what a correct result looks like.
Requirements
- OS: Linux (tested on Ubuntu 22.04+ / Pop!_OS 22.04+)
- Python: 3.10+
- Python packages: pinned in
requirements.txt—flask,psutil,pySMART,py-cpuinfo, plusnvidia-ml-py(NVIDIA) andpyamdgpuinfo(AMD, compiles against the kernel headers) - System tools:
system76-power(System76 GPU switching);smartctl,cmake,ninja,stress-ngandgpu_burnare bundled inbin/ - Optional:
gnome-terminal- each stress phase runs in its own window when it is available, and in the current terminal when it is not
s76-webui.sh creates venv/ and installs requirements.txt on first run.
The CLI monitor (test.py) runs from that venv too when it exists;
s76-setup-testpy.sh names whatever the interpreter is missing when it does
not, and only unpacks pip/python.tar.xz for a python 3.10 - the version that
tarball was built for.
CLI Scripts
Beyond the web UI, individual scripts are available for direct use:
| Script | Purpose |
|---|---|
s76-stress-tests.sh |
Main CLI orchestrator with option flags |
s76-stress.sh |
Combined stress run (stress-ng + LLVM + GPU), -t minutes |
s76-stress-ng.sh |
Run stress-ng with configurable load |
s76-gpu-burn.sh |
NVIDIA GPU burn-in test |
s76-unigine-valley.sh |
Unigine Valley benchmark |
s76-setup-unigine.sh |
Install the Unigine Valley benchmark |
s76-llvm-stress.sh |
CPU/memory stress via LLVM builds |
s76-kernel-benchmark.sh |
Kernel build benchmark in a chroot |
s76-burn-in.sh |
Terminal-based full burn-in (runs s76burnin.py) |
s76-webui.sh |
Web UI launcher |
s76-journalctl.sh |
Tail journal entries tagged for stress test |
s76-disable-suspend.sh |
Prevent suspend during tests |
s76-check.sh |
Pre-flight system check |
s76-setup-testpy.sh |
Install dependencies for sensor monitor |
s76-testpy.sh |
Launch the curses sensor monitor (test.py) |
s76-testguipy.sh |
Launch the tkinter sensor monitor (bundled test_gui) |
test.py |
Curses-based sensor monitor (shares stressmon.recorder) |
test_gui.py |
Tkinter sensor monitor source - needs python3-tk; the shipped test_gui.tar.xz bundle carries its own copy |
License
MIT