Documentation
¶
Index ¶
Constants ¶
View Source
const ( // e.g., // [...] NVRM: Xid (0000:03:00): 14, Channel 00000001 // [...] NVRM: Xid (PCI:0000:05:00): 79, pid='<unknown>', name=<unknown>, GPU has fallen off the bus. // NVRM: Xid (PCI:0000:01:00): 79, GPU has fallen off the bus. // // ref. // https://docs.nvidia.com/deploy/pdf/XID_Errors.pdf RegexNVRMXidDmesg = `NVRM: Xid.*?: (\d+),` // Regex to extract PCI device ID from NVRM Xid messages // Matches both formats: (0000:03:00) and (PCI:0000:05:00) RegexNVRMXidDeviceUUID = `NVRM: Xid \(((?:PCI:)?[0-9a-fA-F:]+)\)` )
Variables ¶
This section is empty.
Functions ¶
func ExtractNVRMXid ¶
Extracts the nvidia Xid error code from the dmesg log line. Returns 0 if the error code is not found. https://docs.nvidia.com/deploy/pdf/XID_Errors.pdf
func ExtractNVRMXidDeviceUUID ¶
ExtractNVRMXidDeviceUUID extracts the PCI device ID from the NVRM Xid dmesg log line. For input without "PCI:" prefix, it returns the ID as is. For input with "PCI:" prefix, it returns the full ID including the prefix. Returns empty string if the device ID is not found.
Types ¶
Click to show internal directories.
Click to hide internal directories.