New parsers: - NVIDIA Field Diagnostics parser with dmidecode output support - NVIDIA Bug Report parser with comprehensive hardware extraction - Supermicro crashdump (CDump.txt) parser - Generic fallback parser for unrecognized text files Enhanced GPU parsing (nvidia-bug-report): - Model and manufacturer detection (NVIDIA H100 80GB HBM3) - UUID, Video BIOS version, IRQ information - Bus location (BDF), DMA size/mask, device minor - PCIe bus type details New hardware detection (nvidia-bug-report): - System Information: server S/N, UUID, manufacturer, product name - CPU: model, S/N, cores, threads, frequencies from dmidecode - Memory: P/N, S/N, manufacturer, speed for all DIMMs - Power Supplies: manufacturer, model, S/N, wattage, status - Network Adapters: Ethernet/InfiniBand controllers with VPD data - Model, P/N, S/N from lspci Vital Product Data - Port count/type detection (QSFP56, OSFP, etc.) - Support for ConnectX-6/7 adapters Archive handling improvements: - Plain .gz file support (not just tar.gz) - Increased size limit for plain gzip files (50MB) - Better error handling for mixed archive formats Web interface enhancements: - Display parser name and filename badges - Improved file info section with visual indicators Co-Authored-By: Claude (qwen3-coder:480b) <noreply@anthropic.com>
69 lines
1.6 KiB
Go
69 lines
1.6 KiB
Go
package nvidia
|
|
|
|
import (
|
|
"bufio"
|
|
"strings"
|
|
|
|
"git.mchus.pro/mchus/logpile/internal/models"
|
|
)
|
|
|
|
// ParseOutputLog parses output.log file which contains dmidecode output
|
|
func ParseOutputLog(content []byte, result *models.AnalysisResult) error {
|
|
scanner := bufio.NewScanner(strings.NewReader(string(content)))
|
|
|
|
inSystemInfo := false
|
|
|
|
for scanner.Scan() {
|
|
line := scanner.Text()
|
|
trimmed := strings.TrimSpace(line)
|
|
|
|
// Detect "System Information" section
|
|
if strings.Contains(trimmed, "System Information") {
|
|
inSystemInfo = true
|
|
continue
|
|
}
|
|
|
|
// Exit section when we hit another Handle or empty section
|
|
if inSystemInfo && strings.HasPrefix(trimmed, "Handle ") {
|
|
inSystemInfo = false
|
|
continue
|
|
}
|
|
|
|
// Parse fields in System Information section
|
|
if inSystemInfo && strings.Contains(line, ":") {
|
|
parts := strings.SplitN(trimmed, ":", 2)
|
|
if len(parts) != 2 {
|
|
continue
|
|
}
|
|
|
|
field := strings.TrimSpace(parts[0])
|
|
value := strings.TrimSpace(parts[1])
|
|
|
|
if value == "" {
|
|
continue
|
|
}
|
|
|
|
switch field {
|
|
case "Manufacturer":
|
|
result.Hardware.BoardInfo.Manufacturer = value
|
|
case "Product Name":
|
|
result.Hardware.BoardInfo.ProductName = value
|
|
case "Serial Number":
|
|
result.Hardware.BoardInfo.SerialNumber = value
|
|
case "Version":
|
|
// Store version in part number if needed
|
|
if result.Hardware.BoardInfo.PartNumber == "" {
|
|
result.Hardware.BoardInfo.PartNumber = value
|
|
}
|
|
case "UUID":
|
|
// Store UUID somewhere if needed (we don't have a field for it yet)
|
|
// Could add to FRU or as a custom field
|
|
case "Family":
|
|
// Could store family info if needed
|
|
}
|
|
}
|
|
}
|
|
|
|
return scanner.Err()
|
|
}
|