ps

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultDescriptors is the `ps -ef` compatible default format.
	DefaultDescriptors = []string{"user", "pid", "ppid", "pcpu", "etime", "tty", "time", "args"}

	// ErrUnknownDescriptor is returned when an unknown descriptor is parsed.
	ErrUnknownDescriptor = errors.New("unknown descriptor")
)

Functions

func JoinNamespaceAndProcessInfo

func JoinNamespaceAndProcessInfo(pid string, descriptors []string) ([][]string, error)

func JoinNamespaceAndProcessInfoByPids

func JoinNamespaceAndProcessInfoByPids(pids []string, descriptors []string) ([][]string, error)

func JoinNamespaceAndProcessInfoByPidsWithOptions

func JoinNamespaceAndProcessInfoByPidsWithOptions(pids []string, descriptors []string, options *JoinNamespaceOpts) ([][]string, error)

func JoinNamespaceAndProcessInfoWithOptions

func JoinNamespaceAndProcessInfoWithOptions(pid string, descriptors []string, options *JoinNamespaceOpts) ([][]string, error)

func ListDescriptors

func ListDescriptors() (list []string)

func ProcessInfo

func ProcessInfo(descriptors []string) ([][]string, error)

func ProcessInfoByPids

func ProcessInfoByPids(pids []string, descriptors []string) ([][]string, error)

Types

type IDMap

type IDMap struct {
	ContainerID int
	HostID      int
	Size        int
}

type JoinNamespaceOpts

type JoinNamespaceOpts struct {
	UIDMap       []IDMap
	GIDMap       []IDMap
	FillMappings bool
}

Directories

Path Synopsis
internal
cap
dev

Jump to

Keyboard shortcuts

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