he Windows Reliability and Performance Monitor (RPM) (see Figure 1
) is a new application in Windows Vista that unifies the approach to monitoring real-time and historical reliability and performance data. The Performance Logs and Alerts (PLA) API gives you programmatic access to features in the RPM and is also new to Windows Vista.
|Figure 1. Reliability and Performance Monitor: One view of the RPM application showing various monitoring capabilities. The PLA API gives you programmatic access to its capabilities.|
|Author's Note: RPM integrates three previously separate applications: Server Performance Advisor, System Monitor, and Performance Logs and Alerts. Be careful not to confuse the obsolete Performance Logs and Alerts application with the new Performance Logs and Alerts API.
In this article I'll use the RPM as a developer's tool for the PLA API. Using the RPM makes it easier to understand the concepts in the PLA API, but it isn't required to write PLA-enabled applications.
The RPM is designed as an integrated application for system administrators; the PLA API is designed for application developers to fulfill their applications' supportability, reliability, and performance requirements.
You can follow along with the techniques shown here, and experiment as you go. The article demonstrates how to create data collector sets both with the RPM and programmatically, and discusses specific types of data collectors.
To build and run the applications shown here, you'll need Microsoft Windows Vista and Microsoft Visual Studio 2005 with all required updates. I've used C# in this article, but I encourage you to use your favorite .NET language when you create PLA-enabled applications.
The PLA API isn't exposed in the .NET Framework Class Library. To use it in managed code, launch the Visual Studio 2005 Command Prompt and then run the .NET Framework Type Library Importer tool:
Add the generated PlaLibrary.dll
assembly as a reference to your Visual Studio projects. Use the Class View window to explore the generated .NET types.