hw

package
v0.6.22 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CpuID added in v0.1.1

func CpuID() (id string)

func CpuTemp

func CpuTemp() int

func ThermalZone

func ThermalZone(zone int) (temp int, err error)

func ThermalZoneFile

func ThermalZoneFile(zone int) string

Types

type Series added in v0.4.9

type Series[T umath.Number] struct {
	// contains filtered or unexported fields
}

func NewSeries added in v0.4.9

func NewSeries[T umath.Number](n int) *Series[T]

func (*Series[T]) Add added in v0.4.9

func (o *Series[T]) Add(v T)

func (*Series[T]) Average added in v0.4.9

func (o *Series[T]) Average() T

func (*Series[T]) Capacity added in v0.4.9

func (o *Series[T]) Capacity() int

func (*Series[T]) Empty added in v0.4.9

func (o *Series[T]) Empty() bool

func (*Series[T]) Full added in v0.4.9

func (o *Series[T]) Full() bool

func (*Series[T]) List added in v0.4.9

func (o *Series[T]) List() []T

func (*Series[T]) Size added in v0.4.9

func (o *Series[T]) Size() int

type Status added in v0.2.87

type Status struct {
	Uptime          uint64
	Temperature     int
	CpuUsedPercent  int
	RamTotal        uint64
	RamUsed         uint64
	RamUsedPercent  int
	DiskTotal       uint64
	DiskUsed        uint64
	DiskUsedPercent int
}

func GetStatus added in v0.2.87

func GetStatus() Status

func (Status) Cpu added in v0.2.87

func (o Status) Cpu() string

func (Status) Disk added in v0.2.87

func (o Status) Disk() string

func (Status) Enrich added in v0.4.9

func (o Status) Enrich() Status

func (Status) Ram added in v0.2.87

func (o Status) Ram() string

type StatusCollector added in v0.4.9

type StatusCollector struct {
	Temperature    *Series[int]
	CpuUsedPercent *Series[int]
	RamTotal       *Series[uint64]
	RamUsed        *Series[uint64]
	DiskTotal      *Series[uint64]
	DiskUsed       *Series[uint64]
}

func NewStatusCollector added in v0.4.9

func NewStatusCollector(capacity int) *StatusCollector

func (*StatusCollector) Get added in v0.4.9

func (o *StatusCollector) Get() (s Status)

func (*StatusCollector) Poll added in v0.4.9

func (o *StatusCollector) Poll() Status

Jump to

Keyboard shortcuts

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