loadavg

package
v0.0.0-...-63a22fc Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package loadavg tries to demistify the load averages on Linux Kernel implementation: https://github.com/torvalds/linux/blob/master/kernel/sched/loadavg.c Helpful blog post: https://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadAverageProbe

type LoadAverageProbe struct {
	L *procfs.LoadAvg
}

func NewLoadAverage

func NewLoadAverage(p LoadAvgProvider) (*LoadAverageProbe, error)

NewLoadAverage reads the load average data and returns its representation

func (*LoadAverageProbe) Analysis

func (la *LoadAverageProbe) Analysis() (observations []*analysis.Observation)

func (*LoadAverageProbe) Display

func (la *LoadAverageProbe) Display() string

type LoadAvgProvider

type LoadAvgProvider interface {
	LoadAvg() (*procfs.LoadAvg, error)
}

Jump to

Keyboard shortcuts

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