I want the load per core, though, so my dual core AMD should give me two percentage numbers, one per core, but it only gives me one. A forum post I came across says that this number is not even an average, but the load of just the first core. Why is my second core being ignored? I get the information in a loop, as my code said, but all I get is the first of the two cores?
Have a great day, Alex Email: mehgcap@xxxxxxxxx----- Original Message ----- From: "Sina Bahram" <sbahram@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx> Sent: Wednesday, January 13, 2010 10:58 Subject: RE: WMI
Keep in mind you can have up to two logical processors per core, and these days you can have up to four or six cores, so with hyperthreading, if youhave a six core processor with HT, you'll have twelve logical processors toiterate through. Logical processors which share the same core, I think, and strong emphasison the think, have to run at the same clockspeed until very recently, sinceall hyperthreading is, is the addition of some ALUs to the di. Take care, Sina -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Hall Sent: Wednesday, January 13, 2010 8:52 AM To: programmingblind@xxxxxxxxxxxxx Subject: Re: WMI 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 mydual core AMD processor. However, I am only getting one number, not two asIwould expect. I thought I would get two numbers returned (I itteratethroughall the processors, at least I think I do). It is the same for all theotherproperties I have tried (clock speed, socket, more), just one piece ofinformation, 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 __________ 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