Documentation
¶
Index ¶
- type Filter
- type Instance
- type NativeFinder
- func (pg *NativeFinder) FastProcessList() ([]*process.Process, error)
- func (pg *NativeFinder) FullPattern(pattern string, filters ...Filter) ([]PID, error)
- func (pg *NativeFinder) Pattern(pattern string, filters ...Filter) ([]PID, error)
- func (pg *NativeFinder) PidFile(path string) ([]PID, error)
- func (pg *NativeFinder) UID(user string) ([]PID, error)
- type PID
- type PIDFinder
- type Proc
- type Process
- type Procstat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
func UserFilter ¶
type Instance ¶
type Instance struct { config.InstanceConfig SearchExecSubstring string `toml:"search_exec_substring"` SearchCmdlineSubstring string `toml:"search_cmdline_substring"` SearchWinService string `toml:"search_win_service"` SearchUser string `toml:"search_user"` Mode string `toml:"mode"` GatherTotal bool `toml:"gather_total"` GatherPerPid bool `toml:"gather_per_pid"` GatherMoreMetrics []string `toml:"gather_more_metrics"` // contains filtered or unexported fields }
func (*Instance) Gather ¶
func (ins *Instance) Gather(slist *types.SampleList)
type NativeFinder ¶
type NativeFinder struct { }
NativeFinder uses gopsutil to find processes
func (*NativeFinder) FastProcessList ¶
func (pg *NativeFinder) FastProcessList() ([]*process.Process, error)
func (*NativeFinder) FullPattern ¶
func (pg *NativeFinder) FullPattern(pattern string, filters ...Filter) ([]PID, error)
FullPattern matches on the command line when the process was executed
func (*NativeFinder) Pattern ¶
func (pg *NativeFinder) Pattern(pattern string, filters ...Filter) ([]PID, error)
Pattern matches on the process name
type PIDFinder ¶
type PIDFinder interface { PidFile(path string) ([]PID, error) Pattern(pattern string, filters ...Filter) ([]PID, error) UID(user string) ([]PID, error) FullPattern(path string, filters ...Filter) ([]PID, error) }
func NewNativeFinder ¶
type Process ¶
type Process interface { PID() PID Tags() map[string]string PageFaults() (*process.PageFaultsStat, error) IOCounters() (*process.IOCountersStat, error) MemoryInfo() (*process.MemoryInfoStat, error) Name() (string, error) Cmdline() (string, error) NumCtxSwitches() (*process.NumCtxSwitchesStat, error) NumFDs() (int32, error) NumThreads() (int32, error) Percent(interval time.Duration) (float64, error) MemoryPercent() (float32, error) Times() (*cpu.TimesStat, error) RlimitUsage(bool) ([]process.RlimitStat, error) Username() (string, error) CreateTime() (int64, error) Ppid() (int32, error) }
type Procstat ¶
type Procstat struct { config.PluginConfig Instances []*Instance `toml:"instances"` }
func (*Procstat) GetInstances ¶
Click to show internal directories.
Click to hide internal directories.