Page 1 of 1

Conky hardware monitors?

Posted: Mon Sep 21, 2009 11:26 am
by Sanjima
Is there anyone that might be kind enough to walk me through adding hardware monitors to my Conky config?
(hardware monitors like CPU temperature and fan speed, case fan speed and HDD temperatures)

I have lm_sensors installed, and it works fine when I run "sensors" from the terminal. I just don't know how to get any of this data into my Conky output.

I'm running Linux Mint 7 Gloria, Main Edition. if that helps.

Here's a screenshot of the output produced by the sensors command, and my current conky config. :3
http://img24.imageshack.us/img24/9606/screenshot1fu.png

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 11:35 am
by lagagnon
Here is my line for CPU temperature:

${color lightgrey}CPU Temp:${execi 60 sensors | grep CPU | cut -c 15-16}C

You have to use grep and cut properly to get the info off the sensors line. "grep" finds the CPU line and "cut" finds the correct columns of info from the line.

However, if ACPI is working and enabled correctly and you have a motherboard that supports certain ACPI facilities you might be able to get CPU temp directly from the file: /proc/acpi/thermal_zone

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 11:38 am
by Sanjima
ooh, alrighty. And I suppose I can use the same code style to get voltage readings and anything else from the Sensors output.

How would I go about checking to see if ACPI is installed and working correctly? =o

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 11:42 am
by lagagnon
Sanjima wrote:ooh, alrighty. And I suppose I can use the same code style to get voltage readings and anything else from the Sensors output.
Exactly.
How would I go about checking to see if ACPI is installed and working correctly? =o
Just use the file manager to navigate to /proc/acpi/thermal_zone/THRM/temperature and see if you see a temperature listed there, if that is the case then you don't need the above and you can do this:

${acpitemp}°C ${alignr}(${cpu cpu1}%)

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 11:46 am
by Sanjima
lagagnon wrote:Just use the file manager to navigate to /proc/acpi/thermal_zone/THRM/temperature and see if you see a temperature listed there
I did so and when I opened the temperature file, it was blank. o.o; Any thoughts?

*edit: When I open the folder as root and look at the file icons where it shows a little preview of its contents, they don't appear to be blank. But when I open it with the text editor, it appears as if blank.

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 12:04 pm
by optimize me
Tutorials, how-to's, scripts, screenshots and more: http://conky.linux-hardcore.com/

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 2:20 pm
by Sanjima
optimize me wrote:Tutorials, how-to's, scripts, screenshots and more: http://conky.linux-hardcore.com/
That website is kinda handy, I'd been looking through it a bit earlier. But its section on hardware monitors and their scripts was every small and didn't explain much at all.

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 7:42 pm
by AK Dave
Thats totally awesome! Thanks! Oooh, I forsee hours and hours retooling my conky scripts now. :)

Re: Conky hardware monitors?

Posted: Mon Sep 21, 2009 8:54 pm
by Sanjima
AK Dave wrote:
Thats totally awesome! Thanks! Oooh, I forsee hours and hours retooling my conky scripts now. :)
xD yeah I've spent quite a deal of time editing mine today and yesterday. Take a look =D
http://img43.imageshack.us/img43/8429/niftyf.png

If you like it I can give you my .conkyrc for it, and the extra scripts and files involved. :3