What exactly $(Get-WmiObject win32_processor | select LoadPercentage) returns?

3.3k Views Asked by At

I am trying to check the Average CPU Load by using:

$ $($(Get-WmiObject win32_processor | select LoadPercentage).LoadPercentage) | Measure-Object -Average).Average

However, I am not how exactly it gets the number...

If there are 2 physical cores and 12 cores in each, does LoadPercentage returns average per Cpu, that is average per core?

1

There are 1 best solutions below

0
On

This is from my 1 CPU-socket computer. That + the quote from Win32_Processor documentation from MSDN below shows that it is the average percentage for the CPU (socket).

So your script will calculate the average CPU-load for the server (average for all processors, not individual cores).

Get-WmiObject win32_processor | select LoadPercentage

LoadPercentage
--------------
             5

LoadPercentage

Load capacity of each processor, averaged to the last second. Processor loading refers to the total computing burden for each processor at one time.

Source: MSDN