WMI Win32_PerfFormattedData_PerfOS_Processor

tybarton used Ask the Experts™
I have a service running to monitor various server items. One is the CPU which I am using a call to Win32_PerfFormattedData_PerfOS_Processor which I am pulling the property PercentProcessorTime.

I am checking two servers. On the first one when I look in Task manager at the performance tab I see 17 graphs. The first is a overall total cpu usage then one for each core. When I run my code I get 17 return values.

I am going to be graphing these values and the issue I have is determining which return value represents the first graph which is the average cpu usage. Is it the first value or the last?

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014

Thanks CodeCruiser,

I have actually already looked at these awhile ago. The show getting one of the values.

This turned out to be one of those real DUH moments. After I posted I looked at the properties of the Win32_PerfFormattedData_PerfOS_Processor class and noticed the "Name" property.

I added that to my code and found that the last value returned is named _Total.



Found a property of the class that gave me the information I was looking for.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial