badenvs

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Overview

Package badenvs tracks any bad environment variables that are globally set for the NVIDIA GPUs.

Index

Constants

View Source
const (
	StateNameBadEnvs = "bad_envs"

	StateKeyUtilizationData           = "data"
	StateKeyUtilizationEncoding       = "encoding"
	StateValueUtilizationEncodingJSON = "json"
)

Variables

This section is empty.

Functions

func New

Types

type Config

type Config struct {
	Query query_config.Config `json:"query"`
}

func ParseConfig

func ParseConfig(b any, db *sql.DB) (*Config, error)

func (Config) Validate

func (cfg Config) Validate() error

type Output

type Output struct {
	// FoundBadEnvsForCUDA is a map of environment variables that are known to hurt CUDA.
	// that is set globally for the host.
	// This implements "DCGM_FR_BAD_CUDA_ENV" logic in DCGM.
	FoundBadEnvsForCUDA map[string]string `json:"found_bad_envs_for_cuda"`
}

func ParseOutputJSON

func ParseOutputJSON(data []byte) (*Output, error)

func ParseStateBadEnvs

func ParseStateBadEnvs(m map[string]string) (*Output, error)

func ParseStatesToOutput

func ParseStatesToOutput(states ...components.State) (*Output, error)

func ToOutput

func ToOutput(i *nvidia_query.Output) *Output

ToOutput converts nvidia_query.Output to Output. It returns an empty non-nil object, if the input or the required field is nil (e.g., i.SMI).

func (*Output) JSON

func (o *Output) JSON() ([]byte, error)

func (*Output) States

func (o *Output) States() ([]components.State, error)

Directories

Path Synopsis
Package id defines the ID for the bad-envs check.
Package id defines the ID for the bad-envs check.

Jump to

Keyboard shortcuts

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