Writing a Performance Counter Input File

You can use any word processor or text editor, such as Microsoft Word, Notepad, or Wordpad, to create or read a performance counter input file.

Tip

Look at the sample performance counter input file included with WCAT for reference while you are reading this section. The sample file, Server.pfc, appears on the Supplement 1 CD-ROM.

To monitor a particular counter, list it on a separate line in the input file. If you are monitoring more than one instance of a component, such as more than one process, processor, disk, or network adapter, list each instance on a separate line. You can list up to 50 performance counters in a file; the counters can be listed in any order.

The lines listing the performance counters should be left-aligned with no tabs or indentations. You can include comments in a performance counter input file; to indicate a comment, place a pound sign (#) at the beginning of the comment line.

Listing a Counter

The entry for each counter should include the name of the performance object you want to monitor, the name or number of the object instance to monitor, and the name of the counter. To find the object name, counter name, and instance name or number, check the Add to Chart dialog box in Performance Monitor. The figure following shows the counters for and instances of the Process object in the Add to Chart dialog box.

Figure 3 Counters for and instances of the Process object in the
Add to Chart
dialog box

The format for a performance counter entry is as follows:

object(instance)\counter

where object represents the name of the performance object that includes the counter, instance represents the name or number of the object instance as it appears in Performance Monitor, and counter represents the name of the performance counter.

Object

In the object section of the entry, type the name of the performance object as it appears in the Add to Chart dialog box, including any spaces.

Instance

In the instance section of the entry, type the name or number of the instance. Some performance objects, such as System, do not have instances. But if an instance name or number appears in the Instance box in the Add to Chart dialog box, you must include that name or number in the performance counter entry.

Include the instance name or number even if there is only one instance of the performance object on the server. If the processor has one server, one instance of the Processor object, number 0, appears in the Instance box. If you are listing a counter for the Processor object, you must include this number 0 in the line.

If you want to monitor more than one instance of an object, list each instance on a separate line in the file. For example, to monitor PhysicalDisk: % Disk Time for two physical disks, 0 and 1, and for the _Total instance that represents both disks, include the following lines in the performance counter input file:

PhysicalDisk(0)\% Disk Time PhysicalDisk(1)\% Disk Time PhysicalDisk(_Total)\% Disk Time

Counter

In the counter section of the entry, type the name of the performance counter as it appears in the Add to Chart dialog box, including any spaces in the name.

Example

For example, to monitor the processor time used by the Internet Information Server process, Inetinfo, you monitor the Process: % Processor Time counter for Inetinfo. An entry for the Process: % Processor Time counter for the Inetinfo process reads as so:

Process(inetinfo)\% Processor Time

In this example, Process is the object, inetinfo is the instance and % Processor Time is the counter.

When you have listed all the counters you want to monitor, save the performance counter input file. You can use any name, but be sure to use the format testname.pfc. Place the file in the WebCtrlr\Scripts directory on the controller.