Documentation ¶
Index ¶
- Constants
- Variables
- func FormatPercent(percent float64) string
- func FormatSize(size uint64) string
- func IsNotImplemented(err error) bool
- type ConcreteSigar
- func (c *ConcreteSigar) CollectCpuStats(collectionInterval time.Duration) (<-chan Cpu, chan<- struct{})
- func (c *ConcreteSigar) GetFDUsage() (FDUsage, error)
- func (c *ConcreteSigar) GetFileSystemUsage(path string) (FileSystemUsage, error)
- func (c *ConcreteSigar) GetLoadAverage() (LoadAverage, error)
- func (c *ConcreteSigar) GetMem() (Mem, error)
- func (c *ConcreteSigar) GetSwap() (Swap, error)
- type Cpu
- type CpuList
- type ErrNotImplemented
- type FDUsage
- type FileSystem
- type FileSystemList
- type FileSystemUsage
- type LoadAverage
- type Mem
- type ProcArgs
- type ProcEnv
- type ProcExe
- type ProcFDUsage
- type ProcList
- type ProcMem
- type ProcState
- type ProcTime
- type RunState
- type Sigar
- type Swap
- type Uptime
Constants ¶
View Source
const ( RunStateSleep = 'S' RunStateRun = 'R' RunStateStop = 'T' RunStateZombie = 'Z' RunStateIdle = 'D' RunStateUnknown = '?' )
Variables ¶
View Source
var Procd string
Functions ¶
func FormatPercent ¶
func IsNotImplemented ¶
Types ¶
type ConcreteSigar ¶
type ConcreteSigar struct{}
func (*ConcreteSigar) CollectCpuStats ¶
func (c *ConcreteSigar) CollectCpuStats(collectionInterval time.Duration) (<-chan Cpu, chan<- struct{})
func (*ConcreteSigar) GetFDUsage ¶
func (c *ConcreteSigar) GetFDUsage() (FDUsage, error)
func (*ConcreteSigar) GetFileSystemUsage ¶
func (c *ConcreteSigar) GetFileSystemUsage(path string) (FileSystemUsage, error)
func (*ConcreteSigar) GetLoadAverage ¶
func (c *ConcreteSigar) GetLoadAverage() (LoadAverage, error)
func (*ConcreteSigar) GetMem ¶
func (c *ConcreteSigar) GetMem() (Mem, error)
func (*ConcreteSigar) GetSwap ¶
func (c *ConcreteSigar) GetSwap() (Swap, error)
type Cpu ¶
type ErrNotImplemented ¶
type ErrNotImplemented struct {
OS string
}
func (ErrNotImplemented) Error ¶
func (e ErrNotImplemented) Error() string
type FileSystem ¶
type FileSystemList ¶
type FileSystemList struct {
List []FileSystem
}
func (*FileSystemList) Get ¶
func (self *FileSystemList) Get() error
type FileSystemUsage ¶
type FileSystemUsage struct { Total uint64 Used uint64 Free uint64 Avail uint64 Files uint64 FreeFiles uint64 }
func (*FileSystemUsage) Get ¶
func (self *FileSystemUsage) Get(path string) error
func (*FileSystemUsage) UsePercent ¶
func (self *FileSystemUsage) UsePercent() float64
type LoadAverage ¶
type LoadAverage struct {
One, Five, Fifteen float64
}
func (*LoadAverage) Get ¶
func (self *LoadAverage) Get() error
type ProcFDUsage ¶
func (*ProcFDUsage) Get ¶
func (self *ProcFDUsage) Get(pid int) error
type ProcMem ¶
type ProcState ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package cgroup reads metrics and other tunable parameters associated with control groups, a Linux kernel feature for grouping tasks to track and limit resource usage.
|
Package cgroup reads metrics and other tunable parameters associated with control groups, a Linux kernel feature for grouping tasks to track and limit resource usage. |
examples
|
|
Go interface to the Linux netlink process connector.
|
Go interface to the Linux netlink process connector. |
sys
|
|
windows
Package windows contains various Windows system call.
|
Package windows contains various Windows system call. |
Click to show internal directories.
Click to hide internal directories.