≡ Menu

Collect performance data from command prompt

While browsing for something, I came across this nice windows built-in tool called, “typeperf”. This tool redirects the output of performance counter values to command prompt. The normal way for collecting performance values is to open perfmon and configure the options trough GUI to capture the output into some CSV or other file. But this command line tool is very handly to have the counter results from command line.

If some one asked me to monitor the CPU utilization of remote system, I will simply issue below command in my command prompt(ofcourse I need admin rights on remote machine or the account I am using should be member of permon related groups if the remote machine is of a server OS). This command has most of the options that you can set using perfmon.

c:> typeperf “\RemoteMachineprocessor(_Total)% Processor Time”

“(PDH-CSV 4.0)”,”\RemoteMachineprocessor(_Total)% Processor Time”
“05/20/2009 20:55:11.402″,”37.682755”
“05/20/2009 20:55:12.465″,”12.502240”
“05/20/2009 20:55:13.465″,”33.825223”
“05/20/2009 20:55:14.559″,”36.987914”
“05/20/2009 20:55:15.668″,”21.877000”
“05/20/2009 20:55:16.668″,”3.127480”
“05/20/2009 20:55:17.668″,”9.377320”
“05/20/2009 20:55:18.668″,”6.252400”
“05/20/2009 20:55:19.668″,”10.939780”

Below is the command help and I know you can build your custom command using this. Let me know if you need any help.

Refer this link for syntax and to have more examples. You can type
“typeperf /?” at command prompt to get help on this command.

I WELCOME YOUR COMMENTS;THAT MAKES ME PERFECT:-)

Happy learning..,
Sitaram Pamarthi.

Comments on this entry are closed.