Share

Conky

Tracker: Patches

5 add hwmon support - ID: 1650894
Last Update: Comment added ( brenden1 )

This patch adds the ability to display the contents of hwmon files located
under
/sys/class/hwmon/hwmonX/device/
(with X some number, most likely X=0)

The syntax is ${hwmon X sensor no info}, which will just read from
/sys/class/hwmon/hwmonX/device/sensorno_info
For example, I personally use ${hwmon 0 temp 1 input} to read the
temperature of my CPU (in °C) from
/sys/class/hwmon/hwmon0/device/temp1_input
If the sensor name equals "temp", then the value read will be divided by
1000, otherwise the number will be used unchanged.
I got the factor 1000 just for my Abit uGuru sensor. I was not able to read
any of the values with any of the already present variables like
${acpitemp}; I did not have the possibility to check other boards/chips.

The patch modifies conky.h, conky.cpp and linux.c in src/. It has been
compiled & tested under

gcc version 4.1.1 (Gentoo 4.1.1-r1)
2.6.18-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3000+


flitsch ( flitsch ) - 2007-02-02 19:22

5

Closed

Fixed

Brenden Matthews

New feature/object

None

Public


Comments ( 4 )




Date: 2007-08-27 18:32
Sender: brenden1Project AdminAccepting Donations


Looks like I screwed up and never actually committed this patch. We do
have hwmon support now, although not from this patch. Please test from
svn.


Date: 2007-08-14 23:22
Sender: flitsch


Wrote a patch for 1.4.6 which does the same as the previous one. Except
for the versions, the only differences are

* one additional line in conky.h that removes a compiler warning,
* different comments in get_hwmon_value() wrt. the hwmon units.
File Added: hwmon-1.4.6.patch


Date: 2007-08-14 22:32
Sender: flitsch


I just checked the new 1.4.6 but unfortunately it looks like only there is
only the hwmon documentation in this version - not the actual
implementation (that's also what a "grep -ir hwmon" in the source directory
showed).

By the way: I just checked that the temperatures are always in millidegree
celsius (therefore the division by 1000), not just with the Abit uGuru.
(see linux/Documentation/hwmon/sysfs-interface)


Date: 2007-04-06 05:17
Sender: brenden1Project AdminAccepting Donations


Thanks. I will add this to svn shortly. Sorry for the wait.


Log in to comment.




Attached File ( 1 )

Filename Description Download
hwmon-1.4.6.patch Patch for 1.4.6 Download

Changes ( 12 )

Field Old Value Date By
close_date - 2007-08-27 18:32 brenden1
resolution_id Accepted 2007-08-27 18:32 brenden1
status_id Open 2007-08-27 18:32 brenden1
File Deleted 214226: 2007-08-14 23:22 flitsch
File Added 241255: hwmon-1.4.6.patch 2007-08-14 23:22 flitsch
close_date 2007-04-06 05:17 2007-08-14 22:32 flitsch
status_id Closed 2007-08-14 22:32 flitsch
close_date - 2007-04-06 05:17 brenden1
assigned_to nobody 2007-04-06 05:17 brenden1
resolution_id None 2007-04-06 05:17 brenden1
status_id Open 2007-04-06 05:17 brenden1
File Added 214226: hwmon.patch 2007-02-02 19:22 flitsch