Hi,
I have a WDM driver that exposes counters via WMI for observation/debug purposes. The intent is to make them visible via Perfmon under Vista/XP. I’m able to get the counters to show under Perfmon (on Vista) but the problem I’m facing is that Perfmon gets counter data @1sec intervals whereas I need Perfmon to display counters @100msec intervals. In my WDM MOF file, I tried describing the counter class ( a single GUID that describes multiple counters) with each counter defined as an array of 10 uint32 data items – my expectation is that Perfmon would get all 10 data items when it samples every second and chart them out. What I’m seeing is that the counters don’t show up when I try to add them via Perfmon. If however each counter is defined to be a single uint32 data item, Perfmon shows the counters. My questions are:
-
Is there any way, outside of writing my own UI/replacing Perfmon dll with a custom one, to get Perfmon to sample data @ 100msec intervals? Any undocumented registry key/value, command-line parameter etc.? OR
-
If the fastest sampling rate for Perfmon is 1sec only, is there a way to get Perfmon to comprehend array of data items described in the MOF file? Btw, when I run WBEMTEST and obtain a single instance of the array of data I’m able to see the counter data (all 10 samples of them).
Any help here would be greatly appreciated.
ps: I’m a WMI/MOF newbie so it’s possible that I made a mistake somewhere. However, I have followed the OSR sample posted earlier – use of WMILIB, IRP_MJ_SYSTEM_CONTROL support, MOF file included in RC script etc. And, I’m not worried about the performance impact in gathering samples @100msec granularity since this is meant for debugging only.
MOF class description that I’m using…
[WMI,
Dynamic,
Provider(“WmiProv”),
Locale(“MS\0x409”),
Description(“My WDM Driver Observation Counters”) : amended,
guid(“{FB847898-4EA3-4d4d-81D2-1FC66EA0C3C7}”),
PerfDetail(100),
HiPerf
]
class WdmTest : Win32_PerfRawData
{
[key, read]
string InstanceName;
[read] boolean Active;
[WmiDataId(1),
DisplayName(“Data 1”) : amended,
PerfDefault,
CounterType(0x00000000), // PERF_COUNTER_RAWCOUNT
DefaultScale(0),
PerfDetail(100),
read,
Description(“Data 1 – UINT32 array”) : amended
] uint32 Data1[10]; // If each counter is a defined to be a single uint32 data item then perfmon displays the counter
[WmiDataId(2),
DisplayName(“Data 2”) : amended,
PerfDefault,
CounterType(0x00000000), // PERF_COUNTER_RAWCOUNT
DefaultScale(0),
PerfDetail(100),
read,
Description(“Data 2 – UINT32 array”) : amended
] uint32 Data2[10]; // If each counter is a defined to be a single uint32 data item then perfmon displays the counter
// Other data each of which is defined to be an fixed-size array of UINT32
};
Thanks
Venky