How do I get the PC's Processor speed?
- From: kyosohma@xxxxxxxxx
- Date: Tue, 06 Nov 2007 19:18:57 -0000
Hi,
We use a script here at work that runs whenever someone logs into
their machine that logs various bits of information to a database. One
of those bits is the CPU's model and speed. While this works in 95% of
the time, we have some fringe cases where the only thing returned is
the processor name. We use this data to help us decide which PCs need
to be updated, so it would be nice to have the processor speed in all
cases.
Currently, this script is run on Windows boxes only, most of which
have Windows XP on them. Right now I am having Python check the
following registry key for the CPU info: HKEY_LOCAL_MACHINE\HARDWARE\
\DESCRIPTION\\System\\CentralProcessor\\0
I've also used Tim Golden's WMI module like so:
<code>
import wmi
c = wmi.WMI()
for i in c.Win32_Processor ():
cputype = i.Name
</code>
On the problem PCs, both of these methods give me the same information
(i.e. only the processor name). However, if I go to "System
Properties" and look at the "General" tab, it lists the CPU name and
processor speed. Does anyone else know of another way to get at this
information?
Thanks!
Mike
.
- Follow-Ups:
- Re: How do I get the PC's Processor speed?
- From: "Martin v. Löwis"
- RE: How do I get the PC's Processor speed?
- From: Michael Bacarella
- Re: How do I get the PC's Processor speed?
- From: Chris Mellon
- Re: How do I get the PC's Processor speed?
- Prev by Date: Re: Populating huge data structures from disk
- Next by Date: Re: How do I get the PC's Processor speed?
- Previous by thread: Re: Populating huge data structures from disk
- Next by thread: Re: How do I get the PC's Processor speed?
- Index(es):
Relevant Pages
|