Documentation
¶
Overview ¶
Package gpm tracks the NVIDIA per-GPU GPM metrics.
Package gpm provides the NVIDIA GPM metrics collection and reporting.
Index ¶
Constants ¶
View Source
const (
// Name is the component name reported by the NVIDIA GPM checker.
Name = "accelerator-nvidia-gpm"
)
View Source
const SubSystem = "accelerator_nvidia_gpm"
SubSystem is the Prometheus subsystem name for NVIDIA GPM metrics.
Variables ¶
This section is empty.
Functions ¶
func GetGPMMetrics ¶ added in v0.9.0
func GetGPMMetrics(ctx context.Context, dev device.Device, sampleDuration time.Duration, metricIDs ...nvml.GpmMetricId) (map[nvml.GpmMetricId]float64, error)
GetGPMMetrics returns the map from metric ID to value for a device. Don't call these in parallel for multiple devices. It "SIGSEGV: segmentation violation" in cgo execution. Returns nil if it's not supported. ref. https://github.com/NVIDIA/go-nvml/blob/main/examples/gpm-metrics/main.go
func New ¶
func New(gpudInstance *components.GPUdInstance) (components.Component, error)
New creates the NVIDIA GPM component.
Types ¶
type Metrics ¶ added in v0.11.1
type Metrics struct {
// Time is the time the metrics were collected.
Time metav1.Time `json:"time"`
// Device UUID that these GPM metrics belong to.
UUID string `json:"uuid"`
// The duration of the sample.
SampleDuration metav1.Duration `json:"sample_duration"`
// The metrics.
Metrics map[nvml.GpmMetricId]float64 `json:"metrics"`
}
Metrics contains the GPM metrics for a device.
Click to show internal directories.
Click to hide internal directories.