power

package
v0.1.9 Latest Latest
Warning

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

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

Documentation

Overview

Package power provides the NVIDIA power usage metrics collection and reporting.

Index

Constants

View Source
const SubSystem = "accelerator_nvidia_power"

Variables

This section is empty.

Functions

func InitAveragers

func InitAveragers(db *sql.DB, tableName string)

func ReadCurrentUsageMilliWatts

func ReadCurrentUsageMilliWatts(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func ReadEnforcedLimitMilliWatts

func ReadEnforcedLimitMilliWatts(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func ReadUsedPercents

func ReadUsedPercents(ctx context.Context, since time.Time) (components_metrics_state.Metrics, error)

func Register

func Register(reg *prometheus.Registry, db *sql.DB, tableName string) error

func SetEnforcedLimitMilliWatts

func SetEnforcedLimitMilliWatts(ctx context.Context, gpuID string, milliWatts float64, currentTime time.Time) error

func SetLastUpdateUnixSeconds

func SetLastUpdateUnixSeconds(unixSeconds float64)

func SetUsageMilliWatts

func SetUsageMilliWatts(ctx context.Context, gpuID string, milliWatts float64, currentTime time.Time) error

func SetUsedPercent

func SetUsedPercent(ctx context.Context, gpuID string, pct float64, currentTime time.Time) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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