I am building EXE and through which i am fetching perfmon counter of application to monitor that using WMI query. I am testing it with my local machine and seems like my code logic gives me incorrect values for some of counters.
Below is my code for one of the counter (CacheTotalHitRatio)
And when i have looked it with perfmon exe in my system then it shows me something different as shown below.
I think CacheTotalHitRatio is in percentage and should not be go beyond 100 but my code gives some higher value. What is problem here OR am i doing something wrong here?
Please let me know if anyone have experience with WMI query.
Thanks in Advance.
Exist two types of Performance Counter Classes
The Win32_PerfRawData_ASPNET_ASPNETApplications
class returns the raw performance counter values these values must be transformed (using a formula according to the property and the class) to be displayed, if you uses the Win32_PerfFormattedData_ASPNET_ASPNETApplications
class instead you will get the calculated data just as are shown in the Performance monitor.
来源:https://stackoverflow.com/questions/10461415/issue-with-perfmon-counter-value-using-wmi-query