# Functions

No description provided by the author
No description provided by the author
GetInfoForPid fetches and parses the process information of the process identified by pid from /proc/[PID]/stat.
GetPIDState returns the state of a given PID It will return ErrProcNotExist if the process was not found.
GetProcCPUPercentage returns the percentage of total CPU time consumed by the process during the period between the given samples.
GetProcMemPercentage returns process memory usage as a percent of total memory usage.
GetSelfPid returns the process we're running as.
ListStates is a wrapper that returns a list of processess with only the basic PID info filled out.
No description provided by the author

# Variables

Dead state, on linux this is both "x" and "X".
DiskSleep is uninterruptible disk sleep.
ErrProcNotExist indicates that a process was not found.
Idle state.
Parked is a linux state.
PidStates is a Map of all pid states, mostly applicable to linux.
Running state.
Sleeping state.
Stopped state.
Unknown state.
WakeKill is a linux state only found on kernels 2.6.33-3.13.
Waking is a linux state only found on kernels 2.6.33-3.13.
Zombie state.

# Structs

CgroupPctStats stores rendered percent values from cgroup CPU data.
CPUTicks is a formatting wrapper for `tick` metric values.
CPUTotal is the struct for cpu.total metrics.
IncludeTopConfig is the configuration for the "top N processes filtering" feature.
MemBytePct is the formatting struct for wrapping pct/byte metrics.
No description provided by the author
NonFatalErr is returned when there was an error collecting metrics, however the metrics already gathered and returned are still valid.
No description provided by the author
ProcCPUInfo is the main struct for CPU metrics.
ProcessRoot wraps the process metrics for the root ECS fields.
ProcFDInfo is the struct for process.fd metrics.
ProcIOInfo is the struct for I/O counters from /proc/[pid]/io.
ProcLimits wraps the fd.limit metrics.
ProcMemInfo is the struct for cpu.memory metrics.
ProcState is the main struct for process information and metrics.
ProcStateRootEvent represents the "root" beat/agent ECS event fields that are copied from the integration-level event.
ProcsTrack is a thread-safe wrapper for a process Stat object's internal map of processes.
No description provided by the author
Stats stores the stats of processes on the host.

# Type aliases

PidState are the constants for various PID states.
ProcCallback is a function that FetchPid* methods can call at various points to do OS-agnostic processing.
ProcsMap is a convenience wrapper for the oft-used idiom of map[int]ProcState.