cpu

package
v0.0.0-...-a1d7b1b Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//pluginName namespace part
	Name = "cpu"

	// version of cpu plugin
	Version = 7
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUCollector

type CPUCollector struct {
	// contains filtered or unexported fields
}
stats - metrics per cpu read from file /proc/stat:

map ["all": map["user_jiffies": x

		"user_percentage" x
		... ]
     "0": map["user_jiffies": x
	      "user_percentage" x
	      ... ]
     "1": ... ]

func New

func New() (*CPUCollector, error)

New creates instance of interface info plugin

func (*CPUCollector) CollectMetrics

func (p *CPUCollector) CollectMetrics(mts []snap.Metric) ([]snap.Metric, error)

CollectMetrics returns list of requested metric values It returns error in case retrieval was not successful

func (*CPUCollector) GetMetricTypes

func (p *CPUCollector) GetMetricTypes(cfg snap.Config) ([]snap.Metric, error)

GetMetricTypes returns list of available metric types It returns error in case retrieval was not successful

Jump to

Keyboard shortcuts

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