cpu

package
v1.0.17-pre Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUSampler

type CPUSampler struct {
	samplers.Samplers
	// contains filtered or unexported fields
}

func New

func New(s plugins.Connection, name string, group string) (*CPUSampler, error)

func (*CPUSampler) DoSample

func (p *CPUSampler) DoSample() (err error)

func (*CPUSampler) InitSampler

func (p *CPUSampler) InitSampler() (err error)

type CPUStats

type CPUStats struct {
	Name        string `column:"cpuName,sort=+num"`
	Utilisation uint64 `column:"% utilisation,format=%.2f %%"`
	User        uint64 `column:"user,format=%.2f %%"`
	Nice        uint64 `column:"nice,format=%.2f %%"`
	System      uint64 `column:"system,format=%.2f %%"`
	Idle        uint64 `column:"idle,format=%.2f %%"`
	IOWait      uint64 `column:"iowait,format=%.2f %%"`
	IRQ         uint64 `column:"irq,format=%.2f %%"`
	SoftIRQ     uint64 `column:"softirq,format=%.2f %%"`
	Steal       uint64 `column:"steal,format=%.2f %%"`
	Guest       uint64 `column:"guest,format=%.2f %%"`
	GuestNice   uint64 `column:"guest_nice,format=%.2f %%"`
}

CPUStats must be exported, along with all it's fields, so that it can be output by methods in the plugins package.

Jump to

Keyboard shortcuts

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