O'Reilly logo

Programming Windows® Services with Microsoft® Visual Basic® 2008 by Michael Gernaey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Counters to Your Service

When you create counters, you have to decide exactly what information you want to expose. Because performance counters are merely numeric representations of internal metrics, you should expose whatever you think is important for an end user to know.

Creating Your Counters

After you define the information that you want to expose, you need to use that information to create a counter category and the appropriate counter objects you want to expose to the consumers.

In Perfmon, the category represents the Performance Object, which is the master object for all the exposed counters that exist within that category. Let’s take a look at the system-exposed Processor category.

The category is called Processor. On the left are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required