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 Wed 03 Sep 2014, 03:44
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
tempicon -a tray icon to monitor CPU temp
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 5 [61 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Author Message
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Thu 29 Dec 2011, 01:52    Post subject:  tempicon -a tray icon to monitor CPU temp
Subject description: yet another tray icon
 

tempicon

This app puts a digital CPU temperature monitor in your system tray (taskbar).. screen shot attached.

NEW: dependency on lm_sensors is now optional (ymmv)

Also note that lm_sensors and different HW sensors give completely different output, even from version to version and kernel to kernel making the older method I used to find the temperature a joke! The way it's done now is more reliable. Works on all my machines that have sensors, including the raspberry pi (latest kernel with raspbian installed). Also works in KDE with Slackware-current.


Now version 0.21

Changelog:
Quote:

v-0.21 131121
-rewrite of the C source to be more multiuser friendly
-temp files now in ~/tempicon
-made icons square, work-around for bug in JWM-r876 (pemasu)
-removed unecessary code

v-0.19 130404
-added support for gtk+-3.0 (only available at compile time, see the README in the source)
-added a configure script, deleted hard code Makefile
-bugfix - in kernels >=3.7 the script was finding the GPU, not CPU temp

v-0.18 130320 (unreleased in general)
- moved main script to a functions library script

v-0.17 130301
- improvements to scripts
- better efficiency
- fixed a bug where blank lines were appended to /tmp/xerrs.log

v-0.16 130131
-rewritten to call the script from the binary, not binary from script
- this reduces CPU load and gets rid of a bash loop.

v-0.15 130102
-fixes for slackbones

v-0.14 121020
-font fixes again

v-0.13 120920
-font fixes for different arches (hoping it builds on raspberry pi ... it does!)
-added extra colour and changed colour grading
-added icons to right click menu

v-0.12 120902 (not released)
-bugfix -newer lm_sensors have slightly different format, rely on manual method
to get the cpu temp displayed by icon
-fixed calls from 'sh' to 'bash'
-fixed calls to to gtkdialog (not gtkdialog3 or gtkdialog4)

v-0.11 120702
-bugfix -mainloop refused to start after X restart
-removed "Help" button if lm_sensors is not installed

v-0.10 120701
-bugfix -kill main loop on quitting
-ensure $PREFIX/tempicongui is charset UTF-8 for degree symbol
-improvements to makefile, new2dir compatible, default PREFIX=/usr/local
hack the Makefile for different PREFIX

v-0.09 120610
-add support for Makefile
-small bugfixes in C code
-rounded corners of the icons
-no longer generating icons, done at compile stage

v-0.08 120601 (unpublished)
-remove lm_sensors as needed dependency
-support Fatdog
-changed installation
-added README

v-0.07
-remove startup script automatically when you get the pink error message

v-0.06 120121
-fixed version (CatDude)
-added menuitem in tempiconsvg.c to remove from Startup (mainly for woof builds to give user some control over the tray)
-fixed pinstall.sh, bad link (woof install)
-fixed typo MUDULE Laughing

v-0.05 120120
-rewrote for svg (source now tempiconsvg.c) .. looks nicer, and is more hackable, eg you could change the font if you like, not supported though
-added temps up to 105 C
-removed "C" from icon.. I am NOT suporting "F".. get with the program US!
-icons now created in pinstall.sh, it's plenty fast enough
-removed text2xpm depend

v-0.04 120110
-bugfix with loading module logic and fix typo (DaveS)

v-0.03 120101
-added module detection and module loading capability to tempicon.sh
-module printed to /etc/tempicon.conf, removed on uninstall
-adjusted puninstall.sh
-added "usage" to tempicon.sh
-added sensors check to tempicon.sh
-changed CPUtemp and CPUtemp.hlp to tempicongui and tempicon.hlp
wont clobber rcrsn51's app
-filter out degree symbol in gui for non UTF-8 enabled encoding
-changed to mono font in tempicongui
-changed text in tempicon.hlp to use tempicon.sh -m to load module
-changed tempicon.c to call tempicongui instead of CPUtemp
-added toggle to add/remove Startup file "tempicon.sh -t"

v-0.02 111230
-hacked text2xpm font. "~" (tilde) is now "°" (degree)
-adjusted tempicon.sh to draw degree sympal to *.xpm's
-tempicon.sh now get's the highest temp value and makes gross
assumption that that is CPU temp, usually is.
-tempicon.c, adjusted comment with old scriptname, "text-temp" to "tempicon.sh"
-removed lm-sensors binaries to separate package, added warning to pinstall.sh

v-0.01 111229
-initial release


NOTE: lm_sensors is now a separate package as there are newer versions available. You CAN IF YOU LIKE (was 'must', ymmv) install lm_sensors, either the one posted below or from PPM. You should do this before installing tempicon-0.xx.pet. If you have previous version of tempicon installed please uninstall with PPM first to cleanup the old files (taken care of in the puninstall.sh).

DEBUG: If the app fails for you, to supply debug info, run sensors in a terminal and post the output. Thanks.

_________________________________________________________________________

This is an app I have been working on. It displays your cpu temperature in the tray, a handy feature when your machine is under heavy load in warm conditions, eg: compiling large progs in the Queensland summer.

It OPTIONALLY depends on lm_sensors (included) and it also includes rcrsn51's gtkdialog gui from CPUtemp to display more information, mobo temp, fanspeed etc. Thanks rcrsn51. Activate that gui by right clicking the icon and clicking the "more info" tab.

It does not include any images. They are generated by technosaurus' nifty little script text2xpm (the colour and size supported version). So, it depends on text2xpm too(OLD INFO, now uses svg), included.

//@techno, can you add a degree symbol? I tried .. but.. Embarassed [solved]

----

It works by running a script to save temperature to a temporary file, updated every five seconds, then a little C gtkstatusicon proggy reads that info and displays the cpu temp.

The exec is compiled on Slacko so if it fails for you, perhaps due to an older gtk+-2.0 version, the sources and a compile script are provided. (devx is needed to compile)

This is only my second ever proggy written in C, so this must be considered alpha quality software. (The other is an OLPC battery monitor, only runs on OLPC xo-1 and xo-1.5 hardware).

Usual cautions apply.

When you install there is an option to add a Startup file to start it when X starts.

Any C coders please offer your critique, same goes for the bash bits.

Have fun!
tempiconsvg-0.21-i486.pet
Description  latest 32 bit bin RE-UPLOADED after 2 downloads, bug in functions script
pet

 Download 
Filename  tempiconsvg-0.21-i486.pet 
Filesize  10.83 KB 
Downloaded  408 Time(s) 
tempiconsvg-0.21.tar.gz
Description  source
gz

 Download 
Filename  tempiconsvg-0.21.tar.gz 
Filesize  9.51 KB 
Downloaded  161 Time(s) 
Screenshot_2013-11-21.png
 Description   
 Filesize   16.67 KB
 Viewed   1061 Time(s)

Screenshot_2013-11-21.png

tempiconsvg-0.19-i486.pet
Description 
pet

 Download 
Filename  tempiconsvg-0.19-i486.pet 
Filesize  10.72 KB 
Downloaded  655 Time(s) 
tempiconsvg-0.19.tar.bz2
Description  sauce code.. supports gtk3 and configure script now
bz2

 Download 
Filename  tempiconsvg-0.19.tar.bz2 
Filesize  9.14 KB 
Downloaded  278 Time(s) 
tempiconsvg-0.17-i486.pet
Description  32 bit only.. more tomorrow.
pet

 Download 
Filename  tempiconsvg-0.17-i486.pet 
Filesize  10.65 KB 
Downloaded  367 Time(s) 
tempiconsvg-0.16-x86_64.pet
Description  64 bit only! Suits FatDog, LHP-64, Slackbones (slackbones users must unpack manually)
pet

 Download 
Filename  tempiconsvg-0.16-x86_64.pet 
Filesize  11.79 KB 
Downloaded  364 Time(s) 
tempiconsvg-0.16-i486.pet
Description  pet compiled in Slacko, 32 bit, suit most pups
pet

 Download 
Filename  tempiconsvg-0.16-i486.pet 
Filesize  11.23 KB 
Downloaded  426 Time(s) 
tempiconsvg-0.16.tar.bz2
Description  SOURCE code
bz2

 Download 
Filename  tempiconsvg-0.16.tar.bz2 
Filesize  7.98 KB 
Downloaded  328 Time(s) 
lm_sensors-3.1.2.pet
Description  THIS WAS REQUIRED or use one you compile or one from PPM (Slacko has it, I expect dpup and lupu too), you may not need it now
pet

 Download 
Filename  lm_sensors-3.1.2.pet 
Filesize  72.05 KB 
Downloaded  960 Time(s) 

_________________
Woof Mailing List | keep the faith Cool |

Last edited by 01micko on Thu 21 Nov 2013, 06:50; edited 26 times in total
Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Thu 29 Dec 2011, 12:13    Post subject:  

I've been thinking working on traytemp too but I'm having difficultly figuring out which temperature to display. Here is the output I get from sensors on my new laptop.

Code:
# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +0.0 C  (crit = +127.0 C)                 
temp2:        +0.0 C  (crit = +127.0 C)                 
temp3:       +11.0 C  (crit = +128.0 C)                 
temp4:       +35.0 C  (crit = +127.0 C)                 
temp5:        +0.0 C  (crit = +115.0 C)                 
temp6:       +20.0 C  (crit = +128.0 C)                 
temp7:        +0.0 C  (crit = +128.0 C)                 
temp8:       +38.0 C  (crit = +128.0 C)                 
temp9:       +46.0 C  (crit = +128.0 C)                 
temp10:      +59.0 C  (crit = +128.0 C)


Do you think there is an algorithmic way to make sense of something like this? Monitor the temp that is closest to critical? Average the values? What do you think?
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Thu 29 Dec 2011, 17:18    Post subject:  

jemimah wrote:
I've been thinking working on traytemp too but I'm having difficultly figuring out which temperature to display. Here is the output I get from sensors on my new laptop.

Code:
# sensors
acpitz-virtual-0
Adapter: Virtual device
temp1:        +0.0 C  (crit = +127.0 C)                 
temp2:        +0.0 C  (crit = +127.0 C)                 
temp3:       +11.0 C  (crit = +128.0 C)                 
temp4:       +35.0 C  (crit = +127.0 C)                 
temp5:        +0.0 C  (crit = +115.0 C)                 
temp6:       +20.0 C  (crit = +128.0 C)                 
temp7:        +0.0 C  (crit = +128.0 C)                 
temp8:       +38.0 C  (crit = +128.0 C)                 
temp9:       +46.0 C  (crit = +128.0 C)                 
temp10:      +59.0 C  (crit = +128.0 C)


Do you think there is an algorithmic way to make sense of something like this? Monitor the temp that is closest to critical? Average the values? What do you think?


Well, that output will certainly bork my tempicon.sh script! On my old laptop I get similar output but the order is reversed. I made the gross assumption in my case that, more less the hottest is the temp of the CPU, which is temp1 for me. Nothing algorithmic about that!

Thanks for your sensors output. At least I can cover your case but I am sure there will be others. I've only covered my Athlon and my old Intel, so the script has a way to go yet.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Thu 29 Dec 2011, 17:39    Post subject:  

Installed on my lappy but it just displayed 10 deg Smile Actual temp is around 56 deg. Uninstalling broke CPU Temp of course, which I had to re-install after.
_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Thu 29 Dec 2011, 18:00    Post subject:  

Dave,

In the first post I'll have to request some debugging output on failure. Run sensors in a terminal. I should be able to make a case based on the module used. On todo list.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4348

PostPosted: Thu 29 Dec 2011, 18:27    Post subject:  

Which of the supported characters can you live without?
You can use that and modify its font representation to resemble a superscript 'o'

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Thu 29 Dec 2011, 18:37    Post subject:  

techno

Yeah thought about that, I think the tilde ~... or any non numeric char except C. Did try the tilde but I goofed by changing the tilde to degree in the array. So I'll leave the tilde in the array and just alter the font. TY.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Thu 29 Dec 2011, 23:46    Post subject:  

Ver 0.02 is posted,

see main post

-

jemimah and DaveS.

I am finding the values differently now so hopefully tempicon-0.02 should work for you. One thing I may have to address is cold weather conditions. Your machine may be below 10 C and I haven't covered that. There is code built in to the exec that's prints to stderr if an icon isn't found so the app should recover when the machine warms up. Likely 10 C will be shown until then.

I am using the gross assumption that the highest temp is the CPU temp. It is on my Athlon because CPU temp is labeled:
Code:
# sensors
atk0110-acpi-0
Adapter: ACPI interface
Vcore Voltage:     +1.43 V  (min =  +0.85 V, max =  +1.60 V)
 +3.3 Voltage:     +3.16 V  (min =  +2.97 V, max =  +3.63 V)
 +5 Voltage:       +4.93 V  (min =  +4.50 V, max =  +5.50 V)
 +12 Voltage:     +11.63 V  (min = +10.20 V, max = +13.80 V)
CPU FAN Speed:    2896 RPM  (min =  600 RPM)
CHASSIS FAN Speed:   0 RPM  (min =  600 RPM)
CPU Temperature:   +66.0°C  (high = +60.0°C, crit = +95.0°C) 
MB Temperature:    +35.0°C  (high = +45.0°C, crit = +75.0°C) 

k10temp-pci-00c3
Adapter: PCI adapter
temp1:       +66.6°C  (high = +70.0°C, crit = +99.5°C)


This is the code I am using to get the value:
Code:
sensors|grep \+|cut -d '+' -f2|cut -d '.' -f1|sort -n|tail -n1


On my machine I timed that code at less than 0.01 of a second, plenty fast enough. I read that temperature is only polled once or twice a second.

Have fun!

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Fri 30 Dec 2011, 12:54    Post subject:  

0.02 is working Smile Even has a degree sign!
_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
Samus2012

Joined: 30 Dec 2011
Posts: 1

PostPosted: Fri 30 Dec 2011, 13:27    Post subject: Re: tempicon -a tray icon to monitor CPU temp
Subject description: yet another tray icon
 

Nice! Just downloaded and installed the .PET files and it works great on my AMD 64 3500+ system and is showing "41C".

The info also shows:

CPU FAN Speed: 3375 RPM (min = 800 RPM)
CHASSIS FAN Speed: 2070 RPM (min = 1200 RPM)

With Puppy Linux 5.3.1 (and even 4.1.2) the fans are always maxed out. But, when I let the system boot into Windows XP, the fans throttle back once the Windows login is displayed and only speed up when necessary.

Is there anything I can do to regulate fan speed based on the CPU/MB temps?

Thanks.

Ken
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Fri 30 Dec 2011, 15:55    Post subject:  

01micko wrote:
One thing I may have to address is cold weather conditions. Your machine may be below 10 C and I haven't covered that. There is code built in to the exec that's prints to stderr if an icon isn't found so the app should recover when the machine warms up. Likely 10 C will be shown until then.


Dave.. from a cold start is this ever a problem? I wont be able to test that for at least 6 months! (er, unless I shove my lappy in the freezer!).

Samus2012 wrote:
Is there anything I can do to regulate fan speed based on the CPU/MB temps?
First of all, welcome to the kennels!

Probably, but it would have to be a script based on current fan speed/temperature and telling the module which controls fan speed to slow down/speed up depending on those results. Maybe you could post in the software>requests forum? More eyes would see it then Wink

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Fri 30 Dec 2011, 16:40    Post subject:  

Strange thing.... after re-boot, it just displays 10 deg. If I then right click and select 'more info' the dialogue pops up displaying the temp as it should, then a few seconds later, the tray icon begins giving the correct reading. It is then fine till next boot, whereupon I have to repeat the process.
Will try a sub 10 deg start in the morning Smile

_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Fri 30 Dec 2011, 16:50    Post subject:  

DaveS wrote:
Strange thing.... after re-boot, it just displays 10 deg. If I then right click and select 'more info' the dialogue pops up displaying the temp as it should, then a few seconds later, the tray icon begins giving the correct reading. It is then fine till next boot, whereupon I have to repeat the process.
Will try a sub 10 deg start in the morning Smile
Ok, that's weird. If you can reproduce this, before you click anything run
Code:
cat /tmp/tempicon/count
I suspect you may get "no such file or dirctory" in which case the tempicon.sh script is falling down somewhere. If you get the correct reading then the exec is failing.
_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
DaveS


Joined: 09 Oct 2008
Posts: 3726
Location: UK

PostPosted: Fri 30 Dec 2011, 16:55    Post subject:  

OK, ran the command... terminal gave zero output, jut a return to the prompt.
_________________
Spup Frugal HD and USB
Root forever!
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Fri 30 Dec 2011, 17:00    Post subject:  

DaveS wrote:
OK, ran the command... terminal gave zero output, jut a return to the prompt.
Ah, so I bet there was an empty line, meaning the script is failing.
I have a bug in lm_sensors where I can't suppress stdout and consequently my xerrs.log fills up.
I bet for you, "sensors" is failing to run, that's why it's ok after you right click and look at the gui. Thanks Dave, I think I can fix it.

EDIT: Hmmmm... I bet coretemp module is not loaded. rcrsn51's script loads it, then you are ok.
So, when you startup and it fails run modprobe coretemp and see if that fixes it. I'll wait til I hear from you then make a 0.03 version if that is the fix. (likely IMO)

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 5 [61 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.1230s ][ Queries: 13 (0.0076s) ][ GZIP on ]