Documentation ¶
Index ¶
- Constants
- Variables
- func FormatPercent(percent float64) string
- func FormatSize(size uint64) string
- type ConcreteSigar
- func (c *ConcreteSigar) CollectCpuStats(collectionInterval time.Duration) (<-chan Cpu, chan<- struct{})
- func (c *ConcreteSigar) GetFileSystemUsage(path string) (FileSystemUsage, error)
- func (c *ConcreteSigar) GetLoadAverage() (LoadAverage, error)
- func (c *ConcreteSigar) GetMem() (Mem, error)
- func (c *ConcreteSigar) GetMemIgnoringCGroups() (Mem, error)
- func (c *ConcreteSigar) GetSwap() (Swap, error)
- type Cpu
- type CpuList
- type FileSystem
- type FileSystemList
- type FileSystemUsage
- type LoadAverage
- type Mem
- type ProcArgs
- type ProcCpu
- type ProcExe
- 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 = '?' )
View Source
const ( MaxUint64 = ^uint64(0) // UnlimitedMemorySize defines the bytes size when memory limit is not set (2 ^ 63 - 4096) UnlimitedMemorySize = "9223372036854771712" )
Variables ¶
View Source
var ErrNotImplemented = errors.New("gosigar: not implemented")
View Source
var Etcd string
View Source
var Procd string
View Source
var Sysd1 string
View Source
var Sysd2 string
Functions ¶
func FormatPercent ¶
Types ¶
type ConcreteSigar ¶
type ConcreteSigar struct{}
func (*ConcreteSigar) CollectCpuStats ¶
func (c *ConcreteSigar) CollectCpuStats(collectionInterval time.Duration) (<-chan Cpu, chan<- struct{})
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) GetMemIgnoringCGroups ¶ added in v1.3.0
func (c *ConcreteSigar) GetMemIgnoringCGroups() (Mem, error)
func (*ConcreteSigar) GetSwap ¶
func (c *ConcreteSigar) GetSwap() (Swap, error)
type Cpu ¶
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 Mem ¶
func (*Mem) GetIgnoringCGroups ¶ added in v1.3.0
type ProcCpu ¶
type ProcMem ¶
type ProcState ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.