Documentation
¶
Index ¶
Constants ¶
View Source
const ( PID = "pid" Name = "name" PPID = "ppid" Cmdline = "cmdline" Threads = "threads" CPUUsage = "process_cpu_usage_percent" MemoryUsage = "process_memory_usage_bytes" OpenFilesCount = "open_files_count" )
We use these keys in node metadata
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CachingWalker ¶
type CachingWalker struct {
// contains filtered or unexported fields
}
CachingWalker is a walker than caches a copy of the output from another Walker, and then allows other concurrent readers to Walk that copy.
func NewCachingWalker ¶
func NewCachingWalker(source Walker) *CachingWalker
NewCachingWalker returns a new CachingWalker
func (*CachingWalker) Name ¶ added in v0.10.0
func (*CachingWalker) Name() string
Name of this ticker, for metrics gathering
func (*CachingWalker) Tick ¶
func (c *CachingWalker) Tick() error
Tick updates cached copy of process list
func (*CachingWalker) Walk ¶
func (c *CachingWalker) Walk(f func(Process, Process)) error
Walk walks a cached copy of process list
type Jiffies ¶ added in v0.12.0
Jiffies is the type for the function used to fetch the elapsed jiffies.
type Process ¶
type Process struct {
PID, PPID int
Name string
Cmdline string
Threads int
Jiffies uint64
RSSBytes uint64
OpenFilesCount int
}
Process represents a single process.
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter generates Reports containing the Process topology.
func NewReporter ¶
NewReporter makes a new Reporter.
func (Reporter) Name ¶ added in v0.10.0
Name of this reporter, for metrics gathering
type Tree ¶
Tree represents all processes on the machine.
Source Files
¶
- cache.go
- reporter.go
- tree.go
- walker.go
- walker_linux.go
Click to show internal directories.
Click to hide internal directories.