カテゴリ「.NET CLR Exceptions」の perfmon カウンターを読み取ろうとしています。以下は同じコードです。私が見ているのは、作成した Windows Perfmon カウンターとコンソール アプリケーションに異なるデータが表示されているように見えることです。
PerformanceCounterCategory netClrExceptionCat = new PerformanceCounterCategory(".NET CLR Exceptions");
foreach (PerformanceCounter counter in netClrExceptionCat.GetCounters("_Global_"))
{
Console.WriteLine(string.Format(" Counter: {0} : Value : {1}", counter.CounterName, counter.RawValue));
}
ここで何か間違ったことをしている場合に備えて、誰かが私を正しい方向に向けていただければ幸いです。