linux

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUUsageGenerator added in v0.14.1

type CPUUsageGenerator struct {
	Interval time.Duration
}

CPUUsageGenerator generates CPU metric values

func (*CPUUsageGenerator) Generate added in v0.14.1

func (g *CPUUsageGenerator) Generate() (metrics.Values, error)

Generate CPU metric values

type DiskGenerator

type DiskGenerator struct {
	IgnoreRegexp  *regexp.Regexp
	Interval      time.Duration
	UseMountpoint bool
}

DiskGenerator XXX

func (*DiskGenerator) Generate

func (g *DiskGenerator) Generate() (metrics.Values, error)

Generate XXX

type MemoryGenerator

type MemoryGenerator struct {
}

MemoryGenerator collect memory usage

`memory.{metric}`: using memory size[KiB] retrieved from /proc/meminfo

metric = "total", "free", "buffers", "cached", "swap_cached", "swap_total", "swap_free"

Metrics "used" is calculated by

(total - available) when MemAvailable is available in /proc/meminfo and
(total - free - buffers - cached) otherwise

graph: stacks `memory.{metric}`

func (*MemoryGenerator) Generate

func (g *MemoryGenerator) Generate() (metrics.Values, error)

Generate memory values

Jump to

Keyboard shortcuts

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