Documentation
¶
Overview ¶
Package clockspeed tracks the NVIDIA per-GPU clock speed.
Index ¶
Constants ¶
View Source
const Name = "accelerator-nvidia-clock-speed"
Name is the component name reported by the NVIDIA clock speed checker.
View Source
const SubSystem = "accelerator_nvidia_clock_speed"
SubSystem is the Prometheus subsystem name for NVIDIA clock speed metrics.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(gpudInstance *components.GPUdInstance) (components.Component, error)
New creates the NVIDIA clock speed component.
Types ¶
type ClockSpeed ¶ added in v0.9.0
type ClockSpeed struct {
// Represents the GPU UUID.
UUID string `json:"uuid"`
// BusID is the GPU bus ID from the nvml API.
// e.g., "0000:0f:00.0"
BusID string `json:"bus_id"`
GraphicsMHz uint32 `json:"graphics_mhz"`
MemoryMHz uint32 `json:"memory_mhz"`
// ClockGraphicsSupported is true if the clock speed is supported by the device.
ClockGraphicsSupported bool `json:"clock_graphics_supported"`
// ClockMemorySupported is true if the clock speed is supported by the device.
ClockMemorySupported bool `json:"clock_memory_supported"`
}
ClockSpeed represents the data from the nvmlDeviceGetClockInfo API. Returns the graphics and memory clock speeds in MHz. ref. https://docs.nvidia.com/deploy/nvml-api/group__nvmlDeviceQueries.html#group__nvmlDeviceQueries_1g2efc4dd4096173f01d80b2a8bbfd97ad
func GetClockSpeed ¶ added in v0.9.0
func GetClockSpeed(uuid string, dev device.Device) (ClockSpeed, error)
GetClockSpeed returns the graphics and memory clock speeds for a GPU.
Click to show internal directories.
Click to hide internal directories.