GNMON Kosmetik: GPU-Label via PCI-ID-Fallback + Geist-Favicon (Dashboard v0.3.3)

- amdgpu-textfile-collector.py: product_name existiert im sysfs der RX 6900 XT
  nicht (gpu="unknown"); Fallback auf PCI-Device-ID (0x73bf -> AMD Radeon RX
  6900 XT (Navi 21)). Live verifiziert: gn_gpu_up{card="0|1",gpu="AMD Radeon
  RX 6900 XT (Navi 21)"} 1 in VictoriaMetrics.
- Dashboard v0.3.3: favicon.png (32x32) + apple-touch-icon.png (180x180) aus
  dem Betreiber-Maskottchen (Dokumente/ghost.png) gerendert; via NPM als
  image/png 200 verifiziert (2729 B favicon). App.razor referenziert beide.
- Server-Image-Store: v0.3.3 + Rollback v0.2.0/v0.1.0; monitor.yml gesamt
  ok=84 changed=0.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-11-09 20:19:25 +01:00
parent fd8e1a5559
commit b96be7ae1c
7 changed files with 35 additions and 7 deletions
@@ -36,6 +36,28 @@ from pathlib import Path
AMD_VENDOR_ID = "0x1002"
# PCI device-ID fallback for the gpu label: on the discrete RX 6900 XT hosts
# sysfs has no product_name file (Befund 09.11.2026: gpu="unknown"), so map
# the well-known Navi-21 IDs explicitly. Unknown IDs fall back to the raw hex.
AMD_PCI_DEVICE_NAMES = {
"0x73bf": "AMD Radeon RX 6900 XT (Navi 21)",
"0x73df": "AMD Radeon RX 6950 XT (Navi 21)",
"0x73ff": "AMD Radeon RX 6900 XTX (Navi 21)",
}
def gpu_label(device_dir: Path) -> str:
"""Product name from sysfs, falling back to the PCI device ID."""
name = _read_text(device_dir / "product_name")
if name:
return name
device_id = _read_text(device_dir / "device")
if device_id:
return AMD_PCI_DEVICE_NAMES.get(
device_id.lower(), f"AMD PCI GPU {device_id}"
)
return "unknown"
def _read_int(path: Path) -> int | None:
try:
@@ -96,7 +118,7 @@ def collect(drm_root: Path) -> list[str]:
if vendor != AMD_VENDOR_ID:
continue
card = device_link.name.removeprefix("card")
gpu = _read_text(device_dir / "product_name") or "unknown"
gpu = gpu_label(device_dir)
def emit(metric: str, help_text: str, metric_type: str, value, **labels) -> None:
declare(metric, help_text, metric_type)