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) GetSwap() (Swap, error)
- type Cpu
- type CpuList
- type FileSystem
- type FileSystemList
- type FileSystemUsage
- type LoadAverage
- type Mem
- type ProcArgs
- 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 = '?' )
Variables ¶
View Source
var Procd 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) 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 ProcMem ¶
type ProcState ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.