procstats

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUTimeStat

type CPUTimeStat struct {
	sync.RWMutex
	PrevIdleTime       []uint64
	PrevTotalTime      []uint64
	CurIdleTime        []uint64
	CurTotalTime       []uint64
	DeltaIdleTime      []uint64
	DeltaTotalTime     []uint64
	CPUUsage           []float64
	IsGetCPUUsageBegin bool
}

CPUTimeStat is used to calculate the CPU usage.

func (*CPUTimeStat) GetCPUTimeStat

func (t *CPUTimeStat) GetCPUTimeStat() error

GetCPUTimeStat calculates CPU usage by using the CPU time statistics from /proc/stat

Jump to

Keyboard shortcuts

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