 aa2k join:2000-10-06 Damascus, MD | script to show temp info on desktop... help..Ok, I have a HidTemper in a closet to monitor the temperature inside, I have it to check it every hour and log the info on a simple log file, I also get an email when it gets above 90 degrees - so far so good...
But I would like to show that information on the desktop somehow (icon maybe?), maybe change temperature when the program runs to check (every hour or as ofter as I need it).. I was thinking on "Conky" as I was looking for some info on the web, is it possible to set that info on that program if I install it? if so any pointer on how? Maybe some other way (icon on taskbar)? - sorry, I am not advanced at scripting.. suggestions are welcome...
The log saved in the linux machine is very simple, nothing fancy:
.
.
Fri May 11 05:03:02 2012 78.8 Normal
Fri May 11 06:03:02 2012 77.9 Normal
Fri May 11 07:03:02 2012 77.9 Normal
Fri May 11 08:03:02 2012 77.9 Normal
Fri May 11 09:03:02 2012 78.8 Normal
Fri May 11 10:03:02 2012 78.8 Normal
Fri May 11 11:03:01 2012 79.25 Normal
Fri May 11 12:03:01 2012 79.7 Normal
Fri May 11 13:03:01 2012 79.7 Normal
Fri May 11 14:03:01 2012 80.6 Normal
Fri May 11 15:03:02 2012 80.6 Normal
Fri May 11 16:03:02 2012 81.5 Normal
Fri May 11 17:03:02 2012 83.3 Normal
Fri May 11 18:03:02 2012 84.2 Normal
Fri May 11 19:03:02 2012 84.2 Normal
Fri May 11 20:03:01 2012 84.2 Normal
Fri May 11 21:03:01 2012 83.3 Normal
Fri May 11 22:03:01 2012 83.3 Normal
Fri May 11 23:03:02 2012 82.4 Normal
Sat May 12 00:03:01 2012 82.4 Normal
Sat May 12 01:03:01 2012 81.5 Normal
Sat May 12 02:03:01 2012 80.6 Normal
Sat May 12 03:03:01 2012 80.6 Normal
Sat May 12 04:03:02 2012 80.6 Normal
Sat May 12 05:03:02 2012 79.7 Normal
Sat May 12 06:03:01 2012 79.7 Normal
Sat May 12 07:03:02 2012 79.7 Normal
Sat May 12 08:03:02 2012 79.7 Normal
Sat May 12 09:03:01 2012 79.7 Normal
Sat May 12 10:03:01 2012 80.6 Normal
Sat May 12 11:03:01 2012 80.6 Normal
Sat May 12 12:03:01 2012 81.5 Normal
Sat May 12 13:03:01 2012 82.4 Normal
Sat May 12 14:03:01 2012 83.3 Normal
Sat May 12 15:03:02 2012 85.1 Normal
Sat May 12 16:03:02 2012 86 Normal
Sat May 12 17:03:02 2012 86.9 Normal
Sat May 12 18:03:02 2012 87.8 Normal
Sat May 12 19:03:02 2012 87.8 Normal
Sat May 12 20:03:02 2012 87.8 Normal
Sat May 12 21:03:02 2012 86.9 Normal
Sat May 12 22:03:02 2012 86 Normal
Sat May 12 23:03:01 2012 85.1 Normal
Sun May 13 00:03:01 2012 84.2 Normal
Sun May 13 01:03:01 2012 84.2 Normal
Sun May 13 02:03:01 2012 83.3 Normal
Sun May 13 03:03:01 2012 83.3 Normal
Sun May 13 04:03:01 2012 83.3 Normal
Sun May 13 05:03:01 2012 82.4 Normal
Sun May 13 06:03:05 2012 82.4 Normal
Sun May 13 07:03:02 2012 82.4 Normal
Sun May 13 08:03:01 2012 82.4 Normal
Sun May 13 09:03:01 2012 83.3 Normal
Sun May 13 10:03:01 2012 83.3 Normal
Sun May 13 11:03:01 2012 82.4 Normal
Sun May 13 12:03:02 2012 83.3 Normal
Sun May 13 13:03:02 2012 87.8 Normal
Sun May 13 14:03:01 2012 86.9 Normal
Sun May 13 15:03:01 2012 87.8 Normal
Sun May 13 16:03:01 2012 88.7 Normal
Sun May 13 17:03:02 2012 88.7 Normal
Sun May 13 18:03:02 2012 88.7 Normal
Sun May 13 19:03:02 2012 88.7 Normal
Sun May 13 20:03:01 2012 87.8 Normal
Sun May 13 21:03:01 2012 87.8 Normal
Sun May 13 22:03:01 2012 87.8 Normal
Sun May 13 23:03:02 2012 86.9 Normal
Mon May 14 00:03:02 2012 86.9 Normal
Mon May 14 01:03:02 2012 86.9 Normal
Mon May 14 02:03:01 2012 86 Normal
Mon May 14 03:03:01 2012 86 Normal
Mon May 14 04:03:02 2012 86 Normal
Mon May 14 05:03:01 2012 85.1 Normal
Mon May 14 06:03:01 2012 85.1 Normal
Mon May 14 07:03:01 2012 85.1 Normal
Mon May 14 08:03:01 2012 85.1 Normal
Mon May 14 09:03:01 2012 87.8 Normal
Mon May 14 10:03:01 2012 87.8 Normal
Mon May 14 11:03:02 2012 87.8 Normal
Mon May 14 12:03:02 2012 87.8 Normal
Mon May 14 13:03:02 2012 87.8 Normal
Mon May 14 14:03:02 2012 87.8 Normal
Mon May 14 15:03:02 2012 87.8 Normal
Mon May 14 16:03:01 2012 87.8 Normal
Mon May 14 17:03:01 2012 88.25 Normal
Mon May 14 18:03:02 2012 85.55 Normal
Mon May 14 19:03:02 2012 84.2 Normal
Mon May 14 20:03:01 2012 84.2 Normal
Mon May 14 21:03:01 2012 83.3 Normal
Mon May 14 22:03:01 2012 83.3 Normal
Mon May 14 23:03:01 2012 83.3 Normal
Tue May 15 00:03:02 2012 83.3 Normal
Tue May 15 01:03:02 2012 82.4 Normal
Tue May 15 02:03:02 2012 82.4 Normal
Tue May 15 03:03:02 2012 83.3 Normal
Tue May 15 04:03:01 2012 82.4 Normal
Tue May 15 05:03:01 2012 82.4 Normal
Tue May 15 06:03:01 2012 82.4 Normal
Tue May 15 07:03:01 2012 82.4 Normal
Tue May 15 08:03:01 2012 82.4 Normal
Tue May 15 09:03:01 2012 83.3 Normal
Tue May 15 10:03:02 2012 84.2 Normal
Tue May 15 11:03:02 2012 86 Normal
Tue May 15 12:03:02 2012 87.8 Normal
Tue May 15 13:03:01 2012 88.7 Normal
Tue May 15 14:03:01 2012 88.7 Normal
Tue May 15 15:03:01 2012 89.6 Normal
Tue May 15 16:03:02 2012 90.5 HOT
The email I get is very simple, it reads:
Tue May 15 16:03:02 2012 _ 90.5 Fahrenheit, HOT
I am running LinuxMint 11 if it matters.
Thanks! |
|
 timcuthBraves FanPremium join:2000-09-18 Pelham, AL | Conky?
Tim |
|
|
|
 aa2k join:2000-10-06 Damascus, MD 3 edits | Yes, as »conky.sourceforge.net I think I an installs it from Mint repository... maybe make it read the data from the log file and present it to the desktop along with the other info...
EDIT: ok, found the solution on the net.. installed conky and I added these 2 lines at the end of the conky config file (/etc/conky/conky.conf)
${execi 60 cat /var/log/messages | tail -n5 | fold -s -w50} ${execi 60 cat /var/log/temper.log | tail -n5 | fold -s -w50}
giving me the last 5 lines of the temper.log message, refreshing every 60 seconds, I also can add the 5 last lines from messages log.
Still need to play/learn this 'conky' thing.. |
|
 pabloMVM join:2003-06-23 kudos:1 | For the record, I dislike you ... .. seriously, I thought I'd look into "conky" and ... it's quite sweet. I'm slowly picking away at it so it'll replace "gkrellm"
Quite the distraction!
Thank you.
Cheers, -pablo -- openSUSE 12.1/KDE 4.x ISP: TekSavvy Bonded DSL; backhauled via a 6KM wireless link Assorted goodies: »pablo.blog.blueoakdb.com |
|
 1 edit | reply to aa2k I use Slackware but have used Fedora and Debian before. Make sure you have the package "lm-sensors" installed.
than run in terminal as root
sensors-detect
and reboot |
|
 aa2k join:2000-10-06 Damascus, MD | reply to aa2k
 First try... |
Pablo: I think I see what you mean now  I am liking it too!! nice program... my first attempt to get it working..
darkstarone: It looks good, I will play with it next and it seems very useful.. nice!, its already installed I just need to configure it.. thanks! |
|
 pabloMVM join:2003-06-23 kudos:1 | Very nice aa2k . I'm still goofing around ... attached is the default conky with small tweaks. I may need to write a LUA in order to properly compute the maximum network rate per graph period.
Cheers, -pablo -- openSUSE 12.1/KDE 4.x ISP: TekSavvy Bonded DSL; backhauled via a 6KM wireless link Assorted goodies: »pablo.blog.blueoakdb.com |
|
 pabloMVM join:2003-06-23 kudos:1 | FWIW, I've goof'd around enough with "conky" ... I'll continue with "gkrellm'  |
|
 pabloMVM join:2003-06-23 kudos:1 |  conky strip |
As I tweaked "gkrellm", I found it did /most/ of what I wanted "conky" to do but not all. Given the spirit of Linux, no need for one application to do everything, I am using conky to do some of my monitoring.
I have a thin strip above my task bar with oodles of metrics.
Cheers, -pablo -- openSUSE 12.1/KDE 4.x ISP: TekSavvy Bonded DSL; backhauled via a 6KM wireless link Assorted goodies: »pablo.blog.blueoakdb.com |
|
 pabloMVM join:2003-06-23 kudos:1 |  blank desktop |
I have to say, goofing with conky is addictive. I believe the attached is my final desktop monitoring setup. If there's any interest, I can post my .conkyrc file.
Cheers! -pablo -- openSUSE 12.1/KDE 4.x ISP: TekSavvy Bonded DSL; backhauled via a 6KM wireless link Assorted goodies: »pablo.blog.blueoakdb.com |
|
 timcuthBraves FanPremium join:2000-09-18 Pelham, AL | Why is it so.... black?
Tim |
|
 pabloMVM join:2003-06-23 kudos:1 | My desktop background is purple. A very dark purple. The conky background is black.
As you can see, my desktop doesn't have much on it. I don't care to have any images etc. as it's typically not visible anyway. A lot of gunk running. A new (virtual) desktop quickly gets covered with windows.
Cheers, -pablo -- openSUSE 12.1/KDE 4.x ISP: TekSavvy Bonded DSL; backhauled via a 6KM wireless link Assorted goodies: »pablo.blog.blueoakdb.com |
|