Typeperf

Writes performance counter data to the command window, or to a supported log file format. To stop Typeperf, press CTRL+C.

Syntax

Typeperf [Path [path ...]] [-cf FileName] [-f {csv|tsv|bin}] [-si interval] [-o FileName] [-q [object]] [-qx [object]] [-sc samples] [-config FileName] [-s computer_name]

Parameters

-c {Path [path ...] | -cf FileName} : Specifies the performance counter path to log. To list multiple counter paths, separate each command path by a space.

-cf FileName : Specifies the file name of the file that contains the counter paths that you want to monitor, one per line.

-f {csv|tsv|bin} : Specifies the output file format. File formats are csv (comma-delimited), tsv (tab-delimited), and bin (binary). Default format is csv.

-si interval [mm:] ss : Specifies the time between samples, in the [mm:] ss format. Default is one second.

-o FileName : Specifies the pathname of the output file. Defaults to stdout.

-q [object] : Displays and queries available counters without instances. To display counters for one object, include the object name.

-qx [object] : Displays and queries all available counters with instances. To display counters for one object, include the object name.

-sc samples : Specifies the number of samples to collect. Default is to sample until you press CTRL+C.

-config FileName : Specifies the pathname of the settings file that contains command line parameters.

-s computer_name : Specifies the system to monitor if no server is specified in the counter path.

/? : Displays help at the command prompt.

Remarks

Counter path format

The general format for counter paths is as follows: [\\Computer]\object[parent/instance#index]\counter] where:

The parent, instance, index, and counter components of the format may contain either a valid name or a wildcard character. The computer, parent, instance, and index components are not necessary for all counters.

You determine the counter paths to use based on the counter itself. For example, the LogicalDisk object has an instance index, so you must provide the #index or a wildcard. Therefore, you could use the following format:

\LogicalDisk(*/*#*)\*

In comparison, the Process object does not require an instance index. Therefore, you could use the following format:

\Process(*)\ID Process

The following is a list of the possible formats:

\\machine\object(parent/instance#index)\counter

\\machine\object(parent/instance)\counter

\\machine\object(instance#index)\counter

\\machine\object(instance)\counter

\\machine\object\counter

\object(parent/instance#index)\counter

\object(parent/instance)\counter

\object(instance#index)\counter

\object(instance)\counter

\object\counter

If a wildcard character is specified in the parent name, all instances of the specified object that match the specified instance and counter fields will be returned.

If a wildcard character is specified in the instance name, all instances of the specified object and parent object will be returned if all instance names corresponding to the specified index match the wildcard character.

If a wildcard character is specified in the counter name, all counters of the specified object are returned.

Partial counter path string matches (for example, pro*) are not supported.

Query formats

For counter path queries use this format Typeperf [{-q | -qx [\\Computer\] [object] [-o outputfile}].

Use the following command lines for complete queries:

Typeperf [\\Computer]\object[instance]\counter]

Typeperf -cf input file

Using the -config option

The contents of the setting file used with the -config option should have the following format:

[command_option]

value

where command_option is a command line option and value specifies its value. For example:

[-c]

\Windows\mypath

[-o]

report.csv

[-s]

mysystem

For more information about incorporating Typeperf into your Windows Management Instrumentation (WMI) scripts, see Scripting Logs and Monitoring at the Microsoft Windows Resource Kits Web site.

Examples

To display processor and memory counters, type:

typeperf "\Memory\Available bytes" "\processor(_total)\% processor time"

To display Explorer process counters every three seconds in a CSV-output file format, type:

typeperf "\Process(Explorer)\Thread Count" -si 3 -o typeperf.csv

To display 50 samples of RAS counters on computer Server_name, type:

typeperf "\RAS port(LPT1)\Bytes Transmitted" -sc 50 -s Server_name

To display counter values for 50 samples of the counters listed in the file input.txt, at sample intervals of 120 seconds, type:

typeperf -cf input.txt -si 120 -sc 50 -f TSV -o domain2.tsv

To query installed counters with instances, type the following command. Be aware that the -qx parameter will return a far greater number of performance counters than the -q parameter.

typeperf -qx

To query physical disk counters without instances on computer Server5 and write them to a file called diskctrs.txt, type:

typeperf -q \\Server5\PhysicalDisk -o diskctrs.txt

Formatting legend

FormatMeaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Logman

Tracerpt

Relog

Command-line reference A-Z



© 2014 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies