package sensors

import "github.com/shirou/gopsutil/v4/sensors"

Index

Types

type ExLinux

type ExLinux struct{}

func NewExLinux

func NewExLinux() *ExLinux

func (*ExLinux) TemperatureWithContext

func (ex *ExLinux) TemperatureWithContext(ctx context.Context) ([]ExTemperature, error)

type ExTemperature

type ExTemperature struct {
	SensorKey string  `json:"key"`
	Min       float64 `json:"min"`     // Temperature min value.
	Lowest    float64 `json:"lowest"`  // Historical minimum temperature
	Highest   float64 `json:"highest"` // Historical maximum temperature
}

ExTemperature represents Linux dependent temperature sensor data

type TemperatureStat

type TemperatureStat struct {
	SensorKey   string  `json:"sensorKey"`
	Temperature float64 `json:"temperature"`
	High        float64 `json:"sensorHigh"`
	Critical    float64 `json:"sensorCritical"`
}

func SensorsTemperatures

func SensorsTemperatures() ([]TemperatureStat, error)

func TemperaturesWithContext

func TemperaturesWithContext(ctx context.Context) ([]TemperatureStat, error)

func (TemperatureStat) String

func (t TemperatureStat) String() string

type Warnings

type Warnings = common.Warnings

Source Files

ex_linux.go sensors.go sensors_linux.go

Version
v4.25.2 (latest)
Published
Feb 25, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
3 days ago

Tools for package owners.