Documentation ¶
Index ¶
Constants ¶
View Source
const ( CGroupCpuQuotaPath = "/sys/fs/cgroup/cpu/cpu.cfs_quota_us" CGroupCpuPeriodPath = "/sys/fs/cgroup/cpu/cpu.cfs_period_us" CGroupMemLimitPath = "/sys/fs/cgroup/memory/memory.limit_in_bytes" )
Variables ¶
View Source
var SysMonitor = &sysMonitor{status: &SysStatus{}}
Functions ¶
Types ¶
type CGProcessInterface ¶
type CGroupCollector ¶
type CGroupCollector struct {
// contains filtered or unexported fields
}
func NewCGroupCollector ¶
func NewCGroupCollector(readUint ReadUintFunc) (*CGroupCollector, error)
func (*CGroupCollector) CpuPercent ¶
func (c *CGroupCollector) CpuPercent() (float64, error)
func (*CGroupCollector) MemPercent ¶
func (c *CGroupCollector) MemPercent() (float64, error)
type NormalCollector ¶
type NormalCollector struct {
// contains filtered or unexported fields
}
func NewNormalCollector ¶
func NewNormalCollector() (*NormalCollector, error)
func (*NormalCollector) CpuPercent ¶
func (n *NormalCollector) CpuPercent() (float64, error)
func (*NormalCollector) MemPercent ¶
func (n *NormalCollector) MemPercent() (float64, error)
type ProcessInterface ¶
type ReadUintFunc ¶
type SysCollector ¶
Click to show internal directories.
Click to hide internal directories.