Changeset 4369

Show
Ignore:
Timestamp:
04/17/07 11:09:54 (8 years ago)
Author:
khali
Message:

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.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4358 r4369  
    77           Add dme1737 support 
    88  Program isadump: Detect when address bit 7 is a busy flag 
     9  Program sens_update_rrd: Support non-i2c devices (hwmon class) 
    910  Program sensors: Drop ddcmon and eeprom support 
    1011                   Add dme1737 support 
  • lm-sensors/trunk/prog/rrd/sens_update_rrd

    r2982 r4369  
    3030then 
    3131        echo "usage: $0 database.rrd sensor" 
    32         echo "       sensor example: w83781d-isa-0290 (2.4) or 0-0290 (2.6)" 
     32        echo "       sensor example: w83781d-isa-0290 (2.4 kernel)" 
     33        echo "                       0-0290 (early 2.6 kernel)" 
     34        echo "                       hwmon0 (kernel 2.6.14 or later)" 
    3335        exit 1 
    3436fi 
     
    3941SENSDIR=/proc/sys/dev/sensors 
    4042SDIR=/sys/bus/i2c/devices 
    41 if [ ! -d $SENSDIR ] 
     43HWMONDIR=/sys/class/hwmon 
     44SENSDEV=$2 
     45if [ -d $HWMONDIR ] 
    4246then 
    43         if [ ! -d $SDIR ] 
    44         then 
    45                 echo $0: 'No sensors found! (modprobe sensor modules?)' 
    46                 exit 1 
    47         else 
    48                 SYSFS=1 
    49                 SENSDIR=$SDIR 
    50         fi       
     47        SYSFS=1 
     48        SENSDIR=$HWMONDIR 
     49        SENSDEV=$SENSDEV/device 
     50elif [ -d $SDIR ] 
     51then 
     52        SYSFS=1 
     53        SENSDIR=$SDIR 
     54elif [ ! -d $SENSDIR] 
     55then 
     56        echo $0: 'No sensors found! (modprobe sensor modules?)' 
     57        exit 1 
    5158fi 
    5259 
    53 SENSDEV=$2 
    5460SENS=$SENSDIR/$SENSDEV 
    5561if [ ! -r $SENS ]