proc

package
v3.0.0-rc53 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tree

func Tree(pid int) []int

Tree is pid and the ids of all its descendants, parents first, from one scan of /proc.

Types

type L

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

func All

func All() (L, error)

func ByCmdline

func ByCmdline(c []string) (L, error)

func NewList

func NewList() L

func (*L) Add

func (t *L) Add(proc T)

func (*L) AddPID

func (t *L) AddPID(pid int)

func (*L) FilterByEnv

func (t *L) FilterByEnv(key string, value string) L

func (*L) FilterByEnvList

func (t *L) FilterByEnvList(keys []string, value string) L

func (L) HasPID

func (t L) HasPID(pid int) bool

func (L) Len

func (t L) Len() int

func (L) Procs

func (t L) Procs() []T

func (L) String

func (t L) String() string

type T

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

func New

func New(pid int) T

func (T) CommandLine

func (t T) CommandLine() string

func (*T) Env

func (t *T) Env() map[string]string

func (T) Head

func (t T) Head() string

func (T) PID

func (t T) PID() int

func (T) PPID

func (t T) PPID() (int, error)

PPID is the id of the parent process, read from /proc/<pid>/stat.

func (T) Process

func (t T) Process() (*os.Process, error)

func (T) Signal

func (t T) Signal(sig os.Signal) error

func (T) String

func (t T) String() string

Jump to

Keyboard shortcuts

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