Odd behavior with Typerf and processor

  • Thread starter Thread starter Rob Wiese
  • Start date Start date
R

Rob Wiese

I've been trying to write a script to gather several different
performance counters at once for a series of mrtg graphs.

Because the servers are cross domains, it is complex to use wmi in a
secure manner. So, I am using typeperf.exe, which seems ideal, except
for the following problem:

If I execute:

typeperf -s MyServer -sc 1 "\Processor(_Total)\% Processor Time"
I get a number verifable via performance monitor. In my case its a
number like "2.346250"

But, if I execute:
typeperf -s MyServer -sc 1 -o output.csv -y "\Processor(_Total)\%
Processor Time"
Output.csv holds the number "99.982059766782541"

Anyone else run into this? Anyone know why or how to get a proper
number?

This behavior is consistent for me on XP, 2k and 2k3 platforms.

Thanks!
 
I've been trying to write a script to gather several different
performance counters at once for a series of mrtg graphs.

Because the servers are cross domains, it is complex to use wmi in a
secure manner. So, I am using typeperf.exe, which seems ideal, except
for the following problem:

If I execute:

typeperf -s MyServer -sc 1 "\Processor(_Total)\% Processor Time"
I get a number verifable via performance monitor. In my case its a
number like "2.346250"

But, if I execute:
typeperf -s MyServer -sc 1 -o output.csv -y "\Processor(_Total)\%
Processor Time"
Output.csv holds the number "99.982059766782541"

Anyone else run into this? Anyone know why or how to get a proper
number?

This behavior is consistent for me on XP, 2k and 2k3 platforms.

Thanks!

Just a guess, but is one figure "% CPU used" and the other "% CPU free" ?

If that is the case then subtract the second figure from 100.
 
Back
Top