Reputation: 25
I want to retrieve Performance counters of SSAS Service. I can see these counters, distributed into multiple categories in my perfmon. Also I have checked my registry key and found these counters. But I am not able to retrieve these counters with C#.
foreach (PerformanceCounterCategory pcc in PerformanceCounterCategory.GetCategories())
{
if (pcc.CategoryName.StartsWith("MSOLAP"))
{
Console.WriteLine(pcc.CategoryName);
}
}
In my Perfmon I can see Counter Categories as
Is it possible to see two different list of counters at two places i.e in perfmon & in C# (PerformanceCounterCategory class)
Is there any Existing WMI class for SSAS which can be used to retrieve these counters.
Upvotes: 0
Views: 397
Reputation: 3678
SSAS on a 64bit environment installs only the 64bit counter's library so, if you run your code from a 32bit application or you are using 32bit version of Windows PerfMon, you can not access those counters.
On a 64-bit platform you have both versions of Windows Perfmon.
The solution is to build your application using x64 as the target platform.
Upvotes: 2