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 Mon 22 Dec 2014, 11:08
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
Any way to show CPU temp in Xfce taskbar in 431 NOP? (solved
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
TLM


Joined: 09 Mar 2010
Posts: 173
Location: Central United States

PostPosted: Sun 23 Jan 2011, 16:56    Post subject:  Any way to show CPU temp in Xfce taskbar in 431 NOP? (solved  

Is there a way to display the cpu temp in the Xfce taskbar in 431 NOP? I would like it in Fahrenheit if possible. Hard Info shows my sensors Core0 Temp as 42 degrees Celsius. I would like to get that information displayed in my taskbar at all times. Is there a PET anywhere for this? I have found batmon and CPUtemp PETS. I can run CPUtemp from the command line and get an X message about the temperature, however I do not know enough about programming to get the CPU temp into my taskbar. Thank you for any help.
Last edited by TLM on Tue 01 Feb 2011, 00:18; edited 1 time in total
Back to top
View user's profile Send private message 
TLM


Joined: 09 Mar 2010
Posts: 173
Location: Central United States

PostPosted: Sun 23 Jan 2011, 17:23    Post subject:  

OK, trying to help myself, I have come across this link:

http://goodies.xfce.org/projects/panel-plugins/xfce4-genmon-plugin

But I do not know how to get or use the sample script shown. However it seems to me that genmon (which NOP 431has) could be used to display the cpu temp. Any ideas? Thanks very much.
Back to top
View user's profile Send private message 
rjbrewer


Joined: 22 Jan 2008
Posts: 4422
Location: merriam, kansas

PostPosted: Sun 23 Jan 2011, 17:41    Post subject:  

Don't know if this works in xfce but it's great in the jwm taskbar
or as a small icon on desktop.

http://murga-linux.com/puppy/viewtopic.php?search_id=660669394&t=57480

_________________

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

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


Joined: 09 Mar 2010
Posts: 173
Location: Central United States

PostPosted: Sun 23 Jan 2011, 22:29    Post subject:  

Yes i found that pet, but i cannot use it in Xfce because the directory root/.jwmrc-tray is for jwm desktop, and I cannot find the Xfce counterpart, nor even know if it would work if I could. I am pretty sure that genmon in the Xfce taskbar can be made to show the cpu temp, but I do not know what command to enter when configuring genmon.
Back to top
View user's profile Send private message 
G0XAN

Joined: 08 May 2009
Posts: 31
Location: Brighton, UK

PostPosted: Fri 28 Jan 2011, 17:56    Post subject:  

Genmon is the right solution, but it does need some more work to display what you want.

First off, you need a script to read the temperature and convert it from C to F. This script will do it for you:
Code:

#!/bin/bash

vCpuTemp=$(cat /proc/acpi/thermal_zone/THRM/temperature | awk '{print $2}')
vCpuTempUnits=$(cat /proc/acpi/thermal_zone/THRM/temperature | awk '{print $3}')

if echo "$vCpuTempUnits" | grep -q "C"
then
let "vCpuTemp *= 9"
let "vCpuTemp /= 5"
let "vCpuTemp += 32"
fi

echo $vCpuTemp" F"


You might have to change the path in the "cat" commands to get to the temperature sensor in your particular PC. Look around in /proc and you should find it.

Copy & paste the script into a text file and save it somewhere, I use
Code:
/root/my-scripts
and call the script cpuTemp

Then make the script executable. Open a terminal window, go to your script directory and change the script properties:
Code:

cd /root/my-scripts
chmod +x cpuTemp


Now right-click on the genmon panel, i.e. the net or memory monitor on the right of the task-bar and select "Add New Items..."
Scroll down the list to "Generic Monitor", select it and click on "Add"
In the Configuration window, in the Command box type
Code:
/root/my-scripts/cpuTemp

Clear the tick-box next to "Label" and set the "Period (s)" to something suitable (e.g. 10)
Click "Close" and your CPU temperature will appear in Fahrenheit.
All done! Smile

If it doesn't work as you expect, you can run the cat command in a terminal window and see what format your temperature is reported in. You might need to adjust the awk commands to suit.

I'm sure someone else could write a neater script, but this one works for me! Hope it helps...

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


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

PostPosted: Fri 28 Jan 2011, 18:06    Post subject:  

TLM wrote:
Yes i found that pet, but i cannot use it in Xfce because the directory root/.jwmrc-tray is for jwm desktop, and I cannot find the Xfce counterpart, nor even know if it would work if I could. I am pretty sure that genmon in the Xfce taskbar can be made to show the cpu temp, but I do not know what command to enter when configuring genmon.

The newest version 1.2 of CPUtemp does not use jwmrc-tray, so it works in 431NOP. Just install the PET and reboot.
Back to top
View user's profile Send private message 
TLM


Joined: 09 Mar 2010
Posts: 173
Location: Central United States

PostPosted: Sat 29 Jan 2011, 23:39    Post subject:  

GOXAN and rcrsn51, Thank you for your how to. I am running the CPUtemp and it shows my temp when I click on it. GOXAN, i will need some more time to test your scripts, but am looking forward to it. Thanks again.
Back to top
View user's profile Send private message 
TLM


Joined: 09 Mar 2010
Posts: 173
Location: Central United States

PostPosted: Sun 30 Jan 2011, 02:18    Post subject:  

GOXAN, Your script worked perfectly without any modifications! I have migrated to Puppy from Windows XP and was looking for something to replace CoreTemp I had been using in XP. Your howto solved it. Thanks!
Back to top
View user's profile Send private message 
G0XAN

Joined: 08 May 2009
Posts: 31
Location: Brighton, UK

PostPosted: Mon 31 Jan 2011, 17:01    Post subject:  

Glad to be of help!
If you could now add [solved] to the title of the thread, then one of the moderators can move it to the appropriate category.

_________________
Gary
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » REQUESTS
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: 1.3319s ][ Queries: 12 (0.0202s) ][ GZIP on ]