Article ID: 262937 - Last Review: November 21, 2006 - Revision: 4.1

PRB: RegQueryValueEx() May Not Return Disk Performance Counters

This article was previously published under Q262937
Expand all | Collapse all

SYMPTOMS

When an application calls the RegQueryValueEx function to retrieve the performance data on a system, the function may not return information about disk performance counters.

CAUSE

In Microsoft Windows NT 4.0, all disk performance counters are turned off by default. In Microsoft Windows 2000 and Microsoft Windows XP, the Physical Disk object is turned on by default and the Logical Disk object is turned off by default. If you enable the disk performance counters, it will only slightly affect the overall system performance. For this reason, these counters are not started by default. Therefore, for best system performance, you should enable the disk performance counters just before you begin disk performance monitoring and disable them thereafter.

RESOLUTION

To obtain LogicalDisk as well as PhysicalDisk performance counter data, you must use the DiskPerf tool that comes with the system to enable the counters. After you enable or disable the disk performance counters, you must restart the system.

How to Enable Disk Counters on Windows NT 4.0

The following command sets the system to start all disk performance counters when you restart the system:
   DISKPERF -YE
 
						

How to Enable Disk Counters on Windows 2000 and Windows XP

The following command sets the system to start all disk performance counters when you restart the system:
   DISKPERF -Y
 
						
The following command sets the system to start disk performance counters for physical drives when you restart the system:
   DISKPERF -YD
 
						
The following command sets the system to start disk performance counters for logical drives or storage volumes when you restart the system:
   DISKPERF -YV
 
						

REFERENCES

For additional information on how to use the DiskPerf tool in Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base:
253251  (http://support.microsoft.com/kb/253251/EN-US/ ) Using DiskPerf in Windows 2000

APPLIES TO
  • Microsoft Win32 Application Programming Interface, when used with:
    • Microsoft Windows 2000 Standard Edition
    • Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows XP
Keywords: 
kbapi kbkernbase kbperfmon kbprb KB262937
 

Article Translations