Documentation ¶
Index ¶
- func AddFileSystemUsedPercentage(f *FileSystemStat)
- func AddMemPercentage(m *MemStat)
- func AddSwapPercentage(s *SwapStat)
- func CollectFileSystemStats(fss []sigar.FileSystem) []common.MapStr
- func GetFileSystemList() ([]sigar.FileSystem, error)
- func GetFileSystemStats() ([]common.MapStr, error)
- func GetFilesystemEvent(fsStat *FileSystemStat) common.MapStr
- func GetMemoryEvent(memStat *MemStat) common.MapStr
- func GetProcCpuPercentage(last *Process, current *Process) float64
- func GetProcMemPercentage(proc *Process, total_phymem uint64) float64
- func GetSwapEvent(swapStat *SwapStat) common.MapStr
- func Pids() ([]int, error)
- func Round(val float64, roundOn float64, places int) (newVal float64)
- type CPU
- type CpuTimes
- type FileSystemStat
- type MemStat
- type ProcStats
- func (procStats *ProcStats) GetProcStats() ([]common.MapStr, error)
- func (procStats *ProcStats) GetProcStatsEvents() ([]common.MapStr, error)
- func (procStats *ProcStats) GetProcessEvent(process *Process, last *Process) common.MapStr
- func (procStats *ProcStats) InitProcStats() error
- func (procStats *ProcStats) MatchProcess(name string) bool
- type Process
- type ProcsMap
- type SwapStat
- type SystemLoad
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFileSystemUsedPercentage ¶
func AddFileSystemUsedPercentage(f *FileSystemStat)
func AddMemPercentage ¶
func AddMemPercentage(m *MemStat)
func AddSwapPercentage ¶
func AddSwapPercentage(s *SwapStat)
func CollectFileSystemStats ¶
func CollectFileSystemStats(fss []sigar.FileSystem) []common.MapStr
func GetFileSystemList ¶
func GetFileSystemList() ([]sigar.FileSystem, error)
func GetFileSystemStats ¶
func GetFilesystemEvent ¶
func GetFilesystemEvent(fsStat *FileSystemStat) common.MapStr
func GetMemoryEvent ¶
func GetProcCpuPercentage ¶
func GetProcMemPercentage ¶
func GetSwapEvent ¶
Types ¶
type CPU ¶
type CPU struct { CpuPerCore bool LastCpuTimes *CpuTimes LastCpuTimesList []CpuTimes CpuTicks bool }
func (*CPU) AddCpuPercentage ¶
func (*CPU) AddCpuPercentageList ¶
type CpuTimes ¶
type CpuTimes struct { sigar.Cpu UserPercent float64 `json:"user_p"` SystemPercent float64 `json:"system_p"` IdlePercent float64 `json:"idle_p"` IOwaitPercent float64 `json:"iowait_p"` IrqPercent float64 `json:"irq_p"` NicePercent float64 `json:"nice_p"` SoftIrqPercent float64 `json:"softirq_p"` StealPercent float64 `json:"steal_p"` }
func GetCpuPercentage ¶
func GetCpuPercentageList ¶
func GetCpuTimes ¶
func GetCpuTimesList ¶
type FileSystemStat ¶
type FileSystemStat struct { sigar.FileSystemUsage DevName string `json:"device_name"` Mount string `json:"mount_point"` UsedPercent float64 `json:"used_p"` // contains filtered or unexported fields }
func GetFileSystemStat ¶
func GetFileSystemStat(fs sigar.FileSystem) (*FileSystemStat, error)
type MemStat ¶
type ProcStats ¶
type ProcStats struct { ProcStats bool Procs []string ProcsMap ProcsMap CpuTicks bool // contains filtered or unexported fields }
func (*ProcStats) GetProcStats ¶
func (*ProcStats) GetProcStatsEvents ¶
func (*ProcStats) GetProcessEvent ¶
func (*ProcStats) InitProcStats ¶
func (*ProcStats) MatchProcess ¶
type SystemLoad ¶
type SystemLoad struct { Load1 float64 `json:"load1"` Load5 float64 `json:"load5"` Load15 float64 `json:"load15"` }
func GetSystemLoad ¶
func GetSystemLoad() (*SystemLoad, error)
Click to show internal directories.
Click to hide internal directories.