Add GPU serial number extraction for NVIDIA diagnostics

Parse inventory/output.log to extract GPU serial numbers from lspci output,
expose them via serials API, and add GPU category to web UI.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 22:50:46 +03:00
parent 8b065c6cca
commit bcce975fd6
7 changed files with 536 additions and 1 deletions
+18
View File
@@ -391,6 +391,24 @@ func (s *Server) handleGetSerials(w http.ResponseWriter, r *http.Request) {
})
}
// GPUs
for _, gpu := range result.Hardware.GPUs {
if gpu.SerialNumber == "" {
continue
}
model := gpu.Model
if model == "" {
model = "GPU"
}
serials = append(serials, SerialEntry{
Component: model,
Location: gpu.Slot,
SerialNumber: gpu.SerialNumber,
Manufacturer: gpu.Manufacturer,
Category: "GPU",
})
}
// PCIe devices
for _, pcie := range result.Hardware.PCIeDevices {
if pcie.SerialNumber == "" {