Documentation
¶
Overview ¶
Package pcidev reads the PCI devices of a Linux host from sysfs, and names them from the pci.ids database, both through a filesystem. The pci and gpu collectors share it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is the names of pci.ids.
func ParseIDs ¶
ParseIDs parses the pci.ids format: a vendor line "10de NVIDIA", a product under it "\t1c82 GP107", a subsystem under that "\t\t1458 3764 Name"; and a class line "C 03 Display controller" with its subclasses "\t00 VGA compatible controller". A line longer than the read buffer is skipped, and the parse goes on.
type Device ¶
type Device struct {
Address string
VendorID string
VendorName string
ProductID string
ProductName string
ClassID string
ClassName string
SubclassID string
SubclassName string
SubsystemVendorID string
SubsystemID string
SubsystemName string
Revision string
Driver string
IOMMUGroup string
ParentAddress string
}
Device is one PCI device. Each ID is lower-case hex; each name is from pci.ids, or "unknown".