Update cAdvisor to 2ed7198

* Add container_cpu_cfs_* metrics (CPU throttling due to limits)
* Add container_memory_swap metric
* Ensure minimum kernel version for thin_ls

Diff: c6c06d4...2ed7198
This commit is contained in:
Tobias Schmidt
2016-08-17 15:24:04 -04:00
parent 2bc5414de6
commit 165e2b6bc9
6 changed files with 225 additions and 99 deletions

View File

@@ -266,7 +266,7 @@ type LoadStats struct {
// CPU usage time statistics.
type CpuUsage struct {
// Total CPU usage.
// Units: nanoseconds
// Unit: nanoseconds.
Total uint64 `json:"total"`
// Per CPU/core usage of the container.
@@ -274,17 +274,31 @@ type CpuUsage struct {
PerCpu []uint64 `json:"per_cpu_usage,omitempty"`
// Time spent in user space.
// Unit: nanoseconds
// Unit: nanoseconds.
User uint64 `json:"user"`
// Time spent in kernel space.
// Unit: nanoseconds
// Unit: nanoseconds.
System uint64 `json:"system"`
}
// Cpu Completely Fair Scheduler statistics.
type CpuCFS struct {
// Total number of elapsed enforcement intervals.
Periods uint64 `json:"periods"`
// Total number of times tasks in the cgroup have been throttled.
ThrottledPeriods uint64 `json:"throttled_periods"`
// Total time duration for which tasks in the cgroup have been throttled.
// Unit: nanoseconds.
ThrottledTime uint64 `json:"throttled_time"`
}
// All CPU usage metrics are cumulative from the creation of the container
type CpuStats struct {
Usage CpuUsage `json:"usage"`
CFS CpuCFS `json:"cfs"`
// Smoothed average of number of runnable threads x 1000.
// We multiply by thousand to avoid using floats, but preserving precision.
// Load is smoothed over the last 10 seconds. Instantaneous value can be read
@@ -324,6 +338,10 @@ type MemoryStats struct {
// Units: Bytes.
RSS uint64 `json:"rss"`
// The amount of swap currently used by the processes in this cgroup
// Units: Bytes.
Swap uint64 `json:"swap"`
// The amount of working set memory, this includes recently accessed memory,
// dirty memory, and kernel memory. Working set is <= "usage".
// Units: Bytes.