metrics.proto (3385B)
1 syntax = "proto3"; 2 3 package io.containerd.cgroups.v1; 4 5 option go_package = "github.com/containerd/cgroups/cgroup1/stats"; 6 7 message Metrics { 8 repeated HugetlbStat hugetlb = 1; 9 PidsStat pids = 2; 10 CPUStat cpu = 3; 11 MemoryStat memory = 4; 12 BlkIOStat blkio = 5; 13 RdmaStat rdma = 6; 14 repeated NetworkStat network = 7; 15 CgroupStats cgroup_stats = 8; 16 MemoryOomControl memory_oom_control = 9; 17 } 18 19 message HugetlbStat { 20 uint64 usage = 1; 21 uint64 max = 2; 22 uint64 failcnt = 3; 23 string pagesize = 4; 24 } 25 26 message PidsStat { 27 uint64 current = 1; 28 uint64 limit = 2; 29 } 30 31 message CPUStat { 32 CPUUsage usage = 1; 33 Throttle throttling = 2; 34 } 35 36 message CPUUsage { 37 // values in nanoseconds 38 uint64 total = 1; 39 uint64 kernel = 2; 40 uint64 user = 3; 41 repeated uint64 per_cpu = 4; 42 43 } 44 45 message Throttle { 46 uint64 periods = 1; 47 uint64 throttled_periods = 2; 48 uint64 throttled_time = 3; 49 } 50 51 message MemoryStat { 52 uint64 cache = 1; 53 uint64 rss = 2; 54 uint64 rss_huge = 3; 55 uint64 mapped_file = 4; 56 uint64 dirty = 5; 57 uint64 writeback = 6; 58 uint64 pg_pg_in = 7; 59 uint64 pg_pg_out = 8; 60 uint64 pg_fault = 9; 61 uint64 pg_maj_fault = 10; 62 uint64 inactive_anon = 11; 63 uint64 active_anon = 12; 64 uint64 inactive_file = 13; 65 uint64 active_file = 14; 66 uint64 unevictable = 15; 67 uint64 hierarchical_memory_limit = 16; 68 uint64 hierarchical_swap_limit = 17; 69 uint64 total_cache = 18; 70 uint64 total_rss = 19; 71 uint64 total_rss_huge = 20; 72 uint64 total_mapped_file = 21; 73 uint64 total_dirty = 22; 74 uint64 total_writeback = 23; 75 uint64 total_pg_pg_in = 24; 76 uint64 total_pg_pg_out = 25; 77 uint64 total_pg_fault = 26; 78 uint64 total_pg_maj_fault = 27; 79 uint64 total_inactive_anon = 28; 80 uint64 total_active_anon = 29; 81 uint64 total_inactive_file = 30; 82 uint64 total_active_file = 31; 83 uint64 total_unevictable = 32; 84 MemoryEntry usage = 33; 85 MemoryEntry swap = 34; 86 MemoryEntry kernel = 35; 87 MemoryEntry kernel_tcp = 36; 88 89 } 90 91 message MemoryEntry { 92 uint64 limit = 1; 93 uint64 usage = 2; 94 uint64 max = 3; 95 uint64 failcnt = 4; 96 } 97 98 message MemoryOomControl { 99 uint64 oom_kill_disable = 1; 100 uint64 under_oom = 2; 101 uint64 oom_kill = 3; 102 } 103 104 message BlkIOStat { 105 repeated BlkIOEntry io_service_bytes_recursive = 1; 106 repeated BlkIOEntry io_serviced_recursive = 2; 107 repeated BlkIOEntry io_queued_recursive = 3; 108 repeated BlkIOEntry io_service_time_recursive = 4; 109 repeated BlkIOEntry io_wait_time_recursive = 5; 110 repeated BlkIOEntry io_merged_recursive = 6; 111 repeated BlkIOEntry io_time_recursive = 7; 112 repeated BlkIOEntry sectors_recursive = 8; 113 } 114 115 message BlkIOEntry { 116 string op = 1; 117 string device = 2; 118 uint64 major = 3; 119 uint64 minor = 4; 120 uint64 value = 5; 121 } 122 123 message RdmaStat { 124 repeated RdmaEntry current = 1; 125 repeated RdmaEntry limit = 2; 126 } 127 128 message RdmaEntry { 129 string device = 1; 130 uint32 hca_handles = 2; 131 uint32 hca_objects = 3; 132 } 133 134 message NetworkStat { 135 string name = 1; 136 uint64 rx_bytes = 2; 137 uint64 rx_packets = 3; 138 uint64 rx_errors = 4; 139 uint64 rx_dropped = 5; 140 uint64 tx_bytes = 6; 141 uint64 tx_packets = 7; 142 uint64 tx_errors = 8; 143 uint64 tx_dropped = 9; 144 } 145 146 // CgroupStats exports per-cgroup statistics. 147 message CgroupStats { 148 // number of tasks sleeping 149 uint64 nr_sleeping = 1; 150 // number of tasks running 151 uint64 nr_running = 2; 152 // number of tasks in stopped state 153 uint64 nr_stopped = 3; 154 // number of tasks in uninterruptible state 155 uint64 nr_uninterruptible = 4; 156 // number of tasks waiting on IO 157 uint64 nr_io_wait = 5; 158 }