Die Zeilen aus dem Anfrage-Log lagen bisher nur in der Datei. Jetzt gibt es sie über den Steuerkanal (`requests.tail`, Standard 20, Deckel 200) und das Dashboard zeigt sie: Zeit, Modell, Ziel, Status, Millisekunden, Cache-Quelle, Tokens, Kosten — dazu p95 und Trefferquote, ausdrücklich nur über die angezeigten Zeilen gerechnet. Gelesen wird der letzte Block der Datei (256 KB), nicht die ganze: ein Ledger wächst, und das Dashboard fragt regelmäßig. Die erste, womöglich angeschnittene Zeile fällt weg; bei mehr Zeilen als gefragt bleiben die neuesten, nicht die ersten (Ringpuffer, geprüft mit 500 Zeilen und count 9999: n=200, erste m300, letzte m499). Auf n95 live: control-Socket beantwortet requests.tail, Dashboard zeigt vier echte Anfragen mit 714–751 ms, Karte "Letzte Anfragen" im HTML, app.js liest sie über /api/requests. Tests: control.py prüft requests.tail gegen ein vorbereitetes Ledger und den Deckel — 11 statt 9 Prüfungen. make test: PASS, 222 Prüfungen, 154 s.
junction dashboard
Control and history for the router. Node, no dependencies, no build step.
JUNCTION_SOCKET=/run/junction/control.sock DASH_PORT=8092 node server.js
The dashboard talks to junction exclusively over the control channel
(control unix … in the configuration) and reads status, rules.list,
mcp.tools, bringup.list, wol.list, guard.list and spend.get. It changes
nothing junction could not do itself.
| Page | Purpose |
|---|---|
| Overview | requests/s, tokens/s, latency, cost/h, errors — as history, not as a snapshot |
| Endpoints | state, counters, requests in flight, last duration; pause and resume |
| Rules | every rule with its conditions, delete, add a line (applies immediately) |
| Keys and month | per virtual key: model glob, rpm, budget, spend, requests, refusals; month total per model |
| Configuration | load the file, edit, check and save — with a .bak backup |
The server keeps 15 minutes of history (one sample per second). What junction does not
report stays empty (—) instead of passing as zero: a latency of 0 would be a claim
nobody measured.
Variables: DASH_PORT (8092), DASH_BIND (0.0.0.0), DASH_TOKEN (optional, then
Authorization: Bearer … or ?token=), SAMPLE_MS, HISTORY, JUNCTION_SOCKET or
JUNCTION_TCP=host:port.