tempicon -a tray icon to monitor CPU temp

Miscellaneous tools
Message
Author
User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#21 Post by 01micko »

Happy New Year to you too Dave.

Can you try this. Comment lines 112, 113, 114, 115 in /usr/sbin/tempicon.sh and reboot. Don't run sensors-detect, a module should have loaded but it seems on the first loop your temperature isn't recorded.
Lines should then look like this after commenting:

Code: Select all

#VALUE=`cat /tmp/tempicon/count`
#if [ ! $VALUE ];then xmessage -c -bg pink "ERROR: Your module doesn't work. Run \"sensors-detect\""
#  exit
#fi
Cheers, (I'll be back in a couple of hours :wink: )
Puppy Linux Blog - contact me for access

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#22 Post by DaveS »

01micko wrote:Happy New Year to you too Dave.

Can you try this. Comment lines 112, 113, 114, 115 in /usr/sbin/tempicon.sh and reboot. Don't run sensors-detect, a module should have loaded but it seems on the first loop your temperature isn't recorded.
Lines should then look like this after commenting:

Code: Select all

#VALUE=`cat /tmp/tempicon/count`
#if [ ! $VALUE ];then xmessage -c -bg pink "ERROR: Your module doesn't work. Run "sensors-detect""
#  exit
#fi
Cheers, (I'll be back in a couple of hours :wink: )
Tried that... no different.
Spup Frugal HD and USB
Root forever!

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#23 Post by 01micko »

0.04 is out


______________________________________________________________________

Dave, I found the bug. I had to confiscate sonny's compaq lappy, it didn't load coretemp either, but sensors was still returning 0 (not an error) so my logic fell down there, Even if the logic was right it would have failed (typo :oops: ). I also fixed another bug with a var not being exported if all modules in the loop array failed to load.

Curious that coretemp doesn't load by default on these things. :? Does on my IBM, and eee.

EDIT: hmmm... this has got me thinking.. I wonder if the "lm_sensors" dependency can be completely removed.. methinks at this stage "probably". I would also like to rewrite the entire app in C.. see what happens :wink:
Puppy Linux Blog - contact me for access

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#24 Post by DaveS »

yup... 04 'just works' :) Not only is this a very nice little app, but it also eliminates the difficulty of getting a coretemp display in fbpanel I guess.
Spup Frugal HD and USB
Root forever!

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#25 Post by 01micko »

Thanks for feedback Dave

Works in slackware-13.37/kde4 (small mods, no ash shell, change shebang to bash in text2xpm :roll: and a link to ~/.kde/Autostart/tempicon.sh )
Attachments
kde_tray.png
(44 KiB) Downloaded 1404 times
Puppy Linux Blog - contact me for access

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#26 Post by DaveS »

I THINK it works in Racy too. Least, it does in mine, but I had CPUTemp working too, and cant remember whether I had to add any deps that may also be being used by tempicon.
Spup Frugal HD and USB
Root forever!

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#27 Post by vovchik »

Dear Mick,

Happy New Year and thanks for this utility. As I have already lost a motherboard/cpu to overheating, I have a need for this, all the more that my cpu tends to collect matted cat hair and needs periodic cleaning and a fresh application of thermal paste! I installed your sensors pet - since it was missing from my lucid - and then ran your prog. Works like a charm. And it will save me money.

With kind regards,
vovchik

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Posted: Today, at 07:29 Post subject: 0.04 is out

#28 Post by ETP »

01micko

Thanks for 0.04 and Happy New Year.
Works fine with ICEWM and 528 k 3.1.0
Attachments
screenshot.1.png
(9.38 KiB) Downloaded 2086 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#29 Post by 01micko »

DaveS wrote:I THINK it works in Racy too. Least, it does in mine, but I had CPUTemp working too, and cant remember whether I had to add any deps that may also be being used by tempicon.
Should work fine in Racy as I did some testing in Saluki, also Lupu. Deps are identical in CPUtemp as is to tempicon. (Incidentally, I hacked out the flame tray icon code for CPUtemp in genie).
vovchik wrote:And it will save me money.
Ah, good to know :wink: .

Part of the motivation behind this was that in early December I was compiling seamonkey-2.5 and my machine would suddenly switch off. This happened twice, it was hot weather conditions. I decided to monitor CPU temperature and it turned out this was the culprit. Lucky for me my board has an automatic cutoff at 95 C. I throttled back the CPU (it's an Athlon X2 running stock at 3GHz) to 2.3GHz and the problem seemed cured. Funnily enough, on a new save file (same OS, Slacko-5.3-k2.6.39.4-PAE) I could not reproduce this so I attributed the overheating to some app I installed misbehaving. Anyway, I didn't want that to happen again so I ended up writing "tempicon". That was also the motivation behind the different colours, even with poor eysight you can easily see the change from green to yellow to red.
ETP wrote:Works fine with ICEWM and 528 k 3.1.0
Glad it works in Linux 3.X kernels. Thanks.
Puppy Linux Blog - contact me for access

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#30 Post by pemasu »

Tempicon plays fine in dpup exprimo with 3.1 kernel also. It has inbuild lmsensors so the tempicon pet was the only I needed. Thanks of this nice tray app. Though I perspirated quite a lot when I compiled Qt-4.8.0 quad core at full speed and I got 96 c as temperature. Sometimes it is better not to know....lol...

User avatar
Billtoo
Posts: 3720
Joined: Tue 07 Apr 2009, 13:47
Location: Ontario Canada

tempicon -a tray icon to monitor CPU temp

#31 Post by Billtoo »

This is icewm in Saluki
Attachments
temp.jpg
(11.39 KiB) Downloaded 1847 times

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#32 Post by 01micko »

I've been sitting on this for awhile..

new svg based tempicon remove older versions first!!!

- See main post
Attachments
tray.png
(5.37 KiB) Downloaded 1702 times
Puppy Linux Blog - contact me for access

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#33 Post by DaveS »

01micko wrote:I've been sitting on this for awhile..

new svg based tempicon remove older versions first!!!

- See main post
Excellent. Much easier to read thanks.
Spup Frugal HD and USB
Root forever!

User avatar
CatDude
Posts: 1563
Joined: Wed 03 Jan 2007, 17:49
Location: UK

#34 Post by CatDude »

Hello Mick

Working OK in Slacko-531 (with Compiz + Lxpanel)

I installed lm_sensors-3.1.2 via the PPM then installed the tempicon-0.05.pet

Running the command: sensors-detect
revealed:

Code: Select all

AMD Family 10h thermal sensors...                           Success!
    (driver `k10temp')
but modprobing the module k10temp failed. :(

A quick 'google' lead me to these: with which i was able to build the k10temp module.

I put it in: /lib/modules/2.6.37.6/kernel/drivers/hwmon/
ran depmod
then modprobe k10temp
rebooted and there it was in the system tray of lxpanel. :D

Nice one mate.

CatDude

P.S
Line 6 of: /usr/sbin/tempiconsvg.sh
say's

Code: Select all

ver=0.04
:wink: :wink:
.
Attachments
slacko-531+compiz+lxpanel.png
(4.23 KiB) Downloaded 1676 times
[img]http://www.smokey01.com/CatDude/.temp/sigs/acer-futile.gif[/img]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#35 Post by 01micko »

Minor update v-0.06 -see main post

Thanks CatDude, 06 fixes the version number. Yeah, 2.6.37.6 has k8temp which works with my X2 and nvidia board, I thought it would work for most, wrong I guess! Can you post your module please? I'll whack it in PPM.

Also, pemasu, it *should* install cleanly into woof now, I'll test tonight when I do a build. I left a message on your thread but I now realise it was doomed to fail!
Puppy Linux Blog - contact me for access

User avatar
CatDude
Posts: 1563
Joined: Wed 03 Jan 2007, 17:49
Location: UK

#36 Post by CatDude »

Hi
01micko wrote:...Can you post your module please? I'll whack it in PPM.
Here you go mate.

CatDude
.
Attachments
k10temp-module-slacko-k2.6.37.6.tar.gz
(2.57 KiB) Downloaded 710 times
[img]http://www.smokey01.com/CatDude/.temp/sigs/acer-futile.gif[/img]

snayak
Posts: 422
Joined: Wed 14 Sep 2011, 05:49

#37 Post by snayak »

Does it work with Wary 500?

Sincerely,
Srinivas Nayak
[Precise 571 on AMD Athlon XP 2000+ with 512MB RAM]
[Fatdog 720 on Intel Pentium B960 with 4GB RAM]

[url]http://srinivas-nayak.blogspot.com/[/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#38 Post by technosaurus »

I have made a generic tool to do this using symlinks:
http://www.murga-linux.com/puppy/viewtopic.php?t=76431
you should be able to adjust your backend to only update a single file and the binary is smaller too.

edit: and here is an awk example that I used to generate the svg for my cpu

Code: Select all

#!/bin/ash
awk '{BG = "#00FF00"
if ($2 > 65) BG = "#FFFF00"
if ($2 > 80) BG = "#FF0000"
printf "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> \
<rect width=\"32\" height=\"22\" x=\"0\" y=\"0\" \
style=\"font-size:%d;fill:%s;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;\" id=\"rect1\" />  \
<text x=\"0\" y=\"18\" style=\"font-size:%d;font-weight:normal;fill-opacity:0.75;stroke-width:3pt;font-family:helvetica;\" id=\"text1\"> \
<tspan id=\"tspan1\">%d°C</tspan> \
</text> \
</svg>",14,BG,14,$2}' /proc/acpi/thermal_zone/TZ01/temperature >test.svg
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#39 Post by mavrothal »

technosaurus wrote:I have made a generic tool to do this using symlinks:
http://www.murga-linux.com/puppy/viewtopic.php?t=76431
you should be able to adjust your backend to only update a single file and the binary is smaller too.

edit: and here is an awk example that I used to generate the svg for my cpu

Code: Select all

#!/bin/ash
awk '{BG = "#00FF00"
if ($2 > 65) BG = "#FFFF00"
if ($2 > 80) BG = "#FF0000"
printf "<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> \
<rect width="32" height="22" x="0" y="0" \
style="font-size:%d;fill:%s;fill-opacity:0.75;fill-rule:evenodd;stroke-width:3pt;" id="rect1" />  \
<text x="0" y="18" style="font-size:%d;font-weight:normal;fill-opacity:0.75;stroke-width:3pt;font-family:helvetica;" id="text1"> \
<tspan id="tspan1">%d°C</tspan> \
</text> \
</svg>",14,BG,14,$2}' /proc/acpi/thermal_zone/TZ01/temperature >test.svg
Tried this and I get:

Code: Select all

awk: cmd. line:4: printf "<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> \ 
awk: cmd. line:4:        ^ unterminated string
awk: cmd. line:4: printf "<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> \ 
awk: cmd. line:4:        ^ syntax error
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#40 Post by technosaurus »

Edit, nope that was just my browser formatting even though html standards told it not to.

the real problem was using the UTF-8 encoded '°' instead of the standard ascii one that I posted ... guess I need to push a tarball to avoid these copy-paste issues (unless maybe you added your own '°' ???)

btw if you ever need an ascii character, I use this a lot to cut/paste from the terminal

Code: Select all

int main() {  
char c=127;
while (c-->=-127) {  
  printf("%d, %c\n",c,c);
}
}
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply