1 package types
2
3 import "github.com/opencontainers/runc/libcontainer/intelrdt"
4
5
6 type Event struct {
7 Type string `json:"type"`
8 ID string `json:"id"`
9 Data interface{} `json:"data,omitempty"`
10 }
11
12
13 type Stats struct {
14 CPU Cpu `json:"cpu"`
15 CPUSet CPUSet `json:"cpuset"`
16 Memory Memory `json:"memory"`
17 Pids Pids `json:"pids"`
18 Blkio Blkio `json:"blkio"`
19 Hugetlb map[string]Hugetlb `json:"hugetlb"`
20 IntelRdt IntelRdt `json:"intel_rdt"`
21 NetworkInterfaces []*NetworkInterface `json:"network_interfaces"`
22 }
23
24 type Hugetlb struct {
25 Usage uint64 `json:"usage,omitempty"`
26 Max uint64 `json:"max,omitempty"`
27 Failcnt uint64 `json:"failcnt"`
28 }
29
30 type BlkioEntry struct {
31 Major uint64 `json:"major,omitempty"`
32 Minor uint64 `json:"minor,omitempty"`
33 Op string `json:"op,omitempty"`
34 Value uint64 `json:"value,omitempty"`
35 }
36
37 type Blkio struct {
38 IoServiceBytesRecursive []BlkioEntry `json:"ioServiceBytesRecursive,omitempty"`
39 IoServicedRecursive []BlkioEntry `json:"ioServicedRecursive,omitempty"`
40 IoQueuedRecursive []BlkioEntry `json:"ioQueueRecursive,omitempty"`
41 IoServiceTimeRecursive []BlkioEntry `json:"ioServiceTimeRecursive,omitempty"`
42 IoWaitTimeRecursive []BlkioEntry `json:"ioWaitTimeRecursive,omitempty"`
43 IoMergedRecursive []BlkioEntry `json:"ioMergedRecursive,omitempty"`
44 IoTimeRecursive []BlkioEntry `json:"ioTimeRecursive,omitempty"`
45 SectorsRecursive []BlkioEntry `json:"sectorsRecursive,omitempty"`
46 }
47
48 type Pids struct {
49 Current uint64 `json:"current,omitempty"`
50 Limit uint64 `json:"limit,omitempty"`
51 }
52
53 type Throttling struct {
54 Periods uint64 `json:"periods,omitempty"`
55 ThrottledPeriods uint64 `json:"throttledPeriods,omitempty"`
56 ThrottledTime uint64 `json:"throttledTime,omitempty"`
57 }
58
59 type CpuUsage struct {
60
61 Total uint64 `json:"total,omitempty"`
62 Percpu []uint64 `json:"percpu,omitempty"`
63 PercpuKernel []uint64 `json:"percpu_kernel,omitempty"`
64 PercpuUser []uint64 `json:"percpu_user,omitempty"`
65 Kernel uint64 `json:"kernel"`
66 User uint64 `json:"user"`
67 }
68
69 type Cpu struct {
70 Usage CpuUsage `json:"usage,omitempty"`
71 Throttling Throttling `json:"throttling,omitempty"`
72 }
73
74 type CPUSet struct {
75 CPUs []uint16 `json:"cpus,omitempty"`
76 CPUExclusive uint64 `json:"cpu_exclusive"`
77 Mems []uint16 `json:"mems,omitempty"`
78 MemHardwall uint64 `json:"mem_hardwall"`
79 MemExclusive uint64 `json:"mem_exclusive"`
80 MemoryMigrate uint64 `json:"memory_migrate"`
81 MemorySpreadPage uint64 `json:"memory_spread_page"`
82 MemorySpreadSlab uint64 `json:"memory_spread_slab"`
83 MemoryPressure uint64 `json:"memory_pressure"`
84 SchedLoadBalance uint64 `json:"sched_load_balance"`
85 SchedRelaxDomainLevel int64 `json:"sched_relax_domain_level"`
86 }
87
88 type MemoryEntry struct {
89 Limit uint64 `json:"limit"`
90 Usage uint64 `json:"usage,omitempty"`
91 Max uint64 `json:"max,omitempty"`
92 Failcnt uint64 `json:"failcnt"`
93 }
94
95 type Memory struct {
96 Cache uint64 `json:"cache,omitempty"`
97 Usage MemoryEntry `json:"usage,omitempty"`
98 Swap MemoryEntry `json:"swap,omitempty"`
99 Kernel MemoryEntry `json:"kernel,omitempty"`
100 KernelTCP MemoryEntry `json:"kernelTCP,omitempty"`
101 Raw map[string]uint64 `json:"raw,omitempty"`
102 }
103
104 type L3CacheInfo struct {
105 CbmMask string `json:"cbm_mask,omitempty"`
106 MinCbmBits uint64 `json:"min_cbm_bits,omitempty"`
107 NumClosids uint64 `json:"num_closids,omitempty"`
108 }
109
110 type MemBwInfo struct {
111 BandwidthGran uint64 `json:"bandwidth_gran,omitempty"`
112 DelayLinear uint64 `json:"delay_linear,omitempty"`
113 MinBandwidth uint64 `json:"min_bandwidth,omitempty"`
114 NumClosids uint64 `json:"num_closids,omitempty"`
115 }
116
117 type IntelRdt struct {
118
119 L3CacheInfo *L3CacheInfo `json:"l3_cache_info,omitempty"`
120
121
122 L3CacheSchemaRoot string `json:"l3_cache_schema_root,omitempty"`
123
124
125 L3CacheSchema string `json:"l3_cache_schema,omitempty"`
126
127
128 MemBwInfo *MemBwInfo `json:"mem_bw_info,omitempty"`
129
130
131 MemBwSchemaRoot string `json:"mem_bw_schema_root,omitempty"`
132
133
134 MemBwSchema string `json:"mem_bw_schema,omitempty"`
135
136
137 MBMStats *[]intelrdt.MBMNumaNodeStats `json:"mbm_stats,omitempty"`
138
139
140 CMTStats *[]intelrdt.CMTNumaNodeStats `json:"cmt_stats,omitempty"`
141 }
142
143 type NetworkInterface struct {
144
145 Name string
146
147 RxBytes uint64
148 RxPackets uint64
149 RxErrors uint64
150 RxDropped uint64
151 TxBytes uint64
152 TxPackets uint64
153 TxErrors uint64
154 TxDropped uint64
155 }
156
View as plain text