Documentation ¶
Index ¶
- type NativeFinder
- func (pg *NativeFinder) FastProcessList() ([]*process.Process, error)
- func (pg *NativeFinder) FullPattern(pattern string) ([]PID, error)
- func (pg *NativeFinder) Pattern(pattern string) ([]PID, error)
- func (pg *NativeFinder) PidFile(path string) ([]PID, error)
- func (pg *NativeFinder) Uid(user string) ([]PID, error)
- type PID
- type PIDFinder
- type Pgrep
- type Proc
- type Process
- type Procstat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NativeFinder ¶ added in v1.14.0
type NativeFinder struct { }
NativeFinder uses gopsutil to find processes
func (*NativeFinder) FastProcessList ¶ added in v1.14.5
func (pg *NativeFinder) FastProcessList() ([]*process.Process, error)
func (*NativeFinder) FullPattern ¶ added in v1.14.0
func (pg *NativeFinder) FullPattern(pattern string) ([]PID, error)
FullPattern matches on the command line when the process was executed
func (*NativeFinder) Pattern ¶ added in v1.14.0
func (pg *NativeFinder) Pattern(pattern string) ([]PID, error)
Pattern matches on the process name
type PIDFinder ¶ added in v1.14.0
type PIDFinder interface { PidFile(path string) ([]PID, error) Pattern(pattern string) ([]PID, error) Uid(user string) ([]PID, error) FullPattern(path string) ([]PID, error) }
func NewNativeFinder ¶ added in v1.14.0
NewNativeFinder ...
type Pgrep ¶ added in v1.14.0
type Pgrep struct {
// contains filtered or unexported fields
}
Implementation of PIDGatherer that execs pgrep to find processes
func (*Pgrep) FullPattern ¶ added in v1.14.0
type Process ¶ added in v1.14.0
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) }
type Procstat ¶
type Procstat struct { PidFinder string `toml:"pid_finder"` PidFile string `toml:"pid_file"` Exe string Pattern string Prefix string CmdLineTag bool `toml:"cmdline_tag"` ProcessName string User string SystemdUnit string CGroup string `toml:"cgroup"` PidTag bool WinService string `toml:"win_service"` // contains filtered or unexported fields }
func (*Procstat) Description ¶
func (*Procstat) SampleConfig ¶
Click to show internal directories.
Click to hide internal directories.