error

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package error implements NVIDIA GPU driver error detector.

Index

Constants

View Source
const (
	Name        = "accelerator-nvidia-error"
	Description = "Tracks NVIDIA GPU errors real-time in the SMI queries -- likely requires host restarts."
)
View Source
const (
	StateNameError = "error"

	StateKeyErrorData           = "data"
	StateKeyErrorEncoding       = "encoding"
	StateValueErrorEncodingJSON = "json"
)

Variables

View Source
var Tags = []string{"nvidia", "gpu", "error"}

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 {
	Errors []string `json:"errors"`
}

func ParseOutputJSON

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

func ParseStateError

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

func ParseStatesToOutput

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

func ToOutput

func ToOutput(i *nvidia_query.Output) *Output

func (*Output) Evaluate

func (o *Output) Evaluate() (string, bool, error)

Returns the output evaluation reason and its healthy-ness.

func (*Output) JSON

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

func (*Output) States

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

Directories

Path Synopsis
Package sxid implements NVIDIA GPU SXid error monitoring..
Package sxid implements NVIDIA GPU SXid error monitoring..
Package xid implements NVIDIA GPU Xid error monitoring..
Package xid implements NVIDIA GPU Xid error monitoring..

Jump to

Keyboard shortcuts

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