FIX: Custom performance counters do not publish performance data to WMI

Article translations Article translations
Article ID: 824336 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

Custom performance counters that are exposed when you use the PerformanceCounter class in the System.Diagnostics namespace do not publish performance data to Microsoft Windows Management Instrumentation (WMI) as expected.

Additionally, you cannot view the .NET CLR counter or the .NET Networking counter through WMI.

CAUSE

This behavior occurs because the WMI schemas are not generated correctly.

The export value is handled on the Linkage registry key. Applications that supply performance counters create a Linkage registry key that is similar to the following:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyApplication\Linkage
The export value should be present on this key. To support the Microsoft .NET Framework side-by-side execution feature, and to work around a bug in Microsoft Windows NT 4.0 Performance Monitor (PerfMon), the .NET PerformanceCounters component uses this key value to load a versioned .dll file from a non-versioned shim (a small piece of code that enables two other pieces of code to interact) that is located in the System32 folder. However, this export value is of type REG_SZ. Because WMI expects a value of type REG_MUTI_SZ, WMI does not recognize this export value.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next .NET Framework 1.1 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version       Size       File name
   -----------------------------------------------------------------------
   25-Jun-2003  04:12  1.1.4322.916    253,952  Aspnet_isapi.dll
   25-Jun-2003  04:12  1.1.4322.916     20,480  Aspnet_regiis.exe
   25-Jun-2003  04:12  1.1.4322.916     32,768  Aspnet_wp.exe
   16-May-2003  01:49                   33,522  Installpersistsqlstate.sql
   16-May-2003  01:49                   34,150  Installsqlstate.sql
   25-Jun-2003  16:15  1.1.4322.916  1,216,512  System.dll
   25-Jun-2003  16:13  1.1.4322.916  1,249,280  System.web.dll
   25-Jun-2003  04:07                   14,472  Webuivalidation.js

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

PerfMon performs the following sequence:
  1. PerfMon loads the DLL (each DLL is specific to a specified counter) and then makes calls in the following order:
    1. PerfMon calls theOpen function.
    2. For each registry key, PerfMon calls the Global function and then calls the Close function.
  2. PerfMon makes calls in the following order:
    1. PerfMon calls Open again.
    2. For each registry key, PerfMon calls Global, and then PerfMon calls Close.
  3. PerfMon calls Global again.
  4. PerfMon calls the Costly function, and then PerfMon calls Close.
WMI performs the following sequence when it generates the schema (only for new registry keys):
  1. WMI loads the DLL, and then calls are made in the following order:
    1. WMI calls Open and then calls Global.
    2. Global calls Costly
    3. WMI calls Close.
  2. WMI calls Open and then calls Global:
    1. Global calls Costly.
    2. WMI calls Close.
  3. WMI calls Global:
    1. Global calls Costly.
    2. WMI calls Close.
  4. WMI calls Costly, and then Costly calls Close.
  5. WMI calls Close.
When a global query runs, the correct object type for each Global collect call (for PerfMon or for calls that rely on the RegQueryValueEx function or on the Performance Data Helper [PDH]) is returned because the performance DLL can count exactly how many object types the .NET PerformanceCounters component provides and how many times the Global collect call will be called. Therefore, the objects are returned in sequence.

Properties

Article ID: 824336 - Last Review: October 7, 2005 - Revision: 3.4
APPLIES TO
  • Microsoft .NET Framework 1.1
Keywords: 
kbnetframe110sp1fix kbqfe kbfix kbbug KB824336

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com