processes

package
v0.52.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package processes regroups collecting information about running processes.

Package processes regroups collecting information about existing processes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info added in v0.49.0

type Info []ProcessGroup

Info represents a list of process groups

func CollectInfo added in v0.49.0

func CollectInfo() (Info, error)

CollectInfo returns a list of process groups information or an error

func (Info) AsJSON added in v0.49.0

func (processGroups Info) AsJSON() (interface{}, []string, error)

AsJSON collects the processes information. Returns an object which can be converted to a JSON or an error if nothing could be collected. Tries to collect as much information as possible.

type ProcessField

type ProcessField [7]interface{}

ProcessField is an untyped representation of a process group, compatible with the legacy "processes" resource check.

type ProcessGroup added in v0.48.0

type ProcessGroup struct {
	// Usernames is the sorted list of usernames of running processes in that groups.
	Usernames []string
	// PctCPU is the percentage of cpu used by the group.
	PctCPU int
	// PctMem is the percentage of memory used by the group.
	PctMem float64
	// VMS is the vms of the group.
	VMS uint64
	// RSS is the RSS used by the group.
	RSS uint64
	// Name is the name of the group.
	Name string
	// Pids is the list of pids in the group.
	Pids []int32
}

ProcessGroup represents the information about a single process group

Directories

Path Synopsis
Package gops extracts the information on running processes from gopsutil
Package gops extracts the information on running processes from gopsutil

Jump to

Keyboard shortcuts

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