We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!
Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.
Because I'm having real issues with WMI performance and regular lockups, and I presume others are as well,
I've starting implementing PDH (PerfLib) code to retrieve performance counters. In every case where
performance data is collected, PDH will be the default with WMI as the fallback. The exception to this is
the CPUUSAGE item which has been using PDH for a long time and seems ok.
What is PDH?
Windows Performance Data Helper (PDH) API allows developers to programmatically access performance
metrics and performance counters in a Windows system. It can be used as an alternative to WMI queries
for retrieving performance metrics.
The advantages are: it is, on average, 20-30 times faster than WMI, it is much easier to code and it
doesn't seem to suffer from the flakiness that I'm seeing in WMI.
However, it does have it's own unique set of challenges, for the most part centered around language. I'm
writing it to be as flexible as possible. You can specify the wildcard path in English or your local
language. You can specify whether to supply the output counter names in English or your local language. If PDH
can't find the counters or some other issue prevents it from working, DTI will fall back to WMI where
possible.
The easiest way to see your system performance counters is with Windows perfmon. When
you add counters you're presented with a list of objects, instances and counters. These are
the counters that Desktop Info will retrieve via the PDH API.