proc

package
v0.0.0-...-8ada299 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mem

func Mem(pid int) (*os.File, error)

func ProcStat

func ProcStat(pid int) (os.FileInfo, error)

func ReadAuxv

func ReadAuxv(pid int) ([]byte, error)

func ReadCmdline

func ReadCmdline(pid int) ([]byte, error)

func Tasks

func Tasks(pid int) ([]int, error)

Types

type Perm

type Perm int
const (
	PermR Perm = 1 << iota
	PermW
	PermX
	PermS
	PermP
)

type Smap

type Smap struct {
	Start    uint64
	End      uint64
	Perms    Perm
	Offset   uint32
	Dev      string
	Inode    uint32
	Pathname string

	Data map[string]string
}

func ReadSmaps

func ReadSmaps(pid int) ([]*Smap, error)

func (*Smap) HasVMFlag

func (smap *Smap) HasVMFlag(flag string) bool

type Stat

type Stat struct {
	Pid                 int32
	Comm                string
	State               byte
	Ppid                int32
	Pgrp                int32
	Session             int32
	TtyNr               int32
	Tpgid               int32
	Flags               uint32
	Minflt              uint64
	Cminflt             uint64
	Majflt              uint64
	Cmajflt             uint64
	Utime               uint64
	Stime               uint64
	Cutime              int64
	Cstime              int64
	Priority            int64
	Nice                int64
	NumThreads          int64
	Itrealvalue         int64
	Starttime           uint64
	Vsize               uint64
	Rss                 int64
	Rsslim              uint64
	Startcode           uint64
	Endcode             uint64
	Startstack          uint64
	Kstkesp             uint64
	Kstkeip             uint64
	Signal              uint64
	Blocked             uint64
	Sigignore           uint64
	Sigcatch            uint64
	Wchan               uint64
	Nswap               uint64
	Cnswap              uint64
	ExitSignal          int32
	Processor           int32
	RtPriority          uint32
	Policy              uint32
	DelayacctBlkioTicks uint64
	GuestTime           uint64
	CguestTime          int64
	StartData           uint64
	EndData             uint64
	StartBrk            uint64
	ArgStart            uint64
	ArgEnd              uint64
	EnvStart            uint64
	EnvEnd              uint64
	ExitCode            int32
}

func ReadStat

func ReadStat(pid, tid int) (*Stat, error)

Jump to

Keyboard shortcuts

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