gpu

package
v0.0.0-...-92348d9 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package gpu contains code for monitoring of GPUs from system probe. The data flow is as follows:

  1. The main entry point is the Probe type in probe.go, which sets up the eBPF uprobes for library functions.
  2. Library uprobes send events each time those functions are called through an event ringbuffer.
  3. The consumer.go file contains the CUDA event consumer, which reads events from the ringbuffer and sends them to the appropriate stream handler.
  4. The stream.go file contains the StreamHandler type, which processes events and generates data for a specific stream of GPU commands.
  5. When the probe receives a data request via the GetAndFlush method, it calls onto the statsGenerator (stags.go) to generate the GPU stats that will be sent.
  6. The statsGenerator takes the data from all active stream handlers, and distributes them to the appropriate aggregators.
  7. The aggregators (aggregator.go) process data from multiple streams from a single process, and generate process-level stats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

type Probe struct{}

Probe is not implemented on non-linux systems

func NewProbe

func NewProbe(_ *config.Config, _ ProbeDependencies) (*Probe, error)

NewProbe is not implemented on non-linux systems

func (*Probe) Close

func (t *Probe) Close()

Close is not implemented on non-linux systems

func (*Probe) GetAndFlush

func (t *Probe) GetAndFlush() (model.GPUStats, error)

GetAndFlush is not implemented on non-linux systems

type ProbeDependencies

type ProbeDependencies struct {
	Telemetry      telemetry.Component
	NvmlLib        nvml.Interface
	ProcessMonitor any // uprobes.ProcessMonitor is only compiled with the linux_bpf build tag, so we need to use type any here
	WorkloadMeta   workloadmeta.Component
}

ProbeDependencies holds the dependencies for the probe

Directories

Path Synopsis
Package config provides the GPU monitoring config.
Package config provides the GPU monitoring config.
Package cuda provides helpers for CUDA binary parsing
Package cuda provides helpers for CUDA binary parsing
Package testutil holds different utilities and stubs for testing
Package testutil holds different utilities and stubs for testing

Jump to

Keyboard shortcuts

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