package
Version:
v5.5.3+incompatible
Opens a new window with list of versions in this module.
Published: Sep 6, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package memory collects memory metrics from the host OS.
func AddMemPercentage(m *MemStat)
func AddSwapPercentage(s *SwapStat)
func GetMemoryEvent(memStat *MemStat) common.MapStr
func GetSwapEvent(swapStat *SwapStat) common.MapStr
func New(base mb.BaseMetricSet) (mb.MetricSet, error)
New is a mb.MetricSetFactory that returns a memory.MetricSet.
type MemStat struct {
sigar.Mem
UsedPercent float64 `json:"used_p"`
ActualUsedPercent float64 `json:"actual_used_p"`
}
func GetMemory() (*MemStat, error)
type MetricSet struct {
mb.BaseMetricSet
}
MetricSet for fetching system memory metrics.
func (m *MetricSet) Fetch() (event common.MapStr, err error)
Fetch fetches memory metrics from the OS.
type SwapStat struct {
sigar.Swap
UsedPercent float64 `json:"used_p"`
}
func GetSwap() (*SwapStat, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.