Search code examples
windowscpu-usageperfmon

PerfMon template for %Processor Time for a given process


I want to get CPU/%Processor time for my process "MyCustomProcess.exe", I added the counter in the template but I do not get the counter in PerfMon data collector set.

Custom_PerfMon_template:

I get _Total % Processor Time

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

I also get this value:

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

I do not get this value:

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

How can I get "\Process(MyCustomProcess)\% Processor Time" value?

Thanks,
RDV


Solution

  • Apparently, counters are there, just not shown.
    Solution:

    1. Open the *.blg file in PerfMon
    2. In Bottom section, right click-> Add Counters
    3. Select the counter you want to add and click Add.
    4. Counter should be displayed now.

    Just do not understand, why it doesn't show the counters by default.
    Similar issue: https://serverfault.com/questions/193042/perfmon-counters-can-be-selected-but-dont-display-data

    Hope this helps someone.

    Thanks,
    RDV