Bug 171000

Summary: net-snmp can't read lm_sensors' values
Product: Red Hat Enterprise Linux 4 Reporter: Axel Thimm <axel.thimm>
Component: net-snmpAssignee: Jan Safranek <jsafrane>
Status: CLOSED INSUFFICIENT_DATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-07 09:46:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/etc/sensors.conf
none
/etc/sysconfig/lm_sensors
none
experimental patch none

Description Axel Thimm 2005-10-17 09:34:42 UTC
Description of problem:
lm_sensors has been configured and "sensors" returns some values. Using et-snmp
to export these one gets

# snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.13.16.2.1.1
LM-SENSORS-MIB::lmTempSensorsIndex = No more variables left in this MIB View (It
is past the end of the MIB tree)
Smaller OIDs, e.g. .1.3.6.1.4.1.2021.13.16 or a full wlak don't give anything
further.

Version-Release number of selected component (if applicable):
net-snmp-5.1.2-11.EL4.6.x86_64
lm_sensors-2.8.7-2.i386
lm_sensors-2.8.7-2.x86_64

How reproducible:
always

Steps to Reproduce:
1.setup lm_sensors and net-snmp
2.Try to get sensors' values via snmp
3.
  
Actual results:
LM-SENSORS-MIB::lmTempSensorsIndex = No more variables left in this MIB View (It
is past the end of the MIB tree)


Expected results:
A tree of sensor values

Additional info:
Running with -DALL gives:

[...]
mib_init: initializing: lmSensors
trace: _sensor_load(): ucd-snmp/lmSensors.c, 307:
sensors: sensor -1785654644, value 1520
trace: _sensor_load(): ucd-snmp/lmSensors.c, 307:
sensors: sensor -1785654576, value 1536
trace: _sensor_load(): ucd-snmp/lmSensors.c, 307:
sensors: sensor -1785654508, value 3360
trace: _sensor_load(): ucd-snmp/lmSensors.c, 307:
sensors: sensor -1785654440, value 5053
[...]
trace: _sensor_load(): ucd-snmp/lmSensors.c, 307:
sensors: sensor -1785663012, value 0
trace: _sensor_load(): ucd-snmp/lmSensors.c, 307:
sensors: sensor -1785662944, value 0
too many sensors. ignoring CPU


and later:

LM-SENSORS-MIB::lmTempSensorsIndex = Wrong Type (should be INTEGER): NULL

Comment 1 Radek Vokál 2005-10-17 12:17:02 UTC
Seems that exactly the same configuration works on my AMD64 machine. 

snmpwalk -v2c -c public localhost lmSensors

show several sensors working with valid values. Does `sensors` show correct
output? Can I have the strace with debuginfo? The last line - wrong type - looks
suspicious. 

Comment 2 Axel Thimm 2005-10-17 13:33:52 UTC
debuginfo: Do you mean some lm_sensors-debuginfo-2.8.7 package? where can I get
it for RHEL4?

sensors shows a lot of info. Just in case it matters, this is a tyan 2882 board.

# sensors
w83627hf-isa-0290
Adapter: ISA adapter
VCore 1:   +1.52 V  (min =  +1.74 V, max =  +2.14 V)              
VCore 2:   +1.52 V  (min =  +1.74 V, max =  +2.14 V)              
+3.3V:     +3.36 V  (min =  +2.82 V, max =  +3.79 V)              
+5V:       +5.05 V  (min =  +5.40 V, max =  +0.22 V)              
+12V:      +4.68 V  (min =  +6.81 V, max =  +7.30 V)              
-12V:      -2.08 V  (min =  -4.88 V, max =  -3.73 V)              
-5V:       -3.89 V  (min =  -6.40 V, max =  -4.04 V)              
V5SB:      +5.56 V  (min =  +5.40 V, max =  +0.54 V)              
VBat:      +0.00 V  (min =  +1.07 V, max =  +0.19 V)              
fan1:     3169 RPM  (min = 168750 RPM, div = 2)                     
fan2:     3183 RPM  (min = 168750 RPM, div = 2)                     
fan3:        0 RPM  (min = 2657 RPM, div = 2)                     
temp1:       +35°C  (high =   +51°C, hyst =   +21°C)   sensor = thermistor     
     
temp2:     +36.5°C  (high =   +80°C, hyst =   +75°C)   sensor = thermistor     
     
temp3:     +41.5°C  (high =   +80°C, hyst =   +75°C)   sensor = thermistor     
     
ERROR: Can't get VID data!
alarms:   
beep_enable:
          Sound alarm disabled

eeprom-i2c-0-55
Adapter: SMBus AMD756 adapter at 10e0
Memory type:            DDR SDRAM DIMM
Memory size (MB):       512

eeprom-i2c-0-54
Adapter: SMBus AMD756 adapter at 10e0
Memory type:            DDR SDRAM DIMM
Memory size (MB):       512

eeprom-i2c-0-51
Adapter: SMBus AMD756 adapter at 10e0
Memory type:            DDR SDRAM DIMM
Memory size (MB):       512

eeprom-i2c-0-50
Adapter: SMBus AMD756 adapter at 10e0
Memory type:            DDR SDRAM DIMM
Memory size (MB):       512

adm1027-i2c-0-2e
Adapter: SMBus AMD756 adapter at 10e0
ERROR: Can't get alarm mask data!
V1.5:      +2.513 V  (min =  +2.37 V, max =  +2.63 V)   
VCore:     +1.254 V  (min =  +1.14 V, max =  +1.27 V)   
V3.3:      +3.317 V  (min =  +3.13 V, max =  +3.47 V)   
V5:       +5.104 V  (min =  +4.74 V, max =  +5.26 V)   
V12:      +12.125 V  (min = +11.38 V, max = +12.62 V)   
CPU_Fan:      0 RPM  (min =    0 RPM)                     
CPU:      +41.00°C  (low  =  -127°C, high =  +127°C)       
Board:    +41.00°C  (low  =  -127°C, high =  +127°C)      
Remote:   +43.00°C  (low  =  -127°C, high =  +127°C)       
CPU_PWM:   255
Fan2_PWM:  255
Fan3_PWM:  255


Comment 3 Radek Vokál 2006-11-08 14:05:23 UTC
Still works for me 

snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.13.16.2
LM-SENSORS-MIB::lmTempSensorsIndex.1 = INTEGER: 0
LM-SENSORS-MIB::lmTempSensorsIndex.2 = INTEGER: 1
LM-SENSORS-MIB::lmTempSensorsIndex.3 = INTEGER: 2
LM-SENSORS-MIB::lmTempSensorsDevice.1 = STRING: temp1
LM-SENSORS-MIB::lmTempSensorsDevice.2 = STRING: temp2
LM-SENSORS-MIB::lmTempSensorsDevice.3 = STRING: temp3
LM-SENSORS-MIB::lmTempSensorsValue.1 = Gauge32: 35000
LM-SENSORS-MIB::lmTempSensorsValue.2 = Gauge32: 36000
LM-SENSORS-MIB::lmTempSensorsValue.3 = Gauge32: 4294919296

on x86_64 box. 

Comment 4 Axel Thimm 2006-11-08 15:45:47 UTC
Created attachment 140658 [details]
/etc/sensors.conf

There have been updates to both lm_sensors and net-snmp but the bug is still
there:

# rpm -q --qf '%{n}-%{v}-%{r}.%{arch}\n' lm_sensors net-snmp
lm_sensors-2.8.7-2.40.3.i386
lm_sensors-2.8.7-2.40.3.x86_64
net-snmp-5.1.2-11.EL4.7.x86_64

# snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.2021.13.16.2.1.1
LM-SENSORS-MIB::lmTempSensorsIndex = No more variables left in this MIB View
(It is past the end of the MIB tree)

It probably depends on the sensor config used, that's why you can't reproduce
it.

(In reply to comment #1)
> Seems that exactly the same configuration works on my AMD64 machine. 

I'm attaching my sensors' config.

Comment 5 Axel Thimm 2006-11-08 15:46:47 UTC
Created attachment 140659 [details]
/etc/sysconfig/lm_sensors

Comment 6 Axel Thimm 2006-11-08 15:54:09 UTC
Radek, could you (try to) reopen this please? Although I'm the original reporter
bugzilla seems to not want to allow that (???). I reported to
bugzilla-owner and placed you in the Cc.

Comment 7 Radek Vokál 2006-11-08 16:00:13 UTC
So is this bug still present? I don't have any machine where I can't see
lm_sensors output :(

Comment 8 Axel Thimm 2006-11-08 16:20:34 UTC
How can I help debugging this? I can grant access to the affected RHEL4 system,
but I have an FC5 system with identical hardware (at least concernign
lm_sensors). I could try to reproduce the bug under FC5 and if it works I can
offer root acces to you. Would that make sense?

BTW I suspect that perhaps the fact that lm_sensors queries two chips may result
in some broken accounting. I'll try to deactivate one in the config to verify.

Comment 9 Jan Safranek 2007-06-15 09:22:38 UTC
I apologize for long time of silece, I am new maintainer of net-snmp and I am
cleaning old bugs. Could you please try to reproduce the bug with latest RHEL
4.5 update and let me know the results? Thanks in advance.

Comment 10 Axel Thimm 2007-06-15 09:45:42 UTC
# head -1 /etc/issue; sensors; snmpwalk -v 2c -c public localhost
.1.3.6.1.4.1.2021.13.16.2
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
adm1027-i2c-0-2e
Adapter: SMBus AMD756 adapter at 10e0
DDR 2.5V:  +2.513 V  (min =  +2.37 V, max =  +2.63 V)   
DDR VTT:   +1.266 V  (min =  +1.14 V, max =  +1.27 V)   
3VSB:      +3.352 V  (min =  +3.13 V, max =  +3.47 V)   
+5 V:     +5.130 V  (min =  +4.74 V, max =  +5.26 V)   
+12V:     +12.125 V  (min = +11.38 V, max = +12.62 V)   
fan2:         0 RPM  (min =    0 RPM)                     
fan1:         0 RPM  (min =    0 RPM)                     
fan3:         0 RPM  (min =    0 RPM)                     
fan4:         0 RPM  (min =    0 RPM)                     
CPU2 Temp:+53.00°C  (low  =  -127°C, high =  +127°C)       
sys Temp: +53.00°C  (low  =  -127°C, high =  +127°C)      
CPU1 Temp:+50.00°C  (low  =  -127°C, high =  +127°C)       
vid:      +1.950 V  (VRM Version 2.4)

w83627hf-isa-0290
Adapter: ISA adapter
CPU2 Volt: +1.50 V  (min =  +1.74 V, max =  +2.14 V)              
CPU1 Volt: +1.50 V  (min =  +1.74 V, max =  +2.14 V)              
3.3V:      +3.33 V  (min =  +2.82 V, max =  +3.79 V)              
DDR VTT:   +1.22 V  (min =  +0.00 V, max =  +2.08 V)              
DDR 2.5V:  +2.46 V  (min =  +2.11 V, max =  +2.18 V)              
CPU2 Fan:    0 RPM  (min = 4166 RPM, div = 2)                     
CPU1 Fan:    0 RPM  (min = 2657 RPM, div = 2)                     
Fan5:        0 RPM  (min = 2657 RPM, div = 2)                     
vid:      +1.950 V  (VRM Version 2.4)
alarms:   
beep_enable:
          Sound alarm disabled

LM-SENSORS-MIB::lmTempSensorsTable = No more variables left in this MIB View (It
is past the end of the MIB tree)


Comment 11 Jan Safranek 2007-06-15 14:56:18 UTC
Created attachment 157119 [details]
experimental patch

It's still not reproducible in my environment. Here is a patch adding lot of
debug info into sensors code and some experimental fixes. Could you please try
it? You can find prepared srpm at http://people.redhat.com/jsafrane/bugs/171000


Please note that the package contains also other experimental 4.6 bugfixes and
may not be stable, although it works on my machine.

Try to run 'snmpd -f -Lo -Dsensors' and attach the results please.

Thank you very much in advance.

Comment 12 Jan Safranek 2007-06-22 05:48:12 UTC
Any progress in testing the patch? My RHEL 4.6 deadline is approaching and 
without your test it may happen that the fix will miss 4.6 update and will wait 
another half a year to get into 4.7.


Comment 13 Axel Thimm 2007-08-06 09:30:06 UTC
Any change you could offer this as a package? I'm currently swamped in work and
this would make testing much easier.

Comment 14 Jan Safranek 2007-08-06 11:25:34 UTC
I uploaded binaries to http://people.redhat.com/jsafrane/bugs/171000/.
Although RHEL-4.6 is frozen now and only serious bugs can be fixed now, I'd like
to ask you to test it so it can be fixed in 4.7.

Please run 'snmpd -f -Lo -Dsensors' and attach the results.

Comment 15 Axel Thimm 2007-12-30 09:57:13 UTC
Sorry for the long delay - I had to release the system in question to the
customer before any further testing could happen and I have since been waiting
for a similar RHEL4 job which didn't happen. Most systems I can experiment with
are RHEL5 and different hardware. If I reproduce this bug again on RHEL5 I will
reopen accordingly. Thanks!

BTW I just tried to closes as "INSUFFICIENT DATA" and bugzilla complains with

   "You tried to change the Status field from NEEDINFO to CLOSED, but only the
    owner or submitter of the bug, or a autorized user, may change that field."

Even though I'm the owner. Anyway please close as "INSUFFICIENT DATA" for now.

Comment 16 Jan Safranek 2008-01-07 09:46:48 UTC
Closing on submitter's request