Documentation ¶
Index ¶
Constants ¶
View Source
const NO_VALUE = 4294967295
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Meminfo ¶
type Meminfo struct { MemTotal int64 MemFree int64 Buffers int64 Cached int64 SwapCached int64 Active int64 Inactive int64 HighTotal int64 HighFree int64 LowTotal int64 LowFree int64 SwapTotal int64 SwapFree int64 Dirty int64 Writeback int64 AnonPages int64 Mapped int64 Slab int64 SReclaimable int64 SUnreclaim int64 PageTables int64 NFS_Unstable int64 Bounce int64 WritebackTmp int64 CommitLimit int64 Committed_AS int64 VmallocTotal int64 VmallocUsed int64 VmallocChunk int64 AnonHugePages int64 }
Meminfo is a parser for /proc/meminfo.
func NewMeminfo ¶
NewMeminfo() creates a new Meminfo object that loads from /proc/meminfo.
func ParseMeminfo ¶
ParseMeminfo() loads a Meminfo object from a supplied path string.
If the path cannot be found, it will return an error.
type Process ¶
type Process struct { Pid int // Process ID Environ map[string]string // Environment variables Cmdline []string // Command line of process (argv array) Cwd string // Process current working directory Exe string // Symlink to executed command. Root string // Per-process root (e.g. chroot) // contains filtered or unexported fields }
Process describes a /proc/<pid> entry
func NewProcess ¶
Read /proc information for `pid`
func NewProcessFromPath ¶
Read a process entry from a directory path
if lazy = true, then preload the stat, limits, and other files.
Directories ¶
Path | Synopsis |
---|---|
limits.Limits describes data in /proc/<pid>/limits.
|
limits.Limits describes data in /proc/<pid>/limits. |
stat.Stat describes data in /proc/<pid>/stat.
|
stat.Stat describes data in /proc/<pid>/stat. |
statm.Statm describes data in /proc/<pid>/statm.
|
statm.Statm describes data in /proc/<pid>/statm. |
status.Status describes select data in /proc/<pid>/status.
|
status.Status describes select data in /proc/<pid>/status. |
Click to show internal directories.
Click to hide internal directories.