procx

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProcLocation       = "/proc"
	DefaultMaxPid       int64 = 65000
)
View Source
const (
	// PidPoolLimit is the limit of concurrent pids to investigate
	// concurrently. Default to 2^19 = 524288
	PidPoolLimit int = 524288
)

Variables

This section is empty.

Functions

func MaxPid

func MaxPid() int64

MaxPid will return the system specific maximum PID number

For Linux systems this can be found in proc(5) if it is mounted!

func PIDQuery

func PIDQuery(raw string) []*api.Process

PIDQuery will take an nmap like query for linux pids

PIDQuery will return ALL POSSIBLE PIDS! PIDQuery will not pull a list from /proc but rather build a list of potential pids.

func ProcListingQuery added in v1.2.1

func ProcListingQuery(raw string) []*api.Process

func ProcPath

func ProcPath() string

Types

type PidPool

type PidPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewPidPool

func NewPidPool(limit int) PidPool

func (*PidPool) Add

func (x *PidPool) Add()

func (*PidPool) Cur

func (x *PidPool) Cur() int

func (*PidPool) Sub

func (x *PidPool) Sub()

type ProcessExplorer

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

func NewProcessExplorer

func NewProcessExplorer(processes []*api.Process) *ProcessExplorer

func (*ProcessExplorer) AddModule

func (x *ProcessExplorer) AddModule(m api.ProcessExplorerModule)

func (*ProcessExplorer) Execute

func (x *ProcessExplorer) Execute() error

Execute will run the process explorer.

The function is O(m*p) where the runtime complexity grows withs the amount of modules and pids to execute.

func (*ProcessExplorer) SetEncoder

func (*ProcessExplorer) SetFast

func (x *ProcessExplorer) SetFast(f bool)

func (*ProcessExplorer) SetWriter

func (x *ProcessExplorer) SetWriter(w io.Writer)

Jump to

Keyboard shortcuts

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