modproc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProcRoot = "/proc"
)

Variables

This section is empty.

Functions

func FileKeyValue

func FileKeyValue(content, key string) string

func IDFromMap

func IDFromMap(mp string) int

IDFromMap returns the first value in uid_map and gid_map in /proc

func IDFromMapString

func IDFromMapString(mp string) string

func Proc

func Proc() string

func StatusFileIsThread

func StatusFileIsThread(status string) bool

Types

type ProcFileSystem

type ProcFileSystem struct {
	// contains filtered or unexported fields
}

func NewProcFileSystem

func NewProcFileSystem(root string) *ProcFileSystem

func (*ProcFileSystem) Contents

func (p *ProcFileSystem) Contents(file string) (string, error)

func (*ProcFileSystem) ContentsPID

func (p *ProcFileSystem) ContentsPID(pid int64, file string) (string, error)

func (*ProcFileSystem) Dir

func (p *ProcFileSystem) Dir(dir string) ([]fs.FileInfo, error)

func (*ProcFileSystem) DirPID

func (p *ProcFileSystem) DirPID(pid int64, dir string) ([]fs.FileInfo, error)
func (p *ProcFileSystem) Readlink(file string) (string, error)

func (*ProcFileSystem) ReadlinkPID

func (p *ProcFileSystem) ReadlinkPID(pid int64, file string) (string, error)

type ProcModule

type ProcModule struct {
}

func NewProcModule

func NewProcModule() *ProcModule

func (*ProcModule) Execute

func (*ProcModule) Meta

func (m *ProcModule) Meta() *module.Meta

type ProcModuleResult

type ProcModuleResult struct {
	Opendir   int
	Chdir     int
	Dent      int
	Comm      string
	Cmdline   string
	Status    string
	UID       int
	GID       int
	Username  string
	Groupname string
	User      *user.User
	Group     *user.Group
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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