Documentation
¶
Overview ¶
Package cpu collects CPU metrics from the host OS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CPU ¶
type CPU struct {
CpuPerCore bool
LastCpuTimes *CpuTimes
LastCpuTimesList []CpuTimes
CpuTicks bool
Cores int
}
func (*CPU) AddCpuPercentage ¶
func (*CPU) AddCpuPercentageList ¶
type CpuTimes ¶
type CpuTimes struct {
sigar.Cpu
UserPercent float64 `json:"user_p"`
SystemPercent float64 `json:"system_p"`
IdlePercent float64 `json:"idle_p"`
IOwaitPercent float64 `json:"iowait_p"`
IrqPercent float64 `json:"irq_p"`
NicePercent float64 `json:"nice_p"`
SoftIrqPercent float64 `json:"softirq_p"`
StealPercent float64 `json:"steal_p"`
}
func GetCpuPercentage ¶
func GetCpuPercentageList ¶
func GetCpuTimes ¶
func GetCpuTimesList ¶
Click to show internal directories.
Click to hide internal directories.