[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cpu speed measurement



On Tue, 20 Nov 2001, Michael Thaler wrote:

>I have a Sony Vaio F212K. My BIOS has an option to reduce CPU speed if
>the computer is idle. I want to try the option to see if it works with
>linux and to save some battery power. Does anyone know a programm to
>measure the cpu speed or even better the clockrate? The KDE control

/proc/cpuinfo was suggested, but I'm almost certain it won't work:
Linux measures it at the boot and not afterwards, so it keeps
always same.

Measuring the CPU MHz is very difficult in your case. In principle
you could run a test program, but then the CPU would *not* be idle
and the MHz rate would only show the rate of a non-idle CPU.

A program that measures the clock() and uses rdtsc the measure the
MHz rate, might work. Or maybe not, I'm not sure if rdtsc returns
useful value in this case (I think it depends on the CPU).

--
| Tuukka Toivonen <tuukkat@ee.oulu.fi>       [PGP public key
| Homepage: http://www.ee.oulu.fi/~tuukkat/       available]
| Studying information engineering at the University of Oulu
+-----------------------------------------------------------



Reply to: