process

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventStream

func NewEventStream() (*stream.Stream, error)

NewEventStream creates a new system-wide process event stream.

func NewEventStreamForCgroup

func NewEventStreamForCgroup(name string) (*stream.Stream, error)

NewEventStreamForCgroup creates a new process event stream for the cgroup of the given name. The named cgroup must exist under /sys/fs/cgroup/perf_event.

func NewEventStreamForPid

func NewEventStreamForPid(pid int) (*stream.Stream, error)

NewEventStreamForPid creates a new process event stream rooted at the process with the given pid.

func NewEventStreamForPidAndCPU

func NewEventStreamForPidAndCPU(pid int, cpu int) (*stream.Stream, error)

NewEventStreamForPidAndCPU creates a new process event stream for the specified pid and cpu numbers. When run from within a container, the process events for processes within a container contain the host process ids.

Types

type Event

type Event struct {
	Pid          int32
	State        State
	Counter      uint64
	ForkPid      int32
	ExecFilename string
	ExitStatus   uint64
}

Event represents a process event

type State

type State uint

State represents the state of a process

const (
	ProcessFork State
	ProcessExec
	ProcessExit
)

Jump to

Keyboard shortcuts

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