NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Category and Counter Management

You create categories and custom performance counters if you want to track data that is not captured by the standard counters provided with Microsoft Windows. For example, you might create a custom counter to track the total number of orders processed by your Web site, or to track the orders processed per second by your site. When you create a counter, you add it to a performance counter category, and you assign it a type that governs how it will behave. For information on choosing the correct type, see Performance Counter Types.

There are several ways you can create custom counters:

You must create counters in a user-defined category rather than in the performance objects (called categories) defined by Windows. That is, you cannot create a new counter within the Processor category or any other non-user-defined categories. Additionally, you must create a counter in a new category; adding a counter to an existing user-defined category will overwrite all of the counters that category already contains.

The following restrictions apply to the process of creating new counters:

Caution   This restriction includes counter categories you have created yourself. You can create a new counter in a user-defined category, but it will replace the existing counters within that category.

See Also

Creating Custom Performance Counters | Creating Performance Counter Categories | Deleting Performance Counter Categories  | Determining if Counters and Categories Exist  | Removing Performance Counter Instances  | Performance Counter Types