PRB: RegQueryValueEx() May Not Return Disk Performance Counters (262937)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows 2000
- the operating system: Microsoft Windows NT 4.0
- the operating system: Microsoft Windows XP
This article was previously published under Q262937 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:
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:
The following command sets the system to start disk performance counters for physical drives when you restart the system:
The following command sets the system to start disk performance counters for logical drives or storage volumes when you restart the system:
REFERENCESFor 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 Using DiskPerf in Windows 2000
Modification Type: | Major | Last Reviewed: | 12/17/2003 |
---|
Keywords: | kbAPI kbKernBase kbPerfMon kbprb KB262937 |
---|
|