simpleTemp.py

Markus Demleitner msdemlei at cl.uni-heidelberg.de
Mon Nov 28 20:48:25 EST 2005


(linuxppc64-dev readers: I thought others might be interested in
this -- this is about imac g5 temperatur management)

On Sun, Nov 27, 2005 at 10:23:07PM +0000, Chris O'Toole wrote:
> First off, I had to amend the program slightly because my machine has 3 fans 
> wheras your program only deals with 2 (probably you have a different rev). I 
Ah well, so you have a harddrive fan -- on my machines I couldn't
find one.  I don't think it really makes sense to include that guy in
the main control loop.

I guess one should rather find the temperature sensor on that device
(unfortunately, I'm told it's not accessible as easily as the two SMU
sensors simpleTemp handles) and do a control loop for this sensor and
the hard disk temperature.

Or, just let the HD fan spin slowly (see below)...

> got the min and max speeds from the /proc/device-tree directory using 
> hexdump.
> 
> I think my main problem is I don't know how the results from the smu should be 
> scaled. I have attached the output from the prog that I got when I ran it in 
Nor do I -- I just guessed.  benh says the limits are hidden
somewhere in the smu partitions, but I haven't bothered to get them
out of there.

> debug mode - the "Val" value in the sensor lines looks way off to me and the 
No, I think they're fine.  Try ramping up both the intervention value
(right now, 600) and the panic value (right now, 640) by, say, 20 or
so.  At least my iMacs shut off if they got too hot (unfortunately, I
didn't have the sensor readings in the two cases I managed to
overheat them), so I figure the risk of damaging anything is rather low.

> prog just ramps up the fans. I also am not sure what the integral and 
> derivative numbers are for in the Sensor class so that might be a problem too 
> - or even if I should have different values from yours in the g5Sensors 
> array? 
The weights just say what fan reacts how quickly, so these won't help
you.

You could, however, do something along the lines of

			FanController("HardDrive", sensors,
				g5Fans[2].setSpeed, initVal=20,
				derivWeight=0, propWeight=0),

to have the hard drive fan at a constant 20% for max speed.

Note that benh already has code that does this stuff sensibly, it's just
that the patches are against kernels that aren't published as far as
I can see, which is why I never came to test them and decided to wait
for their inclusion in some mainline kernel.  Benh: Could you provide
patches for your windfarm/cpufreq stuff against some well-known
kernel (like 2.6.14 or so?).  I, for one, would really appreciate it
but didn't want to bug you when I felt it was mainly my problem.

Cheers,

           Markus




More information about the Linuxppc64-dev mailing list