
298
|
Chapter 9, Server Explorer Hacks
#73 Access Performance Counters
HACK
HACK
#73
Access Performance Counters Hack #73
Windows’ performance counters can reveal all sorts of information about the
inner working of your machine. Use the Server Explorer to interact with these
performance counters.
The Server Explorer provides an excellent interface to access the perfor-
mance counters on your computer. Using the Server Explorer, you can drag
performance counters directly from the Server Explorer to your application.
In this hack, you will see how to build a simple application that reads from a
performance counter and reports its value to the user.
The Server Explorer includes a node called Performance Counters, which
can be seen in Figure 9-1.
Each of the nodes you see in Figure 9-1 is a category that includes a number
of performance counters listed beneath it. The contents of the Memory cate-
gory can be seen in Figure 9-2.
Figure 9-1. Server Explorer—Performance Counters node