The "CPU Usage" metric in Spotlight is based on the following calculation:
AvgCPU(n) = ((1 - (PercentProcessorTime2(n) - PercentProcessorTime1(n)) / (Timestamp_Sys100NS2 - Timestamp_Sys100NS1))*100
where n = CPU number for multiprocessor machines, PercentProcessorTime2 and PercentProcessorTime1 - counter values from current end previous data collection
Spotlight will summaries AvgCPU(n) values and divide result by number of CPUs then show averaged CPU usage value which is based on last 5 data collections. This value is calculated every 30 second when you are in the Spotlight Home page. If the Spotlight GUI is closed, it is calculated in intervals set from the collection schedule in "Configure | Scheduling | Processors." This method avoids triggering the CPU alarm on short-lasting spikes.
The Win32_PerfRawData_PerfOS_Processor class provides raw data from performance counters that monitor processor activity. The "CPU Usage" average calculation comes directly from these performance counters for the mentioned above formula. Spotlight does not get the data from individual processes and then extrapolate the final average based on its own algorithm. Rather, we use what Microsoft already given.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center