[python-win32] wmi: processor class seems slow
Tim Golden
mail at timgolden.me.uk
Thu Mar 4 20:23:59 CET 2010
On 04/03/2010 18:42, Alex Hall wrote:
> Hi all,
> I have a script that gets the load of a given core, or the average of
> all cores, along with other information, like free ram and hard disk
> space. The script runs fine, but when I give it processor-related
> commands it is sometimes rather fast and sometimes quite slow. Delays
> range from one to ten or fifteen seconds, but only on processor
> queries, nothing else.
Point of information: certain of the attributes exposed on the
Win32_Processor class are calculated at runtime. At this moment
I don't remember which, but if you're not already, specify the
columns you want to retrieve (ie don't use "SELECT *" or, if you're
using my wmi module, pass a list of fields as the first positional
parameter to the WMI () call.
I am not sure how this is and would very much
> like to correct the problem as I plan to make this script publically
> available. I figure it must be possible since system resource
> gadgets/widgets can keep a constantly updating graph of processor
> performance. How can I get rid of this frustrating delay? Thank you in
> advance for any help!
Why not make the code publicly available now (if only on pastebin)
so we can see better.
TJG
More information about the python-win32
mailing list