给定进程的 %Processor Time 的 PerfMon 模板

PerfMon template for %Processor Time for a given process

我想为我的进程获取 CPU/%Processor time "MyCustomProcess.exe",我在模板中添加了计数器,但我没有在 PerfMon 数据收集器集中获取计数器。

Custom_PerfMon_template:

我得到 _Total % Processor Time

<Counter>\Process(_Total)\% Processor Time</Counter>

我也得到这个值:

<CounterDisplayName>\.NET CLR Exceptions(MyCustomProcess)\# of Exceps Thrown</CounterDisplayName>

没有得到这个值:

<Counter>\Process(MyCustomProcess)\% Processor Time</Counter>

如何获取“\Process(MyCustomProcess)\% Processor Time”值?

谢谢,
RDV

显然,计数器在那里,只是没有显示。
解决方案:

  1. 在 PerfMon 中打开 *.blg 文件
  2. 在底部,右击-> 添加计数器
  3. Select 您要添加的计数器并单击添加。
  4. 现在应该显示计数器。

就是不懂,why it doesn't show the counters by default.
类似问题:https://serverfault.com/questions/193042/perfmon-counters-can-be-selected-but-dont-display-data

希望这对某人有所帮助。

谢谢,
RDV