rrd/sens_update_rrd: Support non-i2c devices. Since kernel 2.6.14, hardware

monitoring devices are better accessed through the hwmon class. Original
patch from Jeff Kosowsky.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4369 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-04-17 09:09:54 +00:00
1 parent 0db2710999
commit 21b322fd3f
2 files changed
+18 -11

No files matched your search

+1
View File
@@ -6,6 +6,7 @@ SVN HEAD
Library: Clean up pwm symbol names translation
Add dme1737 support
Program isadump: Detect when address bit 7 is a busy flag
Program sens_update_rrd: Support non-i2c devices (hwmon class)
Program sensors: Drop ddcmon and eeprom support
Add dme1737 support
Program sensors-detect: Stop Super-I/O probe after first family success
+17 -11
View File
@@ -29,7 +29,9 @@
if [ $# -ne 2 ]
then
echo "usage: $0 database.rrd sensor"
echo " sensor example: w83781d-isa-0290 (2.4) or 0-0290 (2.6)"
echo " sensor example: w83781d-isa-0290 (2.4 kernel)"
echo " 0-0290 (early 2.6 kernel)"
echo " hwmon0 (kernel 2.6.14 or later)"
exit 1
fi
#
@@ -38,19 +40,23 @@ RRDB=$1
SENSDIR=/proc/sys/dev/sensors
SDIR=/sys/bus/i2c/devices
if [ ! -d $SENSDIR ]
HWMONDIR=/sys/class/hwmon
SENSDEV=$2
if [ -d $HWMONDIR ]
then
if [ ! -d $SDIR ]
then
echo $0: 'No sensors found! (modprobe sensor modules?)'
exit 1
else
SYSFS=1
SENSDIR=$SDIR
fi
SYSFS=1
SENSDIR=$HWMONDIR
SENSDEV=$SENSDEV/device
elif [ -d $SDIR ]
then
SYSFS=1
SENSDIR=$SDIR
elif [ ! -d $SENSDIR]
then
echo $0: 'No sensors found! (modprobe sensor modules?)'
exit 1
fi
SENSDEV=$2
SENS=$SENSDIR/$SENSDEV
if [ ! -r $SENS ]
then