Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you delete a performance counter

I know how to delete a Performance Category; which then also deletes all of the counters inside that Category, but how do you delete a single Counter within a Category in C# (without hacking the registry)?

like image 662
Billy Avatar asked Jan 25 '12 10:01

Billy


People also ask

Where are performance counters stored?

When you run a Data Collector Set, the data that is collected for performance counters is stored to a log file (. blg) in the location that was defined when the Data Collector Set was created. In Windows Performance Monitor, you can view log files to see a visual representation of performance counter data.

How do I fix a corrupted performance counter?

Follow the steps below to attempt this fix: Run Command Prompt as Administrator (right-click Command Prompt; select "Run as Administrator") Enter the following command then press enter: lodctr /r. Enter the following command then press enter: winmgmt.exe /resyncperf.


1 Answers

From what I've read on Performance Counter Categories, you can't delete or add performance counters to a custom category after it is created. You need to delete and recreate the category or create a new one. There is some information regarding altering categories at this MSDN page.

like image 135
Adam S Avatar answered Sep 21 '22 08:09

Adam S