Documentation ¶
Index ¶
- func FindPidsByCmdlineGrep(prefix string, process string) ([]int, error)
- func FindSocketsOfPid(prefix string, pid int) (inodes []int64, err error)
- type PortProcMapping
- type Process
- type ProcessesWatcher
- func (proc *ProcessesWatcher) FindProc(port uint16) (procname string)
- func (proc *ProcessesWatcher) FindProcessesTuple(tuple *common.IpPortTuple) (proc_tuple *common.CmdlineTuple)
- func (proc *ProcessesWatcher) Init(config *config.Procs) error
- func (proc *ProcessesWatcher) IsLocalIp(ip net.IP) bool
- func (proc *ProcessesWatcher) UpdateMap()
- func (proc *ProcessesWatcher) UpdateMappingEntry(port uint16, pid int, p *Process)
- type SocketInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindPidsByCmdlineGrep ¶
Types ¶
type PortProcMapping ¶
type Process ¶
type Process struct { Name string Grepper string Pids []int RefreshPidsTimer <-chan time.Time // contains filtered or unexported fields }
func NewProcess ¶
func (*Process) RefreshPids ¶
func (p *Process) RefreshPids()
type ProcessesWatcher ¶
type ProcessesWatcher struct { PortProcMap map[uint16]PortProcMapping LastMapUpdate time.Time Processes []*Process LocalAddrs []net.IP // config ReadFromProc bool MaxReadFreq time.Duration RefreshPidsFreq time.Duration TestSignals *chan bool // contains filtered or unexported fields }
var ProcWatcher ProcessesWatcher
func (*ProcessesWatcher) FindProc ¶
func (proc *ProcessesWatcher) FindProc(port uint16) (procname string)
func (*ProcessesWatcher) FindProcessesTuple ¶
func (proc *ProcessesWatcher) FindProcessesTuple(tuple *common.IpPortTuple) (proc_tuple *common.CmdlineTuple)
func (*ProcessesWatcher) UpdateMap ¶
func (proc *ProcessesWatcher) UpdateMap()
func (*ProcessesWatcher) UpdateMappingEntry ¶
func (proc *ProcessesWatcher) UpdateMappingEntry(port uint16, pid int, p *Process)
type SocketInfo ¶
func Parse_Proc_Net_Tcp ¶
func Parse_Proc_Net_Tcp(input io.Reader) ([]*SocketInfo, error)
Parses the /proc/net/tcp file
Click to show internal directories.
Click to hide internal directories.