Odd behavior with Typerf and processor

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!
 
F

foxidrive

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top