@@ -316,21 +316,16 @@ These correspond to some fields of the [ContainerStats](#summary-container-stats
316
316
= // The amount of working set memory in bytes.
317
317
+ // Corresponds to Stats Summary API MemoryStats WorkingSetBytes field
318
318
= UInt64Value working_set_bytes = 2;
319
- + // Available memory for use. This is defined as the memory limit = workingSetBytes.
320
- + // If memory limit is undefined, the available bytes is omitted.
319
+ + // Available memory for use. This is defined as the memory limit - workingSetBytes.
321
320
+ UInt64Value available_bytes = 3;
322
321
+ // Total memory in use. This includes all memory regardless of when it was accessed.
323
- + UInt64Value usage_bytes
324
- + // The amount of working set memory. This includes recently accessed memory,
325
- + // dirty memory, and kernel memory. WorkingSetBytes is <= UsageBytes
326
- + UInt64Value working_set_bytes = 4;
327
- + // The amount of anonymous and swap cache memory (includes transparent
328
- + // hugepages).
322
+ + UInt64Value usage_bytes = 4;
323
+ + // The amount of anonymous and swap cache memory (includes transparent hugepages).
329
324
+ UInt64Value rss_bytes = 5;
330
325
+ // Cumulative number of minor page faults.
331
- + Uint64Value page_faults = 6;
326
+ + UInt64Value page_faults = 6;
332
327
+ // Cumulative number of major page faults.
333
- + Uint64Value major_page_faults = 6 ;
328
+ + UInt64Value major_page_faults = 7 ;
334
329
=}
335
330
```
336
331
@@ -353,49 +348,45 @@ They will be defined as follows:
353
348
// Runtime service defines the public APIs for remote pod runtimes
354
349
service RuntimeService {
355
350
...
356
- // PodSandboxStats returns stats of the pod. If the pod does not
351
+ // PodSandboxStats returns stats of the pod. If the pod sandbox does not
357
352
// exist, the call returns an error.
358
353
rpc PodSandboxStats(PodSandboxStatsRequest) returns (PodSandboxStatsResponse) {}
359
- // ListPodSandboxStats returns stats of all running pods.
354
+ // ListPodSandboxStats returns stats of the pods matching a filter .
360
355
rpc ListPodSandboxStats(ListPodSandboxStatsRequest) returns (ListPodSandboxStatsResponse) {}
361
356
...
362
357
}
363
358
...
364
-
365
- message PodSandboxStatsRequest{
366
- // ID of the pod for which to retrieve stats.
367
- string pod_id = 1;
359
+ message PodSandboxStatsRequest {
360
+ // ID of the pod sandbox for which to retrieve stats.
361
+ string pod_sandbox_id = 1;
368
362
}
369
363
370
364
message PodSandboxStatsResponse {
371
- // Stats of the pod.
372
365
PodSandboxStats stats = 1;
373
366
}
374
367
375
-
376
- // PodSandboxStatsFilter is used to filter containers.
377
- // All those fields are combined with 'AND'
368
+ // PodSandboxStatsFilter is used to filter the list of pod sandboxes to retrieve stats for.
369
+ // All those fields are combined with 'AND'.
378
370
message PodSandboxStatsFilter {
379
- // ID of the container .
371
+ // ID of the pod sandbox .
380
372
string id = 1;
381
373
// LabelSelector to select matches.
382
374
// Only api.MatchLabels is supported for now and the requirements
383
375
// are ANDed. MatchExpressions is not supported yet.
384
376
map<string, string> label_selector = 2;
385
377
}
386
378
387
- message ListPodSandboxStatsRequest{
379
+ message ListPodSandboxStatsRequest {
388
380
// Filter for the list request.
389
381
PodSandboxStatsFilter filter = 1;
390
382
}
391
383
392
384
message ListPodSandboxStatsResponse {
393
- // Stats of the pod.
385
+ // Stats of the pod sandbox .
394
386
repeated PodSandboxStats stats = 1;
395
387
}
396
388
397
-
398
- // PodSandboxAttributes provides basic information of the container.
389
+ // PodSandboxAttributes provides basic information of the pod sandbox.
399
390
message PodSandboxAttributes {
400
391
// ID of the pod.
401
392
string id = 1;
@@ -421,53 +412,55 @@ message PodSandboxStats {
421
412
WindowsPodSandboxStats windows = 3;
422
413
}
423
414
424
- // LinuxPodSandboxStats provides the resource usage statistics for a pod on linux
415
+ // LinuxPodSandboxStats provides the resource usage statistics for a pod sandbox on linux.
425
416
message LinuxPodSandboxStats {
426
- // CPU usage gathered from the pod.
417
+ // CPU usage gathered for the pod sandbox .
427
418
CpuUsage cpu = 1;
428
- // Memory usage gathered from the pod.
419
+ // Memory usage gathered for the pod sandbox .
429
420
MemoryUsage memory = 2;
430
- // Stats pertaining to CPU resources consumed by pod cgroup (which includes all containers' resource usage and pod overhead).
421
+ // Network usage gathered for the pod sandbox
431
422
NetworkUsage network = 3;
432
- // Stats pertaining to processes in the pod.
423
+ // Stats pertaining to processes in the pod sandbox .
433
424
ProcessUsage process = 4;
434
- // Stats of containers in the measured pod.
425
+ // Stats of containers in the measured pod sandbox .
435
426
repeated ContainerStats containers = 5;
436
427
}
437
428
438
- // WindowsPodSandboxStats provides the resource usage statistics for a pod on windows
429
+ // WindowsPodSandboxStats provides the resource usage statistics for a pod sandbox on windows
439
430
message WindowsPodSandboxStats {
440
- // TODO: Add stats relevant to windows
431
+ // TODO: Add stats relevant to windows.
441
432
}
442
433
443
434
// NetworkUsage contains data about network resources.
444
435
message NetworkUsage {
445
436
// The time at which these stats were updated.
446
437
int64 timestamp = 1;
447
- // Stats for the default interface, if found
438
+ // Stats for the default network interface.
448
439
NetworkInterfaceUsage default_interface = 2;
449
- // Stats for all found interfaces
440
+ // Stats for all found network interfaces, excluding the default.
450
441
repeated NetworkInterfaceUsage interfaces = 3;
451
442
}
452
443
453
444
// NetworkInterfaceUsage contains resource value data about a network interface.
454
- type NetworkInterfaceUsage struct {
455
- // The name of the interface
445
+ message NetworkInterfaceUsage {
446
+ // The name of the network interface.
456
447
string name = 1;
457
448
// Cumulative count of bytes received.
458
- Uint64Value rx_bytes = 2;
449
+ UInt64Value rx_bytes = 2;
459
450
// Cumulative count of receive errors encountered.
460
- Uint64Value rx_errors = 2 ;
451
+ UInt64Value rx_errors = 3 ;
461
452
// Cumulative count of bytes transmitted.
462
- Uint64Value tx_bytes = 2 ;
453
+ UInt64Value tx_bytes = 4 ;
463
454
// Cumulative count of transmit errors encountered.
464
- Uint64Value tx_errors = 2 ;
455
+ UInt64Value tx_errors = 5 ;
465
456
}
466
457
467
458
// ProcessUsage are stats pertaining to processes.
468
459
message ProcessUsage {
469
- // Number of processes in the pod.
470
- Uint64Value process_count = 1;
460
+ // The time at which these stats were updated.
461
+ int64 timestamp = 1;
462
+ // Number of processes.
463
+ UInt64Value process_count = 2;
471
464
}
472
465
```
473
466
0 commit comments