Microsoft KB Archive/259390

{|
 * width="100%"|

INFO: Percent Total Performance Counter Changes on Windows 2000

 * }

Q259390

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0
 * Microsoft Windows 2000 Professional
 * Microsoft Windows 2000 Server

-

SUMMARY
Some counters have been moved in Windows 2000. Applications that use the PdhAddCounter function to collect data for these counters may fail with PDH_CSTATUS_NO_COUNTER. Applications that use the RegQueryValueEx function with HKEY_PERFORMANCE_DATA may not find these counters in the performance data. This article explains how to find the counters on a computer that is running Windows 2000.

MORE INFORMATION
On a computer that is running Windows NT 4.0, the following counters are available under System Performance Object:


 * System\% Total DPC Time
 * System\% Total Interrupt Time
 * System\% Total Privileged Time
 * System\% Total Processor Time
 * System\% Total User Time

However, in Windows 2000, these counters are moved to Processor Performance Object. These counters have a processor instance that is associated with them (named starting with 0, 1, and so on), and _Total instance name for the Total.

The following are the corresponding counters in Processor Performance Object:


 * Processor(_Total)\% DPC Time
 * Processor(_Total)\% Interrupt Time
 * Processor(_Total)\% Privileged Time
 * Processor(_Total)\% Processor Time
 * Processor(_Total)\% User Time

The application must retrieve the counter data information that is associated with the _Total instance name for getting the same performance data information, such as percent Total counters in System Performance Object on a computer that is running Windows NT 4.0.