How do I get the PC's Processor speed?

Michael Bacarella mbac at gpshopper.com
Tue Nov 6 16:56:36 EST 2007


> > This information is hardware dependent and probably unreliable.
> >
> > Why not run a benchmark and report the results instead?
> > Like bogomips?  <URL:http://en.wikipedia.org/wiki/Bogomips>
> 
> That's an interesting idea, but this is in a login script, so I can't
> exactly run benchmarks while logging in as the users will get
> impatient quite quickly. They already think the scripts take too long
> as it is.

Bogomips can be easily calculated in 10ms.  The Linux kernel calculates it
during
system boot.  There's an ANSI C utility floating around that you could
distribute.
Just a thought...

> While this information may be unreliable, it is desired by my boss for
> the express purpose of budgeting upgrades in our organization.

The information that gets displayed in the System Properties / General tab
is,
I believe, a string copied out of the CPU.  I've had systems where it used
to simply say "Pentium" in that box as well.  That's why it strikes me as
unreliable.

Executing the CPUID instruction may be helpful if you can figure out how
these guys are using it:
    http://www.cpuid.com/cpuz.php




More information about the Python-list mailing list