Re: WMI

  • From: Alex Hall <mehgcap@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Wed, 13 Jan 2010 08:51:46 -0500

I am not looking for how many processors I have, but rather each
core's LoadPercentage. It seems like LoadPercentage goes to
NumberOfProcessors and not LogicalProcessors, and I want to get the
load for each Logical processor and not Physical processor.

On 1/13/10, Johannes Grib <johannesg@xxxxxxxxx> wrote:
> Hello Alex,
> "NumberOfLogicalProcessors" might be the property you're looking for?
>
> Under XP I get the following when "print p"
>
> instance of Win32_Processor
> {
>       AddressWidth = 32;
>       Architecture = 0;
>       Availability = 3;
>       Caption = "x86 Family 6 Model 15 Stepping 6";
>       CpuStatus = 1;
>       CreationClassName = "Win32_Processor";
>       CurrentClockSpeed = 2131;
>       CurrentVoltage = 16;
>       DataWidth = 32;
>       Description = "x86 Family 6 Model 15 Stepping 6";
>       DeviceID = "CPU0";
>       ExtClock = 266;
>       Family = 2;
>       L2CacheSize = 2048;
>       Level = 6;
>       LoadPercentage = 0;
>       Manufacturer = "GenuineIntel";
>       MaxClockSpeed = 2131;
>       Name = "Intel(R) Core(TM)2 CPU          6400  @ 2.13GHz";
>       NumberOfCores = 1;
>       NumberOfLogicalProcessors = 2;
>       PowerManagementSupported = FALSE;
>       ProcessorId = "BFEBFBFF000006F6";
>       ProcessorType = 3;
>       Revision = 3846;
>       Role = "CPU";
>       SocketDesignation = "";
>       Status = "OK";
>       StatusInfo = 3;
>       Stepping = "6";
>       SystemCreationClassName = "Win32_ComputerSystem";
>       SystemName = "JOHANNESSP2";
>       UpgradeMethod = 1;
>       Version = "Model 15, Stepping 6";
> };
>
>
>
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx
> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Hall
> Sent: Wednesday, January 13, 2010 4:48 AM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: WMI
>
> Hi all,
> I am playing around with WMI, trying to get the load of both cores of my
> dual core AMD processor. However, I am only getting one number, not two as I
> would expect. I thought I would get two numbers returned (I itterate through
> all the processors, at least I think I do). It is the same for all the other
> properties I have tried (clock speed, socket, more), just one piece of
> information, not one per core. Is there a way to get info about each core,
> or is this processor-specific? Windows 7 64 bit. Python code is below.
>
>
> import os, sys, wmi, win32com.client
> speaker=win32com.client.Dispatch("Say.Tools");
> c=wmi.WMI();
> for p in c.win32_Processor():
>  speaker.say(p.LoadPercentage);
> # end for
> speaker=None;
>
> Have a great day,
> Alex
> Email: mehgcap@xxxxxxxxx
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>


-- 
Have a great day,
Alex
My email is now: mehgcap@xxxxxxxxx
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

  • Follow-Ups:
  • References:

Other related posts: