Typeperf.exe: Performance Data in the Command Window | Next
You must run TypePerf queries in a command prompt window from the directory where the tool is installed.
TypePerf queries consist of the word typeperf, an update interval, and the path to one or more System Monitor counters on the computer. The update interval tells TypePerf how often to retrieve and display the counter data. The counter paths uniquely identify a System Monitor counter. When you use System Monitor, you specify the counter path by selecting a performance object and counter name and, if applicable, the parent object and instance, from the Add to Chart dialog box. When you use TypePerf, you must enter the same data in a string.
Type your query using the following format:
typeperf update-interval "counter-path-1" ["counter-path-2"]
Where each counter path consists of the following elements:
"[\\computer]\performance-object[([parent-object/]instance)]\counter"
The format of a complete query for one counter appears as follows:
typeperf update-interval "[\\computer]\performance-object[([parent-object/]instance)]\counter"
The performance object and counter name are required for all counters. Other elements, such as the name of a parent object and instance, are required only when the counter displays data about a specific instance of an object, such as a counter that monitors one particular thread in a process.
The quotation marks and the backslash preceding the performance object are required even when optional elements are not present. The names of computers, objects, instances and counters must be entered exactly as they appear in System Monitor, including any special characters or spaces in the name.
The following table describes the query elements in more detail:
update-interval | The elapsed time in seconds between updates of performance data. This value also determines how often TypePerf writes data to the command prompt window.
An update interval is required in all TypePerf queries. Each query has one update interval which applies to all counters in the query. |
computer | The name of the computer being monitored.
This field is required only if you are monitoring a remote computer. |
performance-object | The component being monitored, such as Processor, Process, or Physical Disk. In the System Monitor Add to Chart dialog box, performance objects appear in the Object box.
This field is required in all TypePerf queries. |
parent-object | The higher-level performance object of which the object being monitored is a logical part. For example, if the performance object is a thread, the parent object is the process in which the thread runs.
This field is required only when the performance object is a child of another object. In the System Monitor Add to Chart dialog box, parent objects appear in the Instance box on the left side of the ==> arrow. |
instance | Specifies more precisely the object being monitored.
The instance is required for all objects that can appear more than once on the same computer, such as processors or disks. (You must specify an instance for all objects that can have instances, even if your computer only has one item of the object type.) To display data for all instances of an object, enter _Total in the Instance field. In the System Monitor Add to Chart dialog box, instances appear in the Instance box. When the performance object has a parent object, the instance appears on the right side of the ==> arrow in the Instance box. |
counter | Specifies the System Monitor counter you want to display. The counter determines what information is collected about the object.
This field is required in all TypePerf queries. In the System Monitor Add to Chart dialog box, the counters for each object appear in the Counter box. |