Help us shape the future of Go! Take the 2026 Go Developer Survey

process

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func NewMappingFileCache

func NewMappingFileCache(logger log.Logger) *mappingFileCache

Types

type Map

type Map struct {
	PID     int
	Mapping *profile.Mapping
}

type Mapping

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

func NewMapping

func NewMapping(cache MappingCache) *Mapping

func (*Mapping) MappingsForPID

func (m *Mapping) MappingsForPID(pid int) []*profile.Mapping

func (*Mapping) MapsForPID

func (m *Mapping) MapsForPID(pid int) []Map

func (*Mapping) PIDAddrMapping

func (m *Mapping) PIDAddrMapping(pid int, addr uint64) (*profile.Mapping, error)

type MappingCache

type MappingCache interface {
	MappingForPID(pid int) ([]*profile.Mapping, error)
}

type Tree added in v0.13.0

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

func NewTree added in v0.13.0

func NewTree(
	logger log.Logger,
	procfs procfs.FS,
	maxUpdateInterval time.Duration,
) *Tree

NewTree returns a new process tree with current state of all the processes on the system.

func (*Tree) FindAllAncestorProcessIDsInSameCgroup added in v0.13.0

func (t *Tree) FindAllAncestorProcessIDsInSameCgroup(pid int) ([]int, error)

FindAllAncestorProcessIDsInSameCgroup returns all ancestor process IDs for a given PID in the same cgroup.

func (*Tree) Run added in v0.13.0

func (t *Tree) Run(ctx context.Context) error

Run starts the process tree and update it periodically.

Jump to

Keyboard shortcuts

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