processes

package
v0.0.0-...-63a22fc Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PIDMaxPath = "/proc/sys/kernel/pid_max"
View Source
const ProcPath = "/proc"

Variables

This section is empty.

Functions

func CountProcesses

func CountProcesses() (uint64, error)

func ReadPIDMax

func ReadPIDMax() (uint64, error)

ReadPIDMax returns the value of pid_max on the system

Types

type ProcessesProbe

type ProcessesProbe struct {
	Stat       *procfs.Stat
	TotalProcs uint64
	PIDMax     uint64
}

func NewProcessesProbe

func NewProcessesProbe(provider StatProvider) (*ProcessesProbe, error)

NewProcessesProbe provides insights into the number of processes

func (*ProcessesProbe) Analysis

func (p *ProcessesProbe) Analysis() (observations []*analysis.Observation)

func (*ProcessesProbe) Display

func (p *ProcessesProbe) Display() string

type StatProvider

type StatProvider interface {
	Stat() (procfs.Stat, error)
}

Jump to

Keyboard shortcuts

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