Gathering Performance data from the command line

When troubleshooting a performance issue it may be beneficial to gather performance data from
the command line in several cases:

  1. You may want to avoid logging on to the server directly
  2. You may have a problem with using the GUI of performance monitor
  3. You may want to export the information to a text file or to a database

To gather performance data from the command line the typeperf command can be used, it can tap
into the counters that can be used with perfmon providing the information on the command line.

The syntax is relatively simple (it can be viewed as a path to a specific counter):

typeperf \\computer\Object(_instance)\Counter

Monitoring processor usage on a system called ‘CORE’:

typeperf \\core\performance(_total)\% Processor Time


Monitoring the available amount of memory:

typeperf “Memory\available mbytes”


To gather information from several sources at once, specify the paths separated by a space:

typeperf “Memory\available mbytes” “\\dc01\Processor(_total)\% Processor Time” \\CORE\Processor(_total)\% Processor Time



Another way of specifying source is by using a file (in this case specify each source on a new line). The syntax is:

typeperf -cf filename



If you do not specify an output location, the system assumes that you want the data to be placed onscreen, yet
the output can be saved to a file using the binary format, comma-delimited and tab-delimited formats.
The syntax is:

typeperf -cf filename -o outputFile -f[bin|csv|tsv]


Another thing that might be of interest is the ability to specify the number of samples and the intervals at which
the samples are taken-both can be set by using the following syntax:

typeperf -cf filename -o outputFile -f[bin|csv|tsv] -si [interval mm:ss] -sc [number of samples] 



For additional information please visit:

One thought on “Gathering Performance data from the command line

Leave a Reply to kpgjjisltju Cancel reply

Your email address will not be published. Required fields are marked *