Selecting Instances

If you selected an object with instances, you're not done selecting yet. Many objects do have instances, which are individual occurrences of the object type. For example, if you have more than one disk partition on your system, you will have one instance of the Logical Disk object for each partition. Similarly, each running program is represented by a Process instance.

Every instance has the same counters defined for it, but each instance has its own private copy of those counters so you can observe their behavior individually. In a few cases there are summary counters in another object giving a sum of the collected instances' counters. One example is the System: % Processor Time which is an average of the Processor: % Processor Time for all processor instances on a multiprocessor system.

Some instances have a parent instance that helps to identify them. The Logical Disk instance has as its parent instance the Physical Disk on which it resides. Each Process object has one or more threads of execution. Each Thread instance has as its parent the Process instance that contains it. Instances with parents are denoted in the list box by the following notation: parent instance ==> child instance.

In the Instance box in the Add To dialog box, the default instance is the one that is alphabetically first, because we just can't guess which one you care most about. You often may want to select a different instance, or multiple instances, to examine. Do this just as you did for multiple counters, by holding down the SHIFT or CTRL keys and clicking the contiguous or noncontiguous instances you want to select. Once you have clicked anywhere in the Instance box, you can press the first letter of the name of the instance you want to select to move there more rapidly.

If the name of the instance is larger than the Instance box can display, a horizontal scroll bar appears so you can view the entire name.

Instances are usually identified by name or, if there is a parent, by the parent==>child name. This makes it impossible to successfully select more than one instance of an object if there is more than one instance with the same name. Suppose you have a program named SPLENDID.EXE. If you run two copies of SPLENDID.EXE and attempt to select them both, Performance Monitor will get confused about which one you mean. If you run into this relatively rare situation, you will have to make a copy of the program and give it a different name; say, EXCELLENT.EXE. Then you will have no difficulty distinguishing between them, and neither will Performance Monitor.

Some instances are called mortal instances because they are born and then die during system operation. Typical examples are processes and threads. A mortal instance must be alive in order for it to appear in a menu and be selected. If you want to measure your program, you must first start it up. How, then can you measure startup behavior of a mortal instance? Well, once you have selected your living mortal instance, it remains selected even if it dies. When dead, all counter values go to zero. On each snapshot, Performance Monitor continues to look for that instance. If you start another application with the same name, Performance Monitor automatically begins measuring it on the first snapshot in which it appears. There are cases when you may need to log the data in order to capture all the instances you need to see. When an object is logged, all the instances of that object occurring in any snapshot are logged. You can then explore the log file to find the instances of interest.

There are some special considerations for charting and reporting multiple instances. We'll discuss them as we explore the views in more detail later in this chapter.