package
5.4.0
Repository: https://github.com/segmentio/stats.git
Documentation: pkg.go.dev

# Functions

ParseProcCGroup parses Linux system cgroup data and returns a ProcCGroup and error, if any is encountered.
ParseProcLimits parses system process limits and returns a ProcLimits and error, if any.
ParseProcSched processes system process scheduling data and returns a ProcSched and error, if any.
ParseProcStat parses system process statistics and returns a ProcStat and error, if any.
ParseProcStatm parses system proc data and returns a ProcStatm and error, if any.
ReadCPUPeriod takes a string representing a Linux cgroup and returns the period as a time.Duration that is applied for this cgroup and an error, if any.
ReadCPUQuota takes a string representing a Linux cgroup and returns the quota as a time.Duration that is applied for this cgroup and an error, if any.
ReadCPUShares takes a string representing a Linux cgroup and returns an int64 representing the cpu shares allotted for this cgroup and an error, if any.
ReadMemoryLimit returns the memory limit and an error, if any, for a PID.
ReadOpenFileCount takes an int representing a PID and returns a uint64 representing the open file descriptor count for this process and an error, if any.
ReadProcCGroup takes an int argument representing a PID and returns a ProcCGroup and error, if any is encountered.
ReadProcLimits returns the ProcLimits and an error, if any, for a PID.
ReadProcSched returns a ProcSched and error, if any, for a PID.
ReadProcStat returns a ProcStat and error, if any, for a PID.
ReadProcStatm returns a ProcStatm and an error, if any, for a PID.

# Constants

Enumerated ProcStates.
revive:disable-next-line.
Enumerated ProcStates.
Enumerated ProcStates.
Enumerated ProcStates.
Enumerated ProcStates.
Enumerated ProcStates.
Enumerated ProcStates.
Represents Linux's unlimited for resource limits.
Enumerated ProcStates.
Enumerated ProcStates.
Enumerated ProcStates.

# Structs

CGroup holds configuration information for a Linux cgroup.
Limits holds configuration for resource limits.
ProcLimits holds Limits for processes.
ProcSched contains statistics about process scheduling, utilization, and switches.
ProcStat contains statistics associated with a process.
ProcStatm contains statistics about memory utilization of a process.

# Type aliases

ProcCGroup is a type alias for a []CGroup.
ProcState represents the underlying OS state of a process.