pressure

package
v0.0.0-...-9186480 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentIOPressure

func CurrentIOPressure() (some *Pressure, full *Pressure, err error)

CurrentIOPressure reads /proc/pressure/io and returns a Pressure struct representing its output

func CurrentMemoryPressure

func CurrentMemoryPressure() (some *Pressure, full *Pressure, err error)

CurrentMemoryPressure reads /proc/pressure/memory and returns a Pressure struct representing its output

Types

type AllPressures

type AllPressures struct {
	CPU    CPUPressure
	IO     IOPressure
	Memory MemoryPressure
}

func CurrentAllPressures

func CurrentAllPressures() (*AllPressures, error)

type CPUPressure

type CPUPressure struct {
	SomePressure Pressure
}

type IOPressure

type IOPressure struct {
	SomePressure Pressure
	FullPressure Pressure
}

type MemoryPressure

type MemoryPressure struct {
	SomePressure Pressure
	FullPressure Pressure
}

type Pressure

type Pressure struct {
	Avg10  float64
	Avg60  float64
	Avg300 float64
	Total  int64
}

func CurrentCPUPressure

func CurrentCPUPressure() (some *Pressure, err error)

CurrentCPUPressure reads /proc/pressure/cpu and returns a Pressure struct representing its output

Jump to

Keyboard shortcuts

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