Documentation
¶
Overview ¶
Package cpu tracks the combined usage of all CPUs (not per-CPU).
Index ¶
Constants ¶
View Source
const Name = "cpu"
Name is the ID of the CPU component.
Variables ¶
This section is empty.
Functions ¶
func HasBlockedTooLong ¶ added in v0.4.4
Returns the task name and true if the line indicates that a task is hung too long.
func HasSoftLockup ¶ added in v0.4.4
Returns the task name and true if the line indicates a CPU soft lockup.
func New ¶
func New(ctx context.Context, eventStore eventstore.Store) (components.Component, error)
Types ¶
type Cores ¶
type Cores struct {
Logical int `json:"logical"`
// contains filtered or unexported fields
}
type Usage ¶
type Usage struct {
// Used CPU in percentage.
// Parse into float64 to get the actual value.
UsedPercent string `json:"used_percent"`
// Load average for the last 1-minute, with the scale of 1.00.
// Parse into float64 to get the actual value.
LoadAvg1Min string `json:"load_avg_1min"`
// Load average for the last 5-minutes, with the scale of 1.00.
// Parse into float64 to get the actual value.
LoadAvg5Min string `json:"load_avg_5min"`
// Load average for the last 15-minutes, with the scale of 1.00.
// Parse into float64 to get the actual value.
LoadAvg15Min string `json:"load_avg_15min"`
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.