Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 02 Sep 2014, 01:06
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
CPUtemp - A CPU Temperature Monitor
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 5 [67 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: 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.
CPUtemp-1.7.pet
Description  Updated 2013-12-16
pet

 Download 
Filename  CPUtemp-1.7.pet 
Filesize  80.46 KB 
Downloaded  789 Time(s) 

Last edited by rcrsn51 on Thu 26 Dec 2013, 08:36; edited 23 times in total
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3964
Location: Kiel,Germany

PostPosted: 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
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3964
Location: Kiel,Germany

PostPosted: 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
YATM-1.0.jpg
 Description   
 Filesize   176.92 KB
 Viewed   8833 Time(s)

YATM-1.0.jpg

Back to top
View user's profile Send private message Visit poster's website 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: 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
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: 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
View user's profile Send private message 
Bert


Joined: 30 Jun 2006
Posts: 927

PostPosted: Fri 21 Jan 2011, 09:36    Post subject:  

Just discovered this pet. Worked perfectly...after I changed from openbox to jwm Embarassed 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
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: 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
Code:
CPUtemp

Or you can drag a shortcut to /usr/local/bin/CPUtemp onto your desktop.
Back to top
View user's profile Send private message 
Bert


Joined: 30 Jun 2006
Posts: 927

PostPosted: 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
Code:
CPUtemp

Or you can drag a shortcut to /usr/local/bin/CPUtemp onto your desktop.


You mean like this? Laughing
Thanks again!
buroscr.png
 Description   
 Filesize   78.11 KB
 Viewed   8041 Time(s)

buroscr.png


_________________


Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: Fri 21 Jan 2011, 12:21    Post subject:  

So Mr. Shakespeare might have said, "Shall I compare thy CPU to a Summer's day?" Wink
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: 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
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: 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
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: 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 in a text editor.

2. Go to Line 8 and add an "f" as follows
Code:
/usr/local/bin/sensors -Af -c /etc/sensors3.conf | 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

Last edited by rcrsn51 on Mon 09 Dec 2013, 07:51; edited 2 times in total
Back to top
View user's profile Send private message 
lithpr


Joined: 10 Mar 2011
Posts: 186

PostPosted: Thu 19 May 2011, 08:20    Post subject:  

Works great on Lucid Puppy 5.2.5! Thank you very much!
Back to top
View user's profile Send private message 
nooby

Joined: 29 Jun 2008
Posts: 10557
Location: SwedenEurope

PostPosted: 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 use Google Search on Puppy Forum
not an ideal solution though
Back to top
View user's profile Send private message 
playdayz


Joined: 25 Apr 2008
Posts: 3788

PostPosted: 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 Wink

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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 5 [67 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0918s ][ Queries: 13 (0.0064s) ][ GZIP on ]