Skip to content

Commit 9f29229

Browse files
committed
stats kep: more updating for how the CRI changes are acutally used
Signed-off-by: Peter Hunt <[email protected]>
1 parent 5d0400f commit 9f29229

File tree

1 file changed

+22
-17
lines changed
  • keps/sig-node/2371-cri-pod-container-stats

1 file changed

+22
-17
lines changed

keps/sig-node/2371-cri-pod-container-stats/README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ These correspond to some fields of the [ContainerStats](#summary-container-stats
304304
+ // Corresponds to Stats Summary API CPUStats UsageCoreNanoSeconds
305305
= UInt64Value usage_core_nano_seconds = 2;
306306
+ // Total CPU usage (sum of all cores) averaged over the sample window.
307+
+ // The "core" unit can be interpreted as CPU core-nanoseconds per second.
307308
+ UInt64Value usage_nano_cores = 3;
308309
=}
309310
@@ -410,37 +411,41 @@ message PodSandboxAttributes {
410411
}
411412
412413
// PodSandboxStats provides the resource usage statistics for a pod.
414+
// The linux or windows field will be populated depending on the platform.
413415
message PodSandboxStats {
414416
// Information of the pod.
415-
// Corresponds to PodRef in SummaryAPI
416417
PodSandboxAttributes attributes = 1;
418+
// Stats from linux.
419+
LinuxPodSandboxStats linux = 2;
420+
// Stats from windows.
421+
WindowsPodSandboxStats windows = 3;
422+
}
423+
424+
// LinuxPodSandboxStats provides the resource usage statistics for a pod on linux
425+
message LinuxPodSandboxStats {
417426
// CPU usage gathered from the pod.
418-
// Corresponds to Stats SummaryAPI CPUStats field
419-
CpuUsage cpu = 2;
427+
CpuUsage cpu = 1;
420428
// Memory usage gathered from the pod.
421-
// Corresponds to Stats SummaryAPI MemoryStats field
422-
MemoryUsage memory = 3;
423-
// TODO: do we want a start time field?
424-
// The time at which data collection for the pod-scoped (e.g. network) stats was (re)started.
425-
// int64 timestamp = 1;
426-
// Stats of containers in the measured pod.
427-
repeated ContainerStats containers
429+
MemoryUsage memory = 2;
428430
// Stats pertaining to CPU resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).
429-
NetworkStats network = 4;
430-
// Note the specific omission of VolumeStats and EphemeralStorage
431-
// Each of these fields will be calculated Kubelet-level
432-
// ProcessStats pertaining to processes.
433-
ProcessStats process = 5;
431+
NetworkStats network = 3;
432+
// Stats pertaining to processes in the pod.
433+
ProcessStats process = 4;
434+
// Stats of containers in the measured pod.
435+
repeated ContainerStats containers = 5;
436+
}
437+
438+
// WindowsPodSandboxStats provides the resource usage statistics for a pod on windows
439+
message WindowsPodSandboxStats {
440+
// TODO: Add stats relevant to windows
434441
}
435442
436443
// NetworkStats contains data about network resources.
437444
message NetworkStats {
438445
// The time at which these stats were updated.
439446
int64 timestamp = 1;
440-
441447
// Stats for the default interface, if found
442448
InterfaceStats default_interface = 2;
443-
444449
repeated InterfaceStats interfaces = 3;
445450
}
446451

0 commit comments

Comments
 (0)