1 /*
2 * Copyright (c) 2019, Red Hat Inc.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
104 public int[] getEffectiveCpuSetCpus() {
105 return subsystem.getEffectiveCpuSetCpus();
106 }
107
108 @Override
109 public int[] getCpuSetMems() {
110 return subsystem.getCpuSetMems();
111 }
112
113 @Override
114 public int[] getEffectiveCpuSetMems() {
115 return subsystem.getEffectiveCpuSetMems();
116 }
117
118 @Override
119 public double getCpuSetMemoryPressure() {
120 return subsystem.getCpuSetMemoryPressure();
121 }
122
123 @Override
124 public boolean isCpuSetMemoryPressureEnabled() {
125 return subsystem.isCpuSetMemoryPressureEnabled();
126 }
127
128 @Override
129 public long getMemoryFailCount() {
130 return subsystem.getMemoryFailCount();
131 }
132
133 @Override
134 public long getMemoryLimit() {
135 return subsystem.getMemoryLimit();
136 }
137
138 @Override
139 public long getMemoryMaxUsage() {
140 return subsystem.getMemoryMaxUsage();
141 }
142
143 @Override
144 public long getMemoryUsage() {
189 public long getMemoryAndSwapFailCount() {
190 return subsystem.getMemoryAndSwapFailCount();
191 }
192
193 @Override
194 public long getMemoryAndSwapLimit() {
195 return subsystem.getMemoryAndSwapLimit();
196 }
197
198 @Override
199 public long getMemoryAndSwapMaxUsage() {
200 return subsystem.getMemoryAndSwapMaxUsage();
201 }
202
203 @Override
204 public long getMemoryAndSwapUsage() {
205 return subsystem.getMemoryAndSwapUsage();
206 }
207
208 @Override
209 public boolean isMemoryOOMKillEnabled() {
210 return subsystem.isMemoryOOMKillEnabled();
211 }
212
213 @Override
214 public long getMemorySoftLimit() {
215 return subsystem.getMemorySoftLimit();
216 }
217
218 @Override
219 public long getBlkIOServiceCount() {
220 return subsystem.getBlkIOServiceCount();
221 }
222
223 @Override
224 public long getBlkIOServiced() {
225 return subsystem.getBlkIOServiced();
226 }
227
228 public static Metrics getInstance() {
229 CgroupSubsystem subsystem = CgroupSubsystemFactory.create();
|
1 /*
2 * Copyright (c) 2020, Red Hat Inc.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
104 public int[] getEffectiveCpuSetCpus() {
105 return subsystem.getEffectiveCpuSetCpus();
106 }
107
108 @Override
109 public int[] getCpuSetMems() {
110 return subsystem.getCpuSetMems();
111 }
112
113 @Override
114 public int[] getEffectiveCpuSetMems() {
115 return subsystem.getEffectiveCpuSetMems();
116 }
117
118 @Override
119 public double getCpuSetMemoryPressure() {
120 return subsystem.getCpuSetMemoryPressure();
121 }
122
123 @Override
124 public Boolean isCpuSetMemoryPressureEnabled() {
125 return subsystem.isCpuSetMemoryPressureEnabled();
126 }
127
128 @Override
129 public long getMemoryFailCount() {
130 return subsystem.getMemoryFailCount();
131 }
132
133 @Override
134 public long getMemoryLimit() {
135 return subsystem.getMemoryLimit();
136 }
137
138 @Override
139 public long getMemoryMaxUsage() {
140 return subsystem.getMemoryMaxUsage();
141 }
142
143 @Override
144 public long getMemoryUsage() {
189 public long getMemoryAndSwapFailCount() {
190 return subsystem.getMemoryAndSwapFailCount();
191 }
192
193 @Override
194 public long getMemoryAndSwapLimit() {
195 return subsystem.getMemoryAndSwapLimit();
196 }
197
198 @Override
199 public long getMemoryAndSwapMaxUsage() {
200 return subsystem.getMemoryAndSwapMaxUsage();
201 }
202
203 @Override
204 public long getMemoryAndSwapUsage() {
205 return subsystem.getMemoryAndSwapUsage();
206 }
207
208 @Override
209 public Boolean isMemoryOOMKillEnabled() {
210 return subsystem.isMemoryOOMKillEnabled();
211 }
212
213 @Override
214 public long getMemorySoftLimit() {
215 return subsystem.getMemorySoftLimit();
216 }
217
218 @Override
219 public long getBlkIOServiceCount() {
220 return subsystem.getBlkIOServiceCount();
221 }
222
223 @Override
224 public long getBlkIOServiced() {
225 return subsystem.getBlkIOServiced();
226 }
227
228 public static Metrics getInstance() {
229 CgroupSubsystem subsystem = CgroupSubsystemFactory.create();
|