Pull requests / #2317
#2317 Monitor: one line per card on a layer split (load, VRAM, temperature, power, PCIe)
open · @kennuardo · 0 comments · View on GitHub
Server & APINVIDIA / CUDALinux
Description
Issue: none (related: #2001 is about the Intel reader picking the wrong card; this is about the charts on a layer split)
## Summary
On a two-card layer split the Monitor tab's sparklines show one series per tile (mean load, total VRAM and power, the hottest temperature, the first card's PCIe traffic), so the charts cannot say which card is working. With this change the GPU load, VRAM, GPU temp, Power and PCIe tiles draw GPU 0 as today and GPU 1 as a dashed second line on the same scale, and the tiles' subtext names the cards ("RTX 5070 Ti 72% · RTX 5060 Ti 26%"). One card: nothing changes, on the server or on the page.
## What changed
- `serve/telemetry.py`: with more than one card, `_loop` also records each card's own `gpu<N>_util`, `gpu<N>_mem_used`, `gpu<N>_temp`, `gpu<N>_power`, `gpu<N>_pcie_rx_mb` in the same 60-sample history, and the `gpus` entries carry `pcie_rx_mb` / `pcie_tx_mb` (the reader already read them; they were only summed). Single card: no new keys.
- `serve/web/app.js`: `sparkPair()` draws GPU 0 (solid line + area) and GPU 1 (dashed) on one scale when the per-card series exist, else falls back to `spark()` exactly as before. The per-card subtext uses short card names split from `hardware_static.gpu_name` (vendor prefix dropped, falls back to `GPU <n>` when the names and the card count disagree), one card per side of the tile with the value in bold; the Power and PCIe tiles get the per-card subtext the other tiles already had.
- `serve/web/app.css`: the second line in `--st-info`; the per-card subtext as a flex row.
## Extra Notes
- Measured on an RTX 5070 Ti + RTX 5060 Ti layer split, Linux, engine 0.1.43.1: `/metrics` grows by five 60-sample series per card (about 3 KB); the sampler does no new reads.
- Default path: with one card the history keys, the `gpus` entries and the rendered tiles are the same as before (`sparkPair` returns to `spark()` when `gpu1_*` is absent).
- Touches the same PCIe tile as #2272; both apply, the conflict is a few lines in `render()`.
- Checked: the serve test suite, `python -m unittest discover -s serve -p "test_*.py" -t .` on this branch and on `main` at a0116b2: `Ran 725 tests ... OK (skipped=11)` on both (Linux, Python 3.14). The page was checked by hand on the two-card split (screenshot) and reads the same as before with one card (the per-card series are absent, `sparkPair` falls back to `spark`).
<img width="1237" height="381" alt="image" src="https://github.com/user-attachments/assets/ccebefde-c5e8-43ae-afd7-2be4c2d24765" />
Related on strata.com
Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.