infiniband

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package infiniband monitors the infiniband status of the system. Optional, enabled if the host has NVIDIA GPUs.

Index

Constants

View Source
const (
	StateNameIbstat = "ibstat"

	StateKeyIbstatData           = "data"
	StateKeyIbstatEncoding       = "encoding"
	StateValueIbstatEncodingJSON = "json"
)
View Source
const Name = "accelerator-nvidia-infiniband"

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 {
	InfinibandClassExists bool                      `json:"infiniband_class_exists"`
	IbstatExists          bool                      `json:"ibstat_exists"`
	Ibstat                nvidia_query.IbstatOutput `json:"ibstat"`
}

func ParseOutputJSON

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

func ParseStateIbstat

func ParseStateIbstat(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)

Jump to

Keyboard shortcuts

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