Forum
[DONE] Displaying the RPi temperature - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Testing & Experimental (/forum-21.html)
+--- Thread: [DONE] Displaying the RPi temperature (/thread-1529.html)



Displaying the RPi temperature - IriDium - 22nd Oct, 2013 03:17 AM

Displaying the RPi temperature

As part of my testing procedure, I wanted to know the temperature of the RPi through various phases. There was nothing out there that served my purpose, so I wrote my own script, that would do that.

It's written in python and utilises curses to do the display. It's not the most elaborate and probably full of errors that qualified python developers know about. However it works, and does not consume vast amounts of CPU.

It polls the temperature every 60s and displays the current temperature, high and low, changing colour as the temperature increases so red is bad and purple is very bad. (you can change it you wish)

[attachment=240]
I give it to you as free, I do not guarantee it will work, it should not trash your RPi, it should not have sex with your daughter nor should it communicate with aliens - you have been warned. Use at your own risk as all the SW companies now say - I cannot be responsible for your daughters purity Blush

Grab it from RPi Temp save to /home/xbian/bin. Call it what you like but add .py at the end. Make it executable chmod +x filename.py

Before it will work you need to install python-psutils so sudo apt-get install -y python-psutil

If you like it and improve it, please post your improvements so we can all benefit. Tnx

If you get the error: No such file or directory: Some <cntl> M have got into it - vi it and remove all <cntl> M and it will work

It's only there for 30 days so get if you want it.


RE: Displaying the RPi temperature - Skywatch - 28th Oct, 2013 08:39 PM

Thanks a million for posting that.

I have added small heatsinks + fans to my pi's lately and they are running much cooler (+27C as opposed to +54C!). I was wondering about using a thermal control to aadjust the speed and this looks like a great help in building that.

Thanks!

Skywatch


RE: Displaying the RPi temperature - IriDium - 29th Oct, 2013 03:24 AM

@Skywatch. My pleasure - glad someone liked it.

I'd be interested to know how you get on. My main RPi is cased, non heatsinked and runs at around 55. I'd like to lower it a bit, but a heatsink in a case seems a waste of time, as the heat STILL has no where to go. An active fan is the answer - USB powered of course and definitely silent but will it draw enough heat away from the chips?

Also, as the optimal temperature of most electronics is about 50 degrees, is all this cooling really required for "normal" operation? - OC for sure.

Just a thought.

I'm going to run Beta 2 on "normal" OC for a couple of weeks, as it it so fast at the moment, that I feel that the Xbian OC may not be required. Watch this space.


RE: Displaying the RPi temperature - Skywatch - 29th Oct, 2013 03:52 AM

Well I tried this and here's what I get......

xbian@Lounge ~ $ sudo apt-get install -y python-psutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-psutils


Any idea what's going on here?

Skywatch


RE: Displaying the RPi temperature - IriDium - 29th Oct, 2013 04:21 AM

(29th Oct, 2013 03:52 AM)Skywatch Wrote:  Well I tried this and here's what I get......

xbian@Lounge ~ $ sudo apt-get install -y python-psutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-psutils


Any idea what's going on here?

Skywatch

Doh. Too many fingers. Try psutil without the "s"


RE: Displaying the RPi temperature - Skywatch - 29th Oct, 2013 04:58 AM

(29th Oct, 2013 04:21 AM)IriDium Wrote:  Doh. Too many fingers. Try psutil without the "s"

Yup! Wink

Thanks for that, all working now - Nice little useful script.

Cheers

Skywatch


RE: Displaying the RPi temperature - mk01 - 31st Oct, 2013 06:32 PM

btw: in default installation there is

Code:
sudo -i
xbian-stats



RE: Displaying the RPi temperature - IriDium - 1st Nov, 2013 05:24 AM

(31st Oct, 2013 06:32 PM)mk01 Wrote:  btw: in default installation there is

Code:
sudo -i
xbian-stats

Cool, didn't know about that - although I must admit mine is prettier Heart


RE: Displaying the RPi temperature - IriDium - 21st Nov, 2013 04:09 AM

My "main" Xbian is running a fully cased RPi - so without any external vents (I don't want any dust, toys, flys or other detritus floating in at unexpected times.

My "Normal" running temperature is 53 degrees whether music or HD are playing - Beta 2 of course.

So I thought I'd find out what all the fuss is about these heat sinks - seems like a wheeze - stick em on and lower the temperature. What a load of ballony.

I purchased a "good" set of copper heat sinks (details on request) and stuck them on. I awaited with amazement as I stuck em on - Nothing f**** happened. After a while, the temperature DID drop - by 2 degrees.

So users, if you are intrigued by installing a heat sink (go ahead it won't break anything, but it won't make much difference either if it is in a case)

Taking the lid off - did make a difference - a 10 degree drop.

So I wondered...... I got a case with a 25mm hole in it and plugged a 5V 40mm fan (It's just one I had) over the hole and spliced a male USB lead onto it (It draws 0.07 amps) and let it loose.

Ok it was a bit noisy but nothing that music or video wouldn't cover but the core temperature stayed around 23 degrees.

So if you want to cool your RPi get a fan.

With my FULL installation (pictures on request) I went from 53 degrees to 23 degrees,

Conclusions:

Heat sinks, fans, extras are not needed. Save your money.


RE: Displaying the RPi temperature - CurlyMo - 21st Nov, 2013 06:25 AM

The RPi is made to stand temps. of no more than 85c so i wouldn't bother about temps. higher then 60c. I never got there. It's also made to stop running when temps. are higher then that, so with normal settings (not disabling the temp override) you will not break your RPi on temp.


RE: Displaying the RPi temperature - mk01 - 21st Nov, 2013 01:38 PM

I can confirm.

My overclocked RPI runs 59.5 constantly.