Versions in this module Expand all Collapse all v3 v3.28.9 Aug 5, 2022 Changes in this version + var ErrCgroupNotAvailable = errors.New("cgroup not available") + var ErrDockerNotAvailable = errors.New("docker not available") + func CgroupCPUDockerUsageWithContext(ctx context.Context, containerid string) (float64, error) — linux/amd64 + func CgroupCPUUsage(containerID string, base string) (float64, error) — linux/amd64 + func CgroupCPUUsageDocker(containerid string) (float64, error) — linux/amd64 + func CgroupCPUUsageWithContext(ctx context.Context, containerID, base string) (float64, error) — linux/amd64 + func GetDockerIDList() ([]string, error) + func GetDockerIDListWithContext(ctx context.Context) ([]string, error) + type CgroupCPUStat struct + Usage float64 + func CgroupCPU(containerID string, base string) (*CgroupCPUStat, error) + func CgroupCPU(containerid string, base string) (*CgroupCPUStat, error) + func CgroupCPUDocker(containerid string) (*CgroupCPUStat, error) + func CgroupCPUDockerWithContext(ctx context.Context, containerid string) (*CgroupCPUStat, error) + func CgroupCPUWithContext(ctx context.Context, containerID string, base string) (*CgroupCPUStat, error) + func CgroupCPUWithContext(ctx context.Context, containerid string, base string) (*CgroupCPUStat, error) + type CgroupDockerStat struct + ContainerID string + Image string + Name string + Running bool + Status string + func GetDockerStat() ([]CgroupDockerStat, error) + func GetDockerStatWithContext(ctx context.Context) ([]CgroupDockerStat, error) + func (c CgroupDockerStat) String() string + type CgroupMemStat struct + ActiveAnon uint64 + ActiveFile uint64 + Cache uint64 + ContainerID string + HierarchicalMemoryLimit uint64 + InactiveAnon uint64 + InactiveFile uint64 + MappedFile uint64 + MemFailCnt uint64 + MemLimitInBytes uint64 + MemMaxUsageInBytes uint64 + MemUsageInBytes uint64 + Pgfault uint64 + Pgmajfault uint64 + Pgpgin uint64 + Pgpgout uint64 + RSS uint64 + RSSHuge uint64 + TotalActiveAnon uint64 + TotalActiveFile uint64 + TotalCache uint64 + TotalInactiveAnon uint64 + TotalInactiveFile uint64 + TotalMappedFile uint64 + TotalPgFault uint64 + TotalPgMajFault uint64 + TotalPgpgIn uint64 + TotalPgpgOut uint64 + TotalRSS uint64 + TotalRSSHuge uint64 + TotalUnevictable uint64 + Unevictable uint64 + func CgroupMem(containerID string, base string) (*CgroupMemStat, error) + func CgroupMem(containerid string, base string) (*CgroupMemStat, error) + func CgroupMemDocker(containerID string) (*CgroupMemStat, error) + func CgroupMemDocker(containerid string) (*CgroupMemStat, error) + func CgroupMemDockerWithContext(ctx context.Context, containerID string) (*CgroupMemStat, error) + func CgroupMemDockerWithContext(ctx context.Context, containerid string) (*CgroupMemStat, error) + func CgroupMemWithContext(ctx context.Context, containerID string, base string) (*CgroupMemStat, error) + func CgroupMemWithContext(ctx context.Context, containerid string, base string) (*CgroupMemStat, error) + func (m CgroupMemStat) String() string