none
Monitor .NET Windows Application CPU(Core) Usage RRS feed

  • Question

  • Hello,

    Is there any way to monitor and store number cores used by particular Windows based application developed using .NET Framework 4.5?

    I remember using Performance Monitor, its possible to record %Processor time used at process level and Server level, but am not finding on core level.

    Its much helpful, if any expert show some insights on this.

    Thursday, February 26, 2015 2:46 AM

All replies

  • Hello,

    You may have a look at this thread:

    http://stackoverflow.com/questions/1542213/how-to-find-the-number-of-cpu-cores-via-net-c

    If you want to konw the number of the cores, you can involve WMI related scenarios.

    And use the following code to get the number:

    int coreCount = 0;
    foreach (var item in new System.Management.ManagementObjectSearcher("Select * from Win32_Processor").Get())
    {
        coreCount += int.Parse(item["NumberOfCores"].ToString());
    }
    Console.WriteLine("Number Of Cores: {0}", coreCount);
    

    Best regards,



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, February 27, 2015 2:36 AM
  • Thanks Barry.

    I am interested on monitoring tool to measure effective CPU core level usage for particular .NET Process.

    I understand its possible to measure Server level CPU using perf counter %Processor Time, but is it possible to get how CPU cores are equally used? 


    Friday, February 27, 2015 6:46 AM
  • Hello,

    >> but is it possible to get how CPU cores are equally used?

    I do not quite sure what you mean about “equally” used, for monitoring the usage of CPU, you could have a try with the Performance Tool:

    https://technet.microsoft.com/en-in/library/cc749249.aspx

    It provides a detail information about the usage of CPU.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 4, 2015 9:38 AM
    Moderator