processes

package
v0.0.0-...-e06cd52 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled                     bool `toml:"enabled"`
	EnableKernelTaskMonitoring  bool `toml:"enable_kerneltask_monitoring" comment:"Monitor kernel tasks identified by process group 0\nIgnored on Windows."`
	MaxNumberMonitoredProcesses uint `` /* 133-byte string literal not displayed */
}

func GetDefaultConfig

func GetDefaultConfig() Config

type ProcStat

type ProcStat struct {
	PID                    int     `json:"pid"`
	ParentPID              int     `json:"parent_pid"`
	ProcessGID             int     `json:"-"`
	Name                   string  `json:"name"`
	Cmdline                string  `json:"cmdline"`
	State                  string  `json:"state"`
	Container              string  `json:"container,omitempty"`
	CPUAverageUsagePercent float32 `json:"cpu_avg_usage_percent,omitempty"`
	RSS                    uint64  `json:"rss"` // Resident Set Size
	VMS                    uint64  `json:"vms"` // Virtual Memory Size
	MemoryUsagePercent     float32 `json:"memory_usage_percent"`
}

func GetMeasurements

func GetMeasurements(memStat *mem.VirtualMemoryStat, cfg *Config) (common.MeasurementsMap, []*ProcStat, error)

Jump to

Keyboard shortcuts

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