diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2017-11-01 11:24:59 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2017-11-01 11:24:59 -0400 |
commit | a031b83a09a8628435317a03f199cdc18b78262f (patch) | |
tree | bc017a96769ce6de33745b8b0b1304ccf38e9df0 /vendor/github.com/containerd/cgroups/stats.go | |
parent | 2b74391cd5281f6fdf391ff8ad50fd1490f6bf89 (diff) | |
download | podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.gz podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.bz2 podman-a031b83a09a8628435317a03f199cdc18b78262f.zip |
Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'vendor/github.com/containerd/cgroups/stats.go')
-rw-r--r-- | vendor/github.com/containerd/cgroups/stats.go | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/vendor/github.com/containerd/cgroups/stats.go b/vendor/github.com/containerd/cgroups/stats.go new file mode 100644 index 000000000..47fbfa96b --- /dev/null +++ b/vendor/github.com/containerd/cgroups/stats.go @@ -0,0 +1,109 @@ +package cgroups + +import "sync" + +type Stats struct { + cpuMu sync.Mutex + + Hugetlb map[string]HugetlbStat + Pids *PidsStat + Cpu *CpuStat + Memory *MemoryStat + Blkio *BlkioStat +} + +type HugetlbStat struct { + Usage uint64 + Max uint64 + Failcnt uint64 +} + +type PidsStat struct { + Current uint64 + Limit uint64 +} + +type CpuStat struct { + Usage CpuUsage + Throttling Throttle +} + +type CpuUsage struct { + // Units: nanoseconds. + Total uint64 + PerCpu []uint64 + Kernel uint64 + User uint64 +} + +type Throttle struct { + Periods uint64 + ThrottledPeriods uint64 + ThrottledTime uint64 +} + +type MemoryStat struct { + Cache uint64 + RSS uint64 + RSSHuge uint64 + MappedFile uint64 + Dirty uint64 + Writeback uint64 + PgPgIn uint64 + PgPgOut uint64 + PgFault uint64 + PgMajFault uint64 + InactiveAnon uint64 + ActiveAnon uint64 + InactiveFile uint64 + ActiveFile uint64 + Unevictable uint64 + HierarchicalMemoryLimit uint64 + HierarchicalSwapLimit uint64 + TotalCache uint64 + TotalRSS uint64 + TotalRSSHuge uint64 + TotalMappedFile uint64 + TotalDirty uint64 + TotalWriteback uint64 + TotalPgPgIn uint64 + TotalPgPgOut uint64 + TotalPgFault uint64 + TotalPgMajFault uint64 + TotalInactiveAnon uint64 + TotalActiveAnon uint64 + TotalInactiveFile uint64 + TotalActiveFile uint64 + TotalUnevictable uint64 + + Usage MemoryEntry + Swap MemoryEntry + Kernel MemoryEntry + KernelTCP MemoryEntry +} + +type MemoryEntry struct { + Limit uint64 + Usage uint64 + Max uint64 + Failcnt uint64 +} + +type BlkioStat struct { + IoServiceBytesRecursive []BlkioEntry + IoServicedRecursive []BlkioEntry + IoQueuedRecursive []BlkioEntry + IoServiceTimeRecursive []BlkioEntry + IoWaitTimeRecursive []BlkioEntry + IoMergedRecursive []BlkioEntry + IoTimeRecursive []BlkioEntry + SectorsRecursive []BlkioEntry +} + +type BlkioEntry struct { + Op string + Device string + Major uint64 + Minor uint64 + Value uint64 +} |