Versions in this module Expand all Collapse all v0 v0.9.0 Oct 20, 2021retracted Changes in this version + const DefaultClockTicks — linux/amd64 + const WorldReadable — linux/amd64 + var PageSize = uint64(os.Getpagesize()) — linux/amd64 + func ConvertAllFilledProcesses(processes map[int32]*process.FilledProcess) map[int32]*Process + func ConvertAllFilledProcessesToStats(processes map[int32]*process.FilledProcess) map[int32]*Stats + func GetUsernameForProcess(h windows.Handle) (name string, err error) — windows/amd64 + func OpenProcessHandle(pid int32) (windows.Handle, error) — windows/amd64 + func ParseCmdLineArgs(cmdline string) (res []string) — windows/amd64 + func PidExists(pid int) bool — darwin/amd64, linux/amd64 + type CPUPercentStat struct + SystemPct float64 + UserPct float64 + type CPUTimesStat struct + Guest float64 + GuestNice float64 + Idle float64 + Iowait float64 + Irq float64 + Nice float64 + Softirq float64 + Steal float64 + Stolen float64 + System float64 + Timestamp int64 + User float64 + func ConvertFromCPUStat(s cpu.TimesStat) *CPUTimesStat + func (c *CPUTimesStat) Total() float64 + type IOCountersRateStat struct + ReadBytesRate float64 + ReadRate float64 + WriteBytesRate float64 + WriteRate float64 + type IOCountersStat struct + ReadBytes int64 + ReadCount int64 + WriteBytes int64 + WriteCount int64 + func ConvertFromIOStats(s *process.IOCountersStat) *IOCountersStat + func (i *IOCountersStat) IsZeroValue() bool + type IO_COUNTERS struct — windows/amd64 + OtherOperationCount uint64 + OtherTransferCount uint64 + ReadOperationCount uint64 + ReadTransferCount uint64 + WriteOperationCount uint64 + WriteTransferCount uint64 + type MemoryInfoExStat struct + Data uint64 + Dirty uint64 + Lib uint64 + RSS uint64 + Shared uint64 + Text uint64 + VMS uint64 + func ConvertFromMemInfoEx(s *process.MemoryInfoExStat) *MemoryInfoExStat + type MemoryInfoStat struct + RSS uint64 + Swap uint64 + VMS uint64 + func ConvertFromMemInfo(s *process.MemoryInfoStat) *MemoryInfoStat + type NumCtxSwitchesStat struct + Involuntary int64 + Voluntary int64 + func ConvertFromCtxSwitches(s *process.NumCtxSwitchesStat) *NumCtxSwitchesStat + type Option func(p Probe) + func WithBootTimeRefreshInterval(bootTimeRefreshInterval time.Duration) Option + func WithPermission(enabled bool) Option + func WithReturnZeroPermStats(enabled bool) Option + type Probe interface + Close func() + ProcessesByPID func(now time.Time, collectStats bool) (map[int32]*Process, error) + StatsForPIDs func(pids []int32, now time.Time) (map[int32]*Stats, error) + StatsWithPermByPID func(pids []int32) (map[int32]*StatsWithPerm, error) + func NewProcessProbe(options ...Option) Probe + func NewWindowsToolhelpProbe() Probe + type Process struct + Cmdline []string + Cwd string + Exe string + Gids []int32 + Name string + NsPid int32 + Pid int32 + Ppid int32 + Stats *Stats + Uids []int32 + Username string + func ConvertFromFilledProcess(p *process.FilledProcess) *Process + func (p *Process) DeepCopy() *Process + type Stats struct + CPUPercent *CPUPercentStat + CPUTime *CPUTimesStat + CreateTime int64 + CtxSwitches *NumCtxSwitchesStat + IORateStat *IOCountersRateStat + IOStat *IOCountersStat + MemInfo *MemoryInfoStat + MemInfoEx *MemoryInfoExStat + Nice int32 + NumThreads int32 + OpenFdCount int32 + Status string + func ConvertFilledProcessesToStats(p *process.FilledProcess) *Stats + func (s *Stats) DeepCopy() *Stats + type StatsWithPerm struct + IOStat *IOCountersStat + OpenFdCount int32