Documentation ¶
Index ¶
- func CalculateCpuPercent(t1, t2 *cpu.TimesStat, delta float64, numcpu int) float64
- func CheckGreaterZero(f float64) float64
- func GetMaxPerCpuPerMetric(p []PercentPerCpuPerMetric) map[string]*MaxPerCpuPerMetric
- func GetNetIfaces(onlyPrefix []string) ([]string, error)
- func GetProcessCpuInterval(p *process.Process, interval uint32) (float64, error)
- func GetProcessCpuPercentInterval(pid int32, interval uint32) (float64, error)
- func SumCpuTimePerCpu(t cpu.TimesStat) float64
- type CpuTimes
- type MaxPerCpuPerMetric
- type OSMemStats
- type PercentPerCpuPerMetric
- type ProcessStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateCpuPercent ¶
func CheckGreaterZero ¶
func GetMaxPerCpuPerMetric ¶
func GetMaxPerCpuPerMetric(p []PercentPerCpuPerMetric) map[string]*MaxPerCpuPerMetric
func GetNetIfaces ¶
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed eth0: 1990350 2838 0 0 0 0 0 0 401351 2218 0 0 0 0 0 0 lo: 26105 286 0 0 0 0 0 0 26105 286 0 0 0 0 0 0
func GetProcessCpuInterval ¶
func SumCpuTimePerCpu ¶
Types ¶
type CpuTimes ¶
func GetProcessCpuTimes ¶
type MaxPerCpuPerMetric ¶
type OSMemStats ¶
type OSMemStats struct { SwapTotal uint64 SwapUsed uint64 SwapFree uint64 SwapUsedPercent float64 SwapIn uint64 SwapOut uint64 MemTotal uint64 MemAvailable uint64 MemUsed uint64 MemUsedPercent float64 MemBuffers uint64 MemCached uint64 }
func GetOsMemStats ¶
func GetOsMemStats() (OSMemStats, error)
type PercentPerCpuPerMetric ¶
type PercentPerCpuPerMetric struct { User float64 `json:"user"` System float64 `json:"system"` Idle float64 `json:"idle"` Nice float64 `json:"nice"` Iowait float64 `json:"iowait"` Irq float64 `json:"irq"` Softirq float64 `json:"softirq"` Steal float64 `json:"steal"` Guest float64 `json:"guest"` GuestNice float64 `json:"guestNice"` Stolen float64 `json:"stolen"` }
func CalculateCpuPercentPerCpuPerMetric ¶
func CalculateCpuPercentPerCpuPerMetric(cpuTs1, cpuTs2 []cpu.TimesStat) []PercentPerCpuPerMetric
type ProcessStats ¶
type ProcessStats struct { FirstErr bool MemPercent float64 GetMemPerErr bool GetMemErr bool MemRSS uint64 MemVMS uint64 MemSwap uint64 GetIoErr bool IoRdcnt uint64 IoWrcnt uint64 IoRdBytes uint64 IoWrBytes uint64 GetCtxErr bool CtxSwitchVoluntary int64 CtxSwitchInvoluntary int64 }
func GetProcessStatsWithoutCpu ¶
func GetProcessStatsWithoutCpu(pid int32) (ProcessStats, error)
Click to show internal directories.
Click to hide internal directories.