unix

package
v2.0.0-...-22a6e85 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProcessNotFound = errors.New("process not found")
	ErrFieldNotFound   = errors.New("field not found")
	ErrFieldValue      = errors.New("field_value")
	ErrFileRead        = errors.New("read file")
)

Functions

This section is empty.

Types

type Process

type Process struct {
	// contains filtered or unexported fields
}

Process - identity and stats about resource usage of a process most values are simple counters; elapsedTime & cpuTotal are the exception: they are deltas

func NewProcess

func NewProcess(pid int) (*Process, error)

NewProcess - returns an initialized instance of Process if no process with *pid* exists, returns ErrProcessNotFound

func (*Process) Cmdline

func (p *Process) Cmdline() string

Cmdline - command-line vector of the process

func (*Process) CmdlineSlice

func (p *Process) CmdlineSlice() []string

CmdlineSlice - command-line slice of the process

func (*Process) Name

func (p *Process) Name() string

Name - common name of the process

func (*Process) Reload

func (p *Process) Reload() error

Reload - load or refresh stats

func (*Process) State

func (p *Process) State() string

State - state of the process

type System

type System struct {
	// contains filtered or unexported fields
}

System - provides memory size and boot time of the system

func NewSystem

func NewSystem() (*System, error)

NewSystem - creates an initialized instance of System

func (*System) Reload

func (s *System) Reload() error

Reload - refresh metrics

type Unix

type Unix struct {
	*collector.AbstractCollector
	// contains filtered or unexported fields
}

Unix - collector providing basic stats about harvest pollers @TODO - extend to monitor any user-defined process

func (*Unix) HarvestModule

func (u *Unix) HarvestModule() plugin.ModuleInfo

func (*Unix) Init

func (u *Unix) Init(a *collector.AbstractCollector) error

Init - initialize the collector

func (*Unix) PollData

func (u *Unix) PollData() (map[string]*matrix.Matrix, error)

PollData - update data cache

func (*Unix) PollInstance

func (u *Unix) PollInstance() (map[string]*matrix.Matrix, error)

PollInstance - update instance cache with running pollers

Jump to

Keyboard shortcuts

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