Skip to content

Commit 1262391

Browse files
cosmo0920edsiper
authored andcommitted
in_windows_exporter_metrics: Support more metrics for CPU
processor_utility_total, processor_privileged_utility_total, and processor_mperf_total are now supported. Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 52adc31 commit 1262391

File tree

1 file changed

+28
-0
lines changed
  • plugins/in_windows_exporter_metrics

1 file changed

+28
-0
lines changed

plugins/in_windows_exporter_metrics/we_cpu.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ struct we_perflib_metric_source full_metric_sources[] = {
139139
"% Processor Performance",
140140
NULL),
141141

142+
WE_PERFLIB_METRIC_SOURCE("processor_utility_total",
143+
"% Processor Utility",
144+
NULL),
145+
146+
WE_PERFLIB_METRIC_SOURCE("processor_privileged_utility_total",
147+
"% Privileged Utility",
148+
NULL),
149+
150+
WE_PERFLIB_METRIC_SOURCE("processor_mperf_total",
151+
"% Processor Performance",
152+
NULL),
153+
142154
WE_PERFLIB_TERMINATOR_SOURCE()
143155
};
144156

@@ -191,6 +203,22 @@ struct we_perflib_metric_spec full_metric_specs[] =
191203
" may exceed 100%",
192204
"core"),
193205

206+
WE_PERFLIB_COUNTER_SPEC("processor_utility_total",
207+
"Processor Utility is the amount of time " \
208+
"the core spends executing instructions",
209+
"core"),
210+
211+
WE_PERFLIB_COUNTER_SPEC("processor_privileged_utility_total",
212+
"Processor Privileged Utility is the amount of time " \
213+
"the core has spent executing instructions " \
214+
"inside the kernel",
215+
"core"),
216+
217+
WE_PERFLIB_COUNTER_SPEC("processor_mperf_total",
218+
"Processor MPerf is the number of TSC ticks " \
219+
"incremented while executing instructions",
220+
"core"),
221+
194222
WE_PERFLIB_TERMINATOR_SPEC()
195223
};
196224

0 commit comments

Comments
 (0)