hwslowdown

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package hwslowdown monitors NVIDIA GPU hardware clock events of all GPUs, such as HW Slowdown events.

Index

Constants

View Source
const (
	EventNameHWSlowdown = "hw_slowdown"
	EventKeyUnixSeconds = "unix_seconds"
)
View Source
const (
	StateNameHWSlowdown = "hw_slowdown"

	StateKeyHWSlowdownData           = "data"
	StateKeyHWSlowdownEncoding       = "encoding"
	StateValueHWSlowdownEncodingJSON = "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 HWSlowdownSMI

type HWSlowdownSMI struct {
	Errors []string `json:"errors"`
}

type Output

type Output struct {
	HWSlowdownEventsNVML []nvidia_query_nvml.ClockEvents `json:"hw_slowdown_events_nvml"`
	HWSlowdownSMI        HWSlowdownSMI                   `json:"hw_slowdown_smi"`
}

func ParseOutputJSON

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

func ParseStateHWSlowdown

func ParseStateHWSlowdown(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 provides the ID for the hardware slowdown component.
Package id provides the ID for the hardware slowdown component.

Jump to

Keyboard shortcuts

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