I have worked on how to get performance data.
new counter i need to add in my requiremnet, is “memoryPagesPerSec “
I have use inbuild class to get this counter, but not get the value
it is always zero, while i check in perfmon.exe, it gives some values.
Can some one tell me the reason, or what is the alternate solution in WMI query to get this counter value.
My current code is….
var s1 = new System.Diagnostics.PerformanceCounter("Memory", "Pages/sec");
string s2 = s1.NextValue().ToString();
Console.WriteLine("Test Memory: " + s2.ToString());
I want to change using WMI and need to check this?
Any solution for WMI query for this counter?
try this: