cpu

package
v9.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoPreviousData = errors.New("No Previous Data")

Functions

This section is empty.

Types

type CPUStat

type CPUStat struct {
	User    uint64
	Nice    uint64
	System  uint64
	Idle    uint64
	IOWait  uint64
	IRQ     uint64
	SoftIRQ uint64
	Steal   uint64
}

func NewCPUStat

func NewCPUStat(stats string) (CPUStat, error)

type Stater

type Stater struct {
	// contains filtered or unexported fields
}

func New

func New(procStatFile io.ReadSeeker) Stater

func (*Stater) GetPercentage

func (s *Stater) GetPercentage() (int, error)

Jump to

Keyboard shortcuts

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