nvml

package
v1.0.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

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 GetDeviceCount() (uint, error)

func GetDevicePath

func GetDevicePath(idx uint) (path string, err error)

func GetDriverVersion

func GetDriverVersion() (string, error)

func Init

func Init() error

func Shutdown

func Shutdown() error

Types

type ClockInfo

type ClockInfo struct {
	Core   uint
	Memory uint
}

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 NewDevice

func NewDevice(idx uint) (device *Device, err error)

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 ECCErrorsInfo struct {
	L1Cache uint64
	L2Cache uint64
	Global  uint64
}

type MemoryInfo

type MemoryInfo struct {
	GlobalUsed uint64
	ECCErrors  ECCErrorsInfo
}
type P2PLink struct {
	BusID string
	Link  P2PLinkType
}

type P2PLinkType

type P2PLinkType uint
const (
	P2PLinkUnknown P2PLinkType = iota
	P2PLinkCrossCPU
	P2PLinkSameCPU
	P2PLinkHostBridge
	P2PLinkMultiSwitch
	P2PLinkSingleSwitch
	P2PLinkSameBoard
)
func GetP2PLink(dev1, dev2 *Device) (link P2PLinkType, err error)

func (P2PLinkType) String

func (t P2PLinkType) String() string

type PCIInfo

type PCIInfo struct {
	BusID     string
	BAR1      uint64
	Bandwidth uint
}

type PCIStatusInfo

type PCIStatusInfo struct {
	BAR1Used   uint64
	Throughput PCIThroughputInfo
}

type PCIThroughputInfo

type PCIThroughputInfo struct {
	RX uint
	TX uint
}

type ProcessInfo

type ProcessInfo struct {
	PID  uint
	Name string
}

type UtilizationInfo

type UtilizationInfo struct {
	GPU     uint
	Encoder uint
	Decoder uint
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL