cpu

package
v0.6.0-rc.13 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

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.

View Source
const SubSystem = "cpu"

Variables

This section is empty.

Functions

func HasBlockedTooLong added in v0.4.4

func HasBlockedTooLong(line string) (string, bool)

HasBlockedTooLong returns the task name with PID and true if the line indicates that a task is hung too long.

func HasSoftLockup added in v0.4.4

func HasSoftLockup(line string) (string, bool)

HasSoftLockup returns the task name with PID and true if the line indicates a CPU soft lockup.

func Match added in v0.4.4

func Match(line string) (eventName string, message string)

func New

func New(gpudInstance *components.GPUdInstance) (components.Component, error)

Types

type Cores

type Cores struct {
	Logical int `json:"logical"`
}

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
}

Jump to

Keyboard shortcuts

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