Documentation ¶
Overview ¶
Package cpustats handles the processing of information about kernel activity, /proc/stat. The first CPUStats.CPU element aggregates the values for all other CPU elements. The values are aggregated since system boot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CLK_TCK int32 // the ticks per clock cycle
Functions ¶
func NewTicker ¶
NewTicker returns a new Ticker containing a Data channel that delivers the data at intervals and an error channel that delivers any errors encountered. Stop the ticker to signal the ticker to stop running. Stopping the ticker does not close the Data channel; call Close to close both the ticker and the data channel.
Types ¶
type CPU ¶
type CPU struct { ID string `json:"ID"` User int64 `json:"user"` Nice int64 `json:"nice"` System int64 `json:"system"` Idle int64 `json:"idle"` IOWait int64 `json:"io_wait"` IRQ int64 `json:"irq"` SoftIRQ int64 `json:"soft_irq"` Steal int64 `json:"steal"` Quest int64 `json:"quest"` QuestNice int64 `json:"quest_nice"` }
CPU holds the stats for a single CPU entry in the /proc/stat file.
type CPUStats ¶
type CPUStats struct { ClkTck int16 `json:"clk_tck"` Timestamp int64 `json:"timestamp"` Ctxt int64 `json:"ctxt"` BTime int64 `json:"btime"` Processes int64 `json:"processes"` CPU []CPU `json:"cpu"` }
CPUStats holds the kernel activity information; /proc/stat. The first CPU element's values are the aggregates of all other CPU elements. The stats are aggregated from sytem boot.
Directories ¶
Path | Synopsis |
---|---|
Package cpustats handles Flatbuffer based processing of kernel activity, /proc/stat.
|
Package cpustats handles Flatbuffer based processing of kernel activity, /proc/stat. |
Package cpustats handles JSON based processing of kernel activity, /proc/stat.
|
Package cpustats handles JSON based processing of kernel activity, /proc/stat. |