process

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InputProcess

type InputProcess struct {
	MaxIdentifierLength int               // The maximum length for the process identifier ,such as CMD and CWD.
	MaxProcessCount     int               // The maximum count of the processes.
	TopNCPU             int               // The number of the selected processes that order by the CPU usage.
	TopNMem             int               // The number of the selected processes that order by the Memory usage.
	MinCPULimitPercent  float64           // The minimum CPU percentage for collecting.
	MinMemoryLimitKB    int               // The minimum Memory usage for collecting.
	ProcessNamesRegex   []string          // The regular expressions for matching processes.
	Labels              map[string]string // The user custom labels.
	// The optional metric switches
	OpenFD bool
	Thread bool
	NetIO  bool
	IO     bool
	// contains filtered or unexported fields
}

InputProcess plugin is modified with care, because two collect libs are used, which are procfs and gopsutil. They are works well on the host machine. But on the linux virtual environment, they are different. The procfs or read proc file system should mount the `logtail_host` path, more details please see `helper.mount_others.go`. The gopsutil lib only support mount path with ENV config, more details please see `github.com/shirou/gopsutil/internal/common/common.go`.

func (*InputProcess) Collect

func (ip *InputProcess) Collect(collector ilogtail.Collector) error

func (*InputProcess) Description

func (ip *InputProcess) Description() string

func (*InputProcess) Init

func (ip *InputProcess) Init(context ilogtail.Context) (int, error)

Jump to

Keyboard shortcuts

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