Platform SDK: Performance Monitoring |
The following means of collecting performance data are provided in Windows NT or Windows 2000.
You can use the performance monitoring applications included with Windows NT and Windows 2000 that retrieve and display performance data, or you can create a program that calls one of the two system-level interfaces.
Among other things, the Windows 2000 Performance Monitor allows you to define a set of performance data that will be retrieved from the system. You can then graph this data according to your specifications, or write it to a file for archiving and further analysis. Refer to the help pages in the Windows 2000 Performance Monitor for more information on how to use it. You can control the behavior of the Windows 2000 Performance Monitor from Visual Basic® programs and ActiveX®-compliant containers, such as Microsoft® Office 97 applications, through the Windows 2000 Performance Monitor automation programming interface. This interface cannot be used with the Windows NT Performance Monitor. Refer to the System Monitor automation programming interface specification for more information.
Note In this document, use of the Windows 2000 Performance Monitor is emphasized, and a distinction between the Windows 2000 Performance Monitor and the Windows NT Performance Monitor is made only where the functionality of the two differs.
You can also call functions in the registry interface or the PDH interface to access performance data. The registry interface is the older of the two and has more extensive functionality. However, the PDH interface is easier to use for most performance data collection tasks. The PDH interface is essentially a higher-level abstraction of the functionality that the registry interface provides, oriented more towards operations on single counters rather than groups of counters.
Because PDH functions call the registry interface to retrieve performance data, you can either call the registry functions directly or call the PDH functions that call those registry functions to collect data from the registry interface. For information on obtaining performance data through calls to registry functions, refer to Using the Registry Interface. For information on the PDH functions used to collect performance data, and the order in which to call them, refer to Using the PDH Interface.
For more information on creating and using WMI providers, refer to the WMI SDK documentation.