Documentation
¶
Index ¶
- Variables
- func GetDeviceCount() (uint, error)
- func GetDevicePath(idx uint) (path string, err error)
- func GetDriverVersion() (string, error)
- func Init() error
- func Shutdown() error
- type ClockInfo
- type Device
- type DeviceStatus
- type ECCErrorsInfo
- type MemoryInfo
- type P2PLink
- type P2PLinkType
- type PCIInfo
- type PCIStatusInfo
- type PCIThroughputInfo
- type ProcessInfo
- type UtilizationInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCPUAffinity = errors.New("failed to retrieve CPU affinity") ErrUnsupportedP2PLink = errors.New("unsupported P2P link type") )
Functions ¶
func GetDeviceCount ¶
func GetDevicePath ¶
func GetDriverVersion ¶
Types ¶
type Device ¶
type Device struct {
Model string
UUID string
Path string
Power uint
CPUAffinity uint
PCI PCIInfo
Clocks ClockInfo
Topology []P2PLink
// contains filtered or unexported fields
}
func (*Device) Status ¶
func (d *Device) Status() (status *DeviceStatus, err error)
type DeviceStatus ¶
type DeviceStatus struct {
Power uint
Temperature uint
Utilization UtilizationInfo
Memory MemoryInfo
Clocks ClockInfo
PCI PCIStatusInfo
Processes []ProcessInfo
}
type ECCErrorsInfo ¶
type MemoryInfo ¶
type MemoryInfo struct {
GlobalUsed uint64
ECCErrors ECCErrorsInfo
}
type P2PLink ¶
type P2PLink struct {
BusID string
Link P2PLinkType
}
type P2PLinkType ¶
type P2PLinkType uint
const ( P2PLinkUnknown P2PLinkType = iota P2PLinkCrossCPU P2PLinkSameCPU P2PLinkHostBridge P2PLinkMultiSwitch P2PLinkSingleSwitch P2PLinkSameBoard )
func GetP2PLink ¶
func GetP2PLink(dev1, dev2 *Device) (link P2PLinkType, err error)
func (P2PLinkType) String ¶
func (t P2PLinkType) String() string
type PCIStatusInfo ¶
type PCIStatusInfo struct {
BAR1Used uint64
Throughput PCIThroughputInfo
}
type PCIThroughputInfo ¶
type ProcessInfo ¶
type UtilizationInfo ¶
Click to show internal directories.
Click to hide internal directories.