PRB: RegQueryValueEx() May Not Return Disk Performance Counters |
Q262937
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), included with:
- the operating system: Microsoft Windows 2000
- Microsoft Windows NT Server version 4.0
- Microsoft Windows NT Workstation version 4.0
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 Windows NT 4.0, all disk performance counters are turned off by default. In Windows 2000, 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
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:
Q253251 Using DiskPerf in Windows 2000
Additional query words:
Keywords : kbAPI kbKernBase kbOSWinNT400 kbOSWin2000 kbPerfMon kbSDKWin32 kbOSWin32s kbDSupport kbGrpDSKernBase
Issue type : kbprb
Technology : kbAudDeveloper kbWin32sSearch kbWin32API
Last Reviewed: October 27, 2000 |