peermem

package
v0.0.1-alpha9 Latest Latest
Warning

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

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

Documentation

Overview

Package peermem monitors the peermem module status. Optional, enabled if the host has NVIDIA GPUs.

Index

Constants

View Source
const (
	StateNameLsmodPeermem = "lsmod_peermem"

	StateKeyLsmodPeermemData           = "data"
	StateKeyLsmodPeermemEncoding       = "encoding"
	StateValueLsmodPeermemEncodingJSON = "json"
)
View Source
const Name = "accelerator-nvidia-peermem"

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 {
	ProductName  string                                `json:"product_name"`
	LsmodPeermem nvidia_query.LsmodPeermemModuleOutput `json:"lsmod_peermem"`
}

func ParseOutputJSON

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

func ParseStateLsmodPeermem

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