@@ -316,7 +316,7 @@ These correspond to some fields of the [ContainerStats](#summary-container-stats
316316= // The amount of working set memory in bytes.
317317+ // Corresponds to Stats Summary API MemoryStats WorkingSetBytes field
318318= UInt64Value working_set_bytes = 2;
319- + // Available memory for use. This is defined as the memory limit = workingSetBytes.
319+ + // Available memory for use. This is defined as the memory limit - workingSetBytes.
320320+ // If memory limit is undefined, the available bytes is omitted.
321321+ UInt64Value available_bytes = 3;
322322+ // Total memory in use. This includes all memory regardless of when it was accessed.
@@ -353,7 +353,7 @@ They will be defined as follows:
353353// Runtime service defines the public APIs for remote pod runtimes
354354service RuntimeService {
355355 ...
356- // PodSandboxStats returns stats of the pod. If the pod does not
356+ // PodSandboxStats returns stats of the pod sandbox . If the pod sandbox does not
357357 // exist, the call returns an error.
358358 rpc PodSandboxStats(PodSandboxStatsRequest) returns (PodSandboxStatsResponse) {}
359359 // ListPodSandboxStats returns stats of all running pods.
@@ -363,20 +363,20 @@ service RuntimeService {
363363...
364364
365365message PodSandboxStatsRequest{
366- // ID of the pod for which to retrieve stats.
366+ // ID of the pod sandbox for which to retrieve stats.
367367 string pod_id = 1;
368368}
369369
370370message PodSandboxStatsResponse {
371- // Stats of the pod.
371+ // Stats of the pod sandbox .
372372 PodSandboxStats stats = 1;
373373}
374374
375375
376- // PodSandboxStatsFilter is used to filter containers .
377- // All those fields are combined with 'AND'
376+ // PodSandboxStatsFilter is used to filter the list of pod sandboxes to retrieve stats for .
377+ // All those fields are combined with 'AND'.
378378message PodSandboxStatsFilter {
379- // ID of the container .
379+ // ID of the pod sandbox .
380380 string id = 1;
381381 // LabelSelector to select matches.
382382 // Only api.MatchLabels is supported for now and the requirements
@@ -394,8 +394,7 @@ message ListPodSandboxStatsResponse {
394394 repeated PodSandboxStats stats = 1;
395395}
396396
397-
398- // PodSandboxAttributes provides basic information of the container.
397+ // PodSandboxAttributes provides basic information of the pod sandbox.
399398message PodSandboxAttributes {
400399 // ID of the pod.
401400 string id = 1;
@@ -421,53 +420,56 @@ message PodSandboxStats {
421420 WindowsPodSandboxStats windows = 3;
422421}
423422
424- // LinuxPodSandboxStats provides the resource usage statistics for a pod on linux
423+ // LinuxPodSandboxStats provides the resource usage statistics for a pod sandbox on linux
425424message LinuxPodSandboxStats {
426425 // CPU usage gathered from the pod.
427426 CpuUsage cpu = 1;
428427 // Memory usage gathered from the pod.
429428 MemoryUsage memory = 2;
430- // Stats pertaining to CPU resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).
429+ // Stats pertaining to CPU resources consumed by pod sandbox cgroup (which includes all containers' resource usage and pod sandbox overhead).
431430 NetworkUsage network = 3;
432431 // Stats pertaining to processes in the pod.
433432 ProcessUsage process = 4;
434433 // Stats of containers in the measured pod.
435434 repeated ContainerStats containers = 5;
436435}
437436
438- // WindowsPodSandboxStats provides the resource usage statistics for a pod on windows
437+ // WindowsPodSandboxStats provides the resource usage statistics for a pod sandbox on windows
439438message WindowsPodSandboxStats {
440- // TODO: Add stats relevant to windows
439+ // TODO: Add stats relevant to windows.
441440}
442441
443442// NetworkUsage contains data about network resources.
444443message NetworkUsage {
445444 // The time at which these stats were updated.
446445 int64 timestamp = 1;
447- // Stats for the default interface, if found
446+ // Stats for the default network interface, if found.
448447 NetworkInterfaceUsage default_interface = 2;
449- // Stats for all found interfaces
448+ // Stats for all found network interfaces, excluding the default.
450449 repeated NetworkInterfaceUsage interfaces = 3;
451450}
452451
453452// NetworkInterfaceUsage contains resource value data about a network interface.
454- type NetworkInterfaceUsage struct {
455- // The name of the interface
453+ message NetworkInterfaceUsage {
454+ // The name of the network interface.
456455 string name = 1;
457456 // Cumulative count of bytes received.
458- Uint64Value rx_bytes = 2;
457+ UInt64Value rx_bytes = 2;
459458 // Cumulative count of receive errors encountered.
460- Uint64Value rx_errors = 2 ;
459+ UInt64Value rx_errors = 3 ;
461460 // Cumulative count of bytes transmitted.
462- Uint64Value tx_bytes = 2 ;
461+ UInt64Value tx_bytes = 4 ;
463462 // Cumulative count of transmit errors encountered.
464- Uint64Value tx_errors = 2 ;
463+ UInt64Value tx_errors = 5 ;
465464}
466465
466+
467467// ProcessUsage are stats pertaining to processes.
468468message ProcessUsage {
469- // Number of processes in the pod.
470- Uint64Value process_count = 1;
469+ // The time at which these stats were updated.
470+ int64 timestamp = 1;
471+ // Number of processes.
472+ UInt64Value process_count = 2;
471473}
472474```
473475
0 commit comments