| Author |
Message |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Wed 07 Jul 2010, 12:24 Post subject:
CPUtemp - A CPU Temperature Monitor |
|
One of my machines won't run traytemp, so I decided to make my own. I noticed that System > Hardinfo > Sensors has two readings - the CPU core temperature and the thermal zone temperature. There is a considerable difference between the two and no consistency among machines as to which is correct.
This applet shows both readings plus the CPU frequency scaling status and the current CPU frequency.
1. Install the PET below.
2. You should see a "flame" icon in the system tray. It is launched from your /root/Startup folder. Click it.
3. If you have an AMD or Intel processor, CPUtemp should display the temperature information. If not, click on Help and follow the instructions for detecting other temperature modules.
4. To enable OnDemand CPU scaling, run the CPU Frequency Scaling Tool. Look for it in Menu > Utility or Menu > System > System Status and Config.
 |
| Description |
Updated 2012-10-06 Un-install any old versions before installing.
|

Download |
| Filename |
CPUtemp-1.6.pet |
| Filesize |
76.49 KB |
| Downloaded |
636 Time(s) |
Last edited by rcrsn51 on Tue 12 Mar 2013, 11:04; edited 21 times in total
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2675 Location: Kiel,Germany
|
Posted: Fri 01 Oct 2010, 04:58 Post subject:
|
|
1: This .pet introduced me to `sensors` and sensors-detect .
Hardinfo now shows temp ! This is very very good !
2: I also was introduced to modules I never stumbled upon : it87 , acpi* , hwmon , k8temp , processor and much more. Even without k8temp on my K7 board i got temp.
3. /usr/bin/CPUtemp I had to modify a little, because even with loaded acpi* via BootManager and BOOT_IMAGE=/dpup004/vmlinuz pdev=sdc3 psubdir=dpup004 acpi=force from /proc/cmdline
I still have no /proc/acpi -directory
| Code: | if [ -d /proc/acpi/ ]; then
THRMFILE=`find /proc/acpi/thermal_zone -name "temperature"` |
without such prove the screen frooze clicking the sun and even killing kill -9
7858 root 0:00 tr -s
7859 root 0:00 sed s/temperature/THRM Temp/
didn't help .... I had to kill X ! and startx again !
Now the clicking the sun doesn't show any tempers but it doesn't freeze anymore.
I also if'ed
| Code: | if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq ]; then |
so the end looks like this for now:
| Code: | xmessage -file /tmp/CPUtemp.txt -timeout 10 -buttons Okay:0,Help:1
[ $? -eq 1 ] && exec xmessage -file /usr/bin/CPUtemp.hlp
fi
fi
else
echo line 43 $?,$FREQ,$THRMFILE
exit
fi |
var-log-messages:
ACPI Error: A valid RSDP was not found (20091214/tbxfroot-219)
ACPI WAKEUP ==> [0000011000 - 0000015000]
Kernel command line: BOOT_IMAGE=/dpup004/vmlinuz pdev=sdc3 psubdir=dpup004 acpi=force
ACPI: Interpreter disabled.
pnp: PnP ACPI: disabled
|
|
Back to top
|
|
 |
Karl Godt

Joined: 20 Jun 2010 Posts: 2675 Location: Kiel,Germany
|
Posted: Fri 01 Oct 2010, 13:38 Post subject:
|
|
now the code is that :
| Code: | #!/bin/sh
#modprobe k8temp
#modprobe coretemp
sensors -A | tr -s " " > /tmp/CPUtemp.txt
if [ -d /proc/acpi/ ]; then
THRMFILE=`find /proc/acpi/thermal_zone -name "temperature"`
cat $THRMFILE | tr -s " " | sed s/"temperature"/"THRM Temp"/ >> /tmp/CPUtemp.txt
echo >> /tmp/CPUtemp.txt
if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | grep -q ondemand
if [ $? -eq 0 ]; then
echo "OnDemand CPU Scaling: on" >> /tmp/CPUtemp.txt
else
echo "OnDemand CPU Scaling: off" >> /tmp/CPUtemp.txt
fi
if [ -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq ]; then
FREQ=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`
if [ -n "$FREQ" ]; then
echo -n "Current CPU Freq: " >> /tmp/CPUtemp.txt
echo ${FREQ%???} MHz >> /tmp/CPUtemp.txt
fi
xmessage -file /tmp/CPUtemp.txt -timeout 10 -buttons Okay:0,Help:1
[ $? -eq 1 ] && exec xmessage -file /usr/bin/CPUtemp.hlp
fi
fi
else
# echo line 43 $?,$FREQ,$THRMFILE
xmessage -file /tmp/CPUtemp.txt -timeout 107 -buttons Okay:0,Help:1
[ $? -eq 1 ] && exec xmessage -file /usr/bin/CPUtemp.hlp
fi |
 |
| Description |
|
| Filesize |
176.92 KB |
| Viewed |
6061 Time(s) |

|
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Fri 01 Oct 2010, 14:25 Post subject:
|
|
Thanks for this. I see the problem with missing files and have uploaded a patched version.
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Mon 10 Jan 2011, 12:45 Post subject:
|
|
CPUtemp v1.1 is posted above. If you have previously installed v1.0, you MUST remove it from the PPM before installing the new version.
|
|
Back to top
|
|
 |
Bert

Joined: 30 Jun 2006 Posts: 698
|
Posted: Fri 21 Jan 2011, 09:36 Post subject:
|
|
Just discovered this pet. Worked perfectly...after I changed from openbox to jwm The included guide was a great help.
Clicking the little sun reveals a healthy 33°C core temperature.
For the first time on this box, Hardinfo is displaying temperatures!
Thank you rcrsn51!
_________________

|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Fri 21 Jan 2011, 09:49 Post subject:
|
|
Glad you like it. If you don't want to use JWM, you can run CPUtemp from the command line with
Or you can drag a shortcut to /usr/local/bin/CPUtemp onto your desktop.
|
|
Back to top
|
|
 |
Bert

Joined: 30 Jun 2006 Posts: 698
|
Posted: Fri 21 Jan 2011, 10:21 Post subject:
|
|
| rcrsn51 wrote: | Glad you like it. If you don't want to use JWM, you can run CPUtemp from the command line with
Or you can drag a shortcut to /usr/local/bin/CPUtemp onto your desktop. |
You mean like this?
Thanks again!
| Description |
|
| Filesize |
78.11 KB |
| Viewed |
5463 Time(s) |

|
_________________

|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Fri 21 Jan 2011, 12:21 Post subject:
|
|
So Mr. Shakespeare might have said, "Shall I compare thy CPU to a Summer's day?"
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Wed 26 Jan 2011, 22:43 Post subject:
|
|
Mick and I are pleased to announce the release of CPUtemp v1.2. This version has a simplified installation procedure and a nicer looking user interface. It should work with other window managers in addition to JWM.
See the first post.
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Sun 30 Jan 2011, 07:45 Post subject:
|
|
CPUtemp v1.3 is posted above. This release is now a gtkdialog app, so it removes the dependency on gxmessage. Also, it resolves some problems with displaying temperatures in non-English languages.
Thank you to Béèm for being my regular tester.
|
|
Back to top
|
|
 |
rcrsn51

Joined: 05 Sep 2006 Posts: 7745 Location: Stratford, Ontario
|
Posted: Mon 31 Jan 2011, 11:46 Post subject:
|
|
For those of you who prefer your temperature readings in Fahrenheit, here are the modifications to CPUtemp.
1. Open the file /usr/local/bin/CPUtemp.
2. Go to Line 8 and add an "f" as follows
| Code: | | sensors -Af | tr -s " " > /tmp/CPUtemp.txt |
3. Go to Line 13 and insert a new line AFTER it.
| Code: | TEMP=${TEMP%???}
let TEMP=TEMP*9/5+32 |
4. On the next line, change the "C" to an "F".
| Code: | | echo "THRM Temp: " $TEMP F >> /tmp/CPUtemp.txt |
|
|
Back to top
|
|
 |
lithpr

Joined: 10 Mar 2011 Posts: 186
|
Posted: Thu 19 May 2011, 08:20 Post subject:
|
|
Works great on Lucid Puppy 5.2.5! Thank you very much!
|
|
Back to top
|
|
 |
nooby
Joined: 29 Jun 2008 Posts: 9385 Location: SwedenEurope
|
Posted: Thu 19 May 2011, 11:09 Post subject:
|
|
Oh I should have found this one a year ago. So much frustration.
Now I know the CPU temp. it is not 26 which I was very skeptical to. it is 48 Celsius. That is more likely to be the true temp than 26 C.
So thanks indeed for providing this pet. I tested it on Snow5 and on Ice-010
_________________
I'm a noob so I use Google Search of Puppy Forum
|
|
Back to top
|
|
 |
playdayz

Joined: 25 Apr 2008 Posts: 3705
|
Posted: Thu 25 Aug 2011, 16:21 Post subject:
|
|
Oh wait a minute, in a terminal i did 'modprobe w83627ehf' and now I have more info than I wanted
Hi rcrsn51, I run sensors-detect
| Code: | Found `Winbond W83627EHF/EF/EHG/EG Super IO Sensors' Success!
(address 0x290, driver `w83627ehf')
|
That is the only Success.
Then I get CPUTemp in the systray. But all I get is
| Code: | CPUTemp
ONDemand CPU Scaling On
Current CPU Frequency 150MHz |
lsmod shows that k10temp is running and is used by hwmon.
Hardinfo gives no Sensors at all, blank.
I changed the module on line 5 to k10temp.
No big deal, but does anything jump out at you? Thanks.
|
|
Back to top
|
|
 |
|