Add `lh status`: GPU, VRAM, throughput and cache dashboard

Aperta
#70 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli, observability

Direzione di ricerca

The payload names no source files, only data sources: NVML or nvidia-smi for GPU state, and llama.cpp /props, /slots and timings plus llama-swap /running for model and turn data. Start by checking how the existing token meter and TUI footer are wired, then decide how a status collector fits beside them. Done means lh status and --json show the listed metrics on a llama.cpp endpoint, and a missing source reports unknown.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: local-ops area: ux enhancement priority: P2

Problem

The user watches GPU load and temperature separately (nvtop, nvidia-smi) while the harness shows only a token meter. They cannot see VRAM headroom, tokens/s, time to first token, queue depth or prefix-cache hit rate in one place. When a run slows down, the cause is invisible.

Inspiration

  • nvtop and nvidia-smi for GPU state.
  • llama.cpp /slots and timings for per-request throughput and cache hits.
  • llama-swap /running for the active upstream.
  • LM Studio's loaded-instance view.

Proposal

Add lh status (and a compact footer mode):

  • GPU: utilization, VRAM used/total, temperature, power, throttle reason when available.
  • Model: loaded model, context allocated, slots busy/total, queue depth.
  • Turn: tokens/s (decode), prefill tokens/s, TTFT, cached prompt tokens / total.
  • Session: context used, compaction count, estimated cost (if a price is configured).
  • Read from NVML/nvidia-smi, llama.cpp /props and /slots, llama-swap /running; degrade gracefully when a source is missing.
  • --json for scripts; no telemetry.

Acceptance criteria

  • lh status shows GPU, model, slot and turn metrics on a llama.cpp endpoint.
  • A missing GPU or endpoint shows unknown, not zero.
  • Cache hit rate is computed from usage, not guessed.
  • --json is stable and documented.
  • The footer mode updates without blocking the TUI.
  • No network calls beyond the configured local endpoint.
Lingua principale
Rust
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GotinhaAzul/LocalHarness

Tutte le issue di GotinhaAzul/LocalHarness

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.