proc

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: GPL-2.0, GPL-2.0-or-later Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(l Loader) load

usage: proc.Load(INTERFACE).FromFile(NAME)

Types

type Loader

type Loader interface {
	Load(io.Reader) error
}

type Stat

type Stat struct {
	Pid     int    // %d
	Comm    string // %s
	State   string // %c
	Ppid    int    // %d
	Pgrp    int    // %d
	Session int    // %d
	TtyNr   uint   // %d
	Tpgid   int    // %d
	Flags   uint   // %u
	MinFlt  uint64 // %lu
	CminFlt uint64 // %lu
	MajFlt  uint64 // %lu
	CmajFlt uint64 // %lu

	Utime  time.Duration // %lu
	Stime  time.Duration // %lu
	Cutime time.Duration // %ld
	Cstime time.Duration // %ld

	Priority    int64 // %ld
	Nice        int64 // %ld
	NumThreads  int64 // %ld
	ItRealValue int64 // %ld

	StartTime time.Time // %llu

	Vsize      uint64 // %lu
	Rss        int64  // %ld
	RssLim     uint64 // %lu
	StartCode  uint64 // %lu
	EndCode    uint64 // %lu
	StartStack uint64 // %lu
	KstkESP    uint64 // %lu
	KstkEIP    uint64 // %lu
	Signal     uint64 // %lu
	Blocked    uint64 // %lu
	SigIgnore  uint64 // %lu
	SigCatch   uint64 // %lu
	Wchan      uint64 // %lu
	Nswap      uint64 // %lu
	Cnswap     uint64 // %lu
	ExitSignal int    // %d (since Linux 2.1.22)
	Processor  int    // %d (since Linux 2.2.8)
	RtPriority uint   // %u (since Linux 2.5.19)
	Policy     uint   // %u (since Linux 2.5.19)

	DelayAcctBlkioTicks uint64 // %llu (since Linux 2.6.18)

	GuestTime  uint64 // %lu (since Linux 2.6.24)
	CguestTime uint64 // %ld (since Linux 2.6.24)
	StartData  uint64 // %lu (since Linux 3.3)
	EndData    uint64 // %lu (since Linux 3.3)
	StartBrk   uint64 // %lu (since Linux 3.3)
	ArgStart   uint64 // %lu (since Linux 3.5)
	ArgEnd     uint64 // %lu (since Linux 3.5)
	EnvStart   uint64 // %lu (since Linux 3.5)
	EnvEnd     uint64 // %lu (since Linux 3.5)
	ExitCode   int    // %d (since Linux 3.5)
}

Linux /proc/<PID|"self">/stat

func (*Stat) Load

func (p *Stat) Load(r io.Reader) error

type Statm

type Statm struct {
	Size, Resident, Share, Text, Lib, Data, Dt uint64
}

Linux /proc/<PID|"self">/statm

func (*Statm) Load

func (p *Statm) Load(r io.Reader) error

type Status

type Status map[string]string

Linux /proc/<PID|"self">/status

func (Status) Load

func (m Status) Load(r io.Reader) error

Jump to

Keyboard shortcuts

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