procs

package
v2.9.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcConfig

type ProcConfig struct {
	Process     string `config:"process"`
	CmdlineGrep string `config:"cmdline_grep"`
}

type ProcessesWatcher

type ProcessesWatcher struct {
	// contains filtered or unexported fields
}
var ProcWatcher ProcessesWatcher

func (*ProcessesWatcher) FindProcessesTuple

func (proc *ProcessesWatcher) FindProcessesTuple(tuple *common.IPPortTuple, transport applayer.Transport) (procTuple *common.CmdlineTuple)

FindProcessesTuple looks up local process information for the source and destination addresses of a tuple for the given transport protocol

func (*ProcessesWatcher) FindProcessesTupleTCP

func (proc *ProcessesWatcher) FindProcessesTupleTCP(tuple *common.IPPortTuple) (procTuple *common.CmdlineTuple)

FindProcessesTupleTCP looks up local process information for the source and destination addresses of TCP tuple

func (*ProcessesWatcher) FindProcessesTupleUDP

func (proc *ProcessesWatcher) FindProcessesTupleUDP(tuple *common.IPPortTuple) (procTuple *common.CmdlineTuple)

FindProcessesTupleUDP looks up local process information for the source and destination addresses of UDP tuple

func (*ProcessesWatcher) GetLocalIPs

func (proc *ProcessesWatcher) GetLocalIPs() ([]net.IP, error)

GetLocalIPs returns the list of local addresses.

func (*ProcessesWatcher) GetLocalPortToPIDMapping

func (proc *ProcessesWatcher) GetLocalPortToPIDMapping(transport applayer.Transport) (ports map[uint16]int, err error)

GetLocalPortToPIDMapping returns the list of local port numbers and the PID that owns them.

func (*ProcessesWatcher) GetProcessCommandLine

func (proc *ProcessesWatcher) GetProcessCommandLine(pid int) (cmdLine string)

GetProcessCommandLine returns the command line for a given process.

func (*ProcessesWatcher) Init

func (proc *ProcessesWatcher) Init(config ProcsConfig) error

type ProcsConfig

type ProcsConfig struct {
	Enabled         bool          `config:"enabled"`
	MaxProcReadFreq time.Duration `config:"max_proc_read_freq"`
	Monitored       []ProcConfig  `config:"monitored"`
	RefreshPidsFreq time.Duration `config:"refresh_pids_freq"`
}

Jump to

Keyboard shortcuts

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