Skip to content

tools: add real-time web dashboard for hardware and engine monitoring - #22

Closed
code-martin wants to merge 1 commit into
Niko1221:mainfrom
code-martin:feature/live-dashboard
Closed

code-martin wants to merge 1 commit into
Niko1221:mainfrom
code-martin:feature/live-dashboard

Conversation

@code-martin

@code-martin code-martin commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a self-contained real-time monitoring web dashboard (tools/dashboard_server.py) for Strata:

  • Zero external dependencies: implemented purely with Python standard library (http.server, urllib, json, subprocess, ctypes).
  • Single-page responsive dark UI with live SVG telemetry gauges, mini trend charts, and real-time generation metrics.
  • Runs alongside the Strata engine server: python tools/dashboard_server.py --port 8081 --server http://127.0.0.1:8080.

Preview

Strata Live Dashboard Preview

Features

  • Strata Engine Tracking:
    • Live state, prompt/generation progress bar, current token throughput (tok/s), context window utilization, and active KV cache mode.
    • Completed request history log with prefill/gen timing, token counts, and effective speeds.
  • Hardware Telemetry (Windows & Linux):
    • GPU: Util %, VRAM usage/capacity, temperature, board power draw, active PCIe generation and lane width (e.g. PCIe 4.0 x16 via NVML), and expert cache slots in VRAM.
    • CPU & RAM: Core/thread count, CPU utilization, system RAM used/total.
    • NVMe Activity: Per-disk read/write MB/s and load percentage (queries PDH on Windows, /proc/diskstats on Linux) to monitor DirectStorage/SSD streaming during MoE expert offloading.
  • Resilient: Gracefully handles engine reconnects, idle periods, and background streaming.

Verification

  • Tested on Windows 11 with NVIDIA RTX 3080 + AMD Ryzen 9 5950X + Dual NVMe SSDs while running Strata with Qwen3.8-Flash-Next (Swift 1.5).
  • Verified live polling updates, responsive gauge animations, and request history tracking.

@code-martin
code-martin force-pushed the feature/live-dashboard branch from 1b63f1a to e7a2eee Compare September 27, 2026 08:29
@Niko1221

Copy link
Copy Markdown
Owner

I was just doing this, will push in about 2hrs.

…toring

- Provide standalone, zero-dependency live dashboard on port 8081
- Monitor GPU utilization, VRAM usage, PCIe mode, and temperature via NVML
- Monitor CPU utilization, RAM, and NVMe disk throughput
- Track active engine inference state, tokens/sec, and request history
- Implement ThreadingHTTPServer with cached process metrics and live clock/uptime
@code-martin
code-martin force-pushed the feature/live-dashboard branch from e7a2eee to a3b200c Compare September 27, 2026 08:49
Niko1221 added a commit that referenced this pull request Sep 27, 2026
The browser page at http://127.0.0.1:8080 is now the Strata app, in the
Strata design language (serve/web, same origin, no CDN):
- Chat: streaming answers, collapsible thinking, Markdown with code copy,
  images when enabled, sampling/thinking settings, export, new chat.
- Monitor: live model state (reading with progress / generating at tok/s),
  GPU load, VRAM, temperature, power, PCIe traffic, CPU, RAM, disk, the
  context fill and the last requests, each with a minute of history.
- About: the model and engine settings, this PC, the API addresses.

Server: GET /metrics (API key when set), /web/* app files, /fonts/* only
when installed locally (not shipped; the page falls back to the system
font). serve/telemetry.py reads NVML via ctypes and psutil (new setup
dependency) with fallbacks. The engine prints an INFO line before READY
(kv, expert slots, speculation); older servers ignore it and the server
works with older engines.

Based on the dashboard idea in PR #22 by code-martin.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0154bwiad8gY7wRehCXy27pN
@Niko1221

Copy link
Copy Markdown
Owner

Thanks a lot for this! The idea shaped v0.1.8, but I didn't merge the separate dashboard server. I built it into the main server instead, so there's one port and one process: http://127.0.0.1:8080 is now an app with Chat, Monitor and About tabs.

The Monitor covers what your dashboard had: live state with prompt progress and tok/s, GPU util / VRAM / temp / power / PCIe gen and traffic (NVML via ctypes, like yours), CPU / RAM / disk, context fill, expert slots, KV mode and the request history, each with a minute of sparkline. It reads a new GET /metrics endpoint, and the engine now reports its setup (KV, expert slots, speculation) on an INFO line, so nothing is scraped from logs.

Credited you in the release notes and in docs/DETAILS.md. Closing this since the code itself isn't merged. If there's something from yours that the Monitor misses (per-disk NVMe load, for example), open an issue or a PR against serve/web.

@Niko1221 Niko1221 closed this Sep 27, 2026
MistVVK referenced this pull request in MistVVK/XeStrata Oct 3, 2026
The browser page at http://127.0.0.1:8080 is now the Strata app, in the
Strata design language (serve/web, same origin, no CDN):
- Chat: streaming answers, collapsible thinking, Markdown with code copy,
  images when enabled, sampling/thinking settings, export, new chat.
- Monitor: live model state (reading with progress / generating at tok/s),
  GPU load, VRAM, temperature, power, PCIe traffic, CPU, RAM, disk, the
  context fill and the last requests, each with a minute of history.
- About: the model and engine settings, this PC, the API addresses.

Server: GET /metrics (API key when set), /web/* app files, /fonts/* only
when installed locally (not shipped; the page falls back to the system
font). serve/telemetry.py reads NVML via ctypes and psutil (new setup
dependency) with fallbacks. The engine prints an INFO line before READY
(kv, expert slots, speculation); older servers ignore it and the server
works with older engines.

Based on the dashboard idea in PR #22 by code-martin.
MistVVK referenced this pull request in MistVVK/XeStrata Oct 10, 2026
…or pull request (#21); README: 2x CMP 170HX with Maya-M in the users' table (#22), STRATA_GLM_MTP_GGUF under Tuning, a link to CONTRIBUTING.md
FlareP1 pushed a commit to FlareP1/Strata that referenced this pull request Oct 18, 2026
…the upstream ncols > 1 layout timed on sm_86, the exact one stays the default

Comments only.  The next commit puts this branch's kernel timings on its two models' shapes beside the pull
request's decode numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants