process

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Process  string
	Pid      int64
	Name     string
	PPid     int64
	PGrp     int64
	Session  int64
	Utime    int64
	Stime    int64
	CUtime   int64
	CStime   int64
	Priority int64
	Nice     int64
	Threads  int64
	Start    int64
	Vsize    int64
	RSS      int64
	State    State
}

Info describes the information of a running process

func GetInfo

func GetInfo(pid int) (*Info, error)

GetInfo retrieve process info from /proc

type State

type State rune

State describes the state of a process

const (
	// Running state
	Running State = 'R'
	// Sleeping state
	Sleeping State = 'S'
	// Waiting state
	Waiting State = 'D'
	// Zombie state
	Zombie State = 'Z'
	// Stopped state
	Stopped State = 'T'
	// TracingStop state
	TracingStop State = 't'
	// Dead state
	Dead State = 'X'
)

Jump to

Keyboard shortcuts

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