Nah*_*hum 12 .net c# performancecounter
性能指标是EVIL.不要使用它们.
if(PerformanceCounterCategory.Exists("ILoveYou") ) // is true
{
PerformanceCounterCategory.Delete("ILoveYou");
//throws exception The **configuration registry** key is invalid
}
Run Code Online (Sandbox Code Playgroud)
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()
Run Code Online (Sandbox Code Playgroud)
所有我发现的是:http: //blogs.msdn.com/b/oanapl/archive/2009/04/24/fix-corrupted-performance-counters.aspx (使用LODCTR/R)
它没有帮助.因为我不知道他们在说什么文件.any1还有其他想法吗?
PS我用windows xp SP3可能这个问题?我知道除非我取消页面文件,否则应该完全支持性能计数器.
这清楚我的问题是我无法卸载我的计数器.
我的公司遇到了性能计数器经常损坏的问题。如果问题是实际计数器损坏,您可以通过以下方式检查损坏的性能计数器:
start | run | perfmon%windir%\system32:
Perfc009.datPerfh009.datPerfi009.datD:\I386)这是我们针对该问题找到的最佳解决方案。