Menu

#493 patch to make snmpd report negative sensor values

closed
None
5
2012-11-08
2004-09-13
Jochen
No

This one is forwarded from
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=249904

From: Peter Hirdina Peter.Hirdina@gmx.net
Subject: snmpd reports no negative values for sensors
handled by lm_sensors

I noticed that I can't get negative values from my
sensors. As soon as I noticed that they are all defined
as unsigned ints, it became quiet clear to me. I
redefined them where appropriate (see attached patch).
Every sensor type except fan speed sensors should be
able to hold a negative value. That includes temp,
voltage and misc sensors. Ok, for temp sensors a
negative value is really unlikely, but more likely than
such a high
readout that we need a full 2^32 bit value. I guess in
such a case there isn't much left to monitor anyway ;).
And for the others I think it's quite clear that they
could hold negative values.

I modified the code and the MIB file (hope that were
all places).

Discussion

  • Mike Slifcak

    Mike Slifcak - 2004-09-23

    Logged In: YES
    user_id=88697

    Thanks for the patch! It has been applied to the 5.0.x and 5.1.x
    code bases and the main development tree, and will appear in
    future releases of the net-snmp package.

     
  • Mike Slifcak

    Mike Slifcak - 2004-09-23

    Logged In: YES
    user_id=88697

    Justification for applying the patch was wrong.

    Once a MIB object is published, it can be changed
    only by setting its STATUS to OBSOLETE, as per SMI version.

    The patch was removed from the 5.0.x , 5.1.x, and main branches

     
  • Mike Slifcak

    Mike Slifcak - 2004-09-24

    Logged In: YES
    user_id=88697

    The patch still has value IF new objects are defined
    which can return the range of values.
    It remains at "WontFix" only because of the "illegal"
    re-definition of MIB objects.

     
  • Robert Story

    Robert Story - 2004-10-03

    Logged In: YES
    user_id=76148

    Moved state to pending.

    Note: a revised patch that added and implemented new objects
    (instead of redefining existing ones) would be considered.
    It is likely that the LM-SENSORS-MIB will be replaced by a
    new, more generic MIB in a future release (5.3 or later).

     

Log in to post a comment.