C# – Performance Counter Category Names? (C#)

cmsdnperformancecounterprocess

I'm trying to program in a performance counter into my C# application that launches another process and checks the processor usage of that launched process. As I understand it, the performance counter class requires me to assign a category name , a counter name, and a process name. I can get the process name easily enough, but is there a list of some sort on the internet that has all possible category and counter names I can assign? I tried scouring MSDN for something like this, but I didn't find anything.

Thanks for all the help!

Best Answer

I think you want to know what aspects of the process you can monitor. A list of the Process Performance Counters is available here Nevertheless you can use the GetCategories static method to list all categories in the machine or you could be more specific and create the PerformanceCategory for the "Process" category and use the GetCounters to get a list of all counters available. Hope this helps.