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 DeviceNetworkUtilization
- type DiskStats
- type FileSystem
- type FileSystemList
- type FileSystemUsage
- type LoadAverage
- type Mem
- type NetworkUtilization
- 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 DiskStats ¶
type DiskStats struct { Major int Minor int Device string ReadRequests uint64 // Total number of reads completed successfully. ReadMerged uint64 // Adjacent read requests merged in a single req. ReadSectors uint64 // Total number of sectors read successfully. MsecRead uint64 // Total number of ms spent by all reads. WriteRequests uint64 // total number of writes completed successfully. WriteMerged uint64 // Adjacent write requests merged in a single req. WriteSectors uint64 // total number of sectors written successfully. MsecWrite uint64 // Total number of ms spent by all writes. IosInProgress uint64 // Number of actual I/O requests currently in flight. MsecTotal uint64 // Amount of time during which ios_in_progress >= 1. MsecWeightedTotal uint64 // Measure of recent I/O completion time and backlog. }
func GetDiskStats ¶
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 NetworkUtilization ¶
type NetworkUtilization map[string]DeviceNetworkUtilization
func (*NetworkUtilization) Get ¶
func (self *NetworkUtilization) Get() error
type ProcMem ¶
type ProcState ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.