Analysis for Total % CPU time usage

Hi
I found an example of finding the % of CPU used in this link
http://bigfix.me/relevance/details/2997084

unique values of (string values of selects “LoadPercentage from Win32_Processor” of wmi)

The analysis returns the load of each CPU separately… I would like to have the analysis display a single % of over all CPU load…
Any help would be appreciated.

sums of (it as floating point) of (string values of selects "LoadPercentage from Win32_Processor" of wmis)
1 Like

Wouldn’t you then want to divide that by the number of processors?

Bob_K

1 Like

Good point. I didn’t really test this, but that is probably the case.

This seems to work:

sum of (it as floating point / sum of (it as floating point) of (string values of selects “numberofprocessors from Win32_computersystem” of wmis)) of (string values of selects “LoadPercentage from Win32_Processor” of wmis)

Thanks very much for the help!

This is just my preference, but I would probably write it like this:

( sums of (it as floating point) of (string values of selects "LoadPercentage from Win32_Processor" of wmis) ) / ( sum of (it as floating point) of (string values of selects "numberofprocessors from Win32_computersystem" of wmis) )

The main reason is this is a direct combination of 2 different relevance statements, so than can be used seperately or together as is.

There are tons of ways to write the exact same relevance, which is both good for flexibility reasons, but bad for consistency reasons.