peermem

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 15 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"
)

Variables

This section is empty.

Functions

func HasPeermemInvalidContext added in v0.4.4

func HasPeermemInvalidContext(line string) bool

func Match added in v0.4.4

func Match(line string) (eventName string, message string)

Types

type Output

type Output struct {
	// Represents the number of GPUs in the system.
	// This is used to determine if ibcore may be expected to use peermem module.
	GPUCount int `json:"gpu_count"`

	ProductName  string                           `json:"product_name"`
	LsmodPeermem peermem.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

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

Jump to

Keyboard shortcuts

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