Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

corrupted performance counters?

Performance counters are EVIL. Don't use them.

if(PerformanceCounterCategory.Exists("ILoveYou")  ) // is true
{
    PerformanceCounterCategory.Delete("ILoveYou"); 
    //throws exception The **configuration registry** key is invalid
}

at System.Diagnostics.PerformanceCounterLib.RegisterFiles(String arg0, Boolean unregister)
at System.Diagnostics.PerformanceCounterLib.UnregisterCategory(String categoryName)
at System.Diagnostics.PerformanceCounterCategory.Delete(String categoryName)
at WindowsFormsApplication1.Program.SetupCategory()

All I found is this: http://blogs.msdn.com/b/oanapl/archive/2009/04/24/fix-corrupted-performance-counters.aspx (Using LODCTR /R)

and it doesn't help. As I have no idea what file are they talking about. Anyone got any other ideas?

PS I use Windows XP SP3 may this be the problem? I understand it is suppose to support performance counters fully unless I cancel the page file.

to make this clear my problemis that I'm unable to UNINSTALL my counters.

like image 572
Nahum Avatar asked May 28 '12 05:05

Nahum


People also ask

How do I rebuild a performance counter in Citrix?

Enter lodctr /R in command line to rebuild PerfMon Counter setting from system backup store. 2. Restart 'Citrix Desktop Service'. VDA will register with DDC successfully.


1 Answers

For me,

it was sufficient to re-create all performance counters with

lodctr /R

from a command-line with administrative rights (according to this, but skipping the manual recreation of the base performance counters)

When checking the list of performance counters in the registry in

 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009

it turned out that the content of that key startet with lots of whitespace. There was a list of performance counters with high counter indices at the very end of that key. After calling the command above, the key correctly contained the base performance counters as well (and did not contain the leading whitespace any more).

like image 180
Johannes S. Avatar answered Sep 23 '22 13:09

Johannes S.