Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Noisy ipmi0 after bootup? (really other kernel noise)



On Fri, 5 Sep 2008, Juan Romero Pardines wrote:

The question is if those sensors are really connected to hw or are not.
Because if they aren't, the critical limits won't be really useful.

Perhaps looking at the data three times and invalidating the sensor might
be another option?

That might be a reasonable thing to do. But how do you know that a value of 0 RPM is because there's nothing attached vs the fan is broken?

Given the nature of ipmi, I'm assuming that if the ?BIOS? says that there's a sensor, it is at the very least connected to a header and is capable of returning data. Determining the reason for failure to return non-zero RPM reading is a bit out of my league at the moment, since I don't have any ipmi systems myself to play with.

(Perhaps my new Intel box - being delivered next week - will have ipmi and then I can experiment.)

BTW, the previously attached patch had a couple typos, so it won't compile. If anyone is interested in trying this, please use the new patch attached!


----------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul%whooppee.com@localhost   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost |
----------------------------------------------------------------------
Index: ipmi.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/ipmi.c,v
retrieving revision 1.18
diff -u -p -r1.18 ipmi.c
--- ipmi.c      17 Apr 2008 05:26:11 -0000      1.18
+++ ipmi.c      5 Sep 2008 16:32:37 -0000
@@ -214,7 +214,8 @@ void        ipmi_unmap_regs(struct ipmi_softc *
 
 void   *scan_sig(long, long, int, int, const void *);
 
-int    ipmi_test_threshold(uint8_t, uint8_t, uint8_t, uint8_t);
+int    ipmi_test_threshold_lo(uint8_t, uint8_t, uint8_t);
+int    ipmi_test_threshold_hi(uint8_t, uint8_t, uint8_t);
 int    ipmi_sensor_status(struct ipmi_softc *, struct ipmi_sensor *,
                           envsys_data_t *, uint8_t *);
 
@@ -1307,11 +1308,17 @@ ipmi_convert(uint8_t v, struct sdrtype1 
 }
 
 int
-ipmi_test_threshold(uint8_t v, uint8_t valid, uint8_t hi, uint8_t lo)
+ipmi_test_threshold_hi(uint8_t v, uint8_t valid, uint8_t hi)
 {
-       dbg_printf(10, "thresh: %.2x %.2x %.2x %d\n", v, lo, hi,valid);
-       return ((valid & 1 && lo != 0x00 && v <= lo) ||
-           (valid & 8 && hi != 0xFF && v >= hi));
+       dbg_printf(10, "thresh_hi: %.2x %.2x %d\n", v, hi, valid);
+       return (valid & 8 && hi != 0xFF && v >= hi);
+}
+
+int
+ipmi_test_threshold_lo(uint8_t v, uint8_t valid, uint8_t lo)
+{
+       dbg_printf(10, "thresh_lo: %.2x %.2x %d\n", v, lo, valid);
+       return (valid & 1 && lo != 0x00 && v <= lo);
 }
 
 int
@@ -1357,18 +1364,24 @@ ipmi_sensor_status(struct ipmi_softc *sc
                    data[0], data[1], data[2], data[3], data[4], data[5],
                    data[6]);
 
-               if (ipmi_test_threshold(*reading, data[0] >> 2 ,
-                   data[6], data[3]))
+               if (ipmi_test_threshold_hi(*reading, data[0] >> 2 , data[6]))
                        return ENVSYS_SCRITOVER;
 
-               if (ipmi_test_threshold(*reading, data[0] >> 1,
-                   data[5], data[2]))
+               if (ipmi_test_threshold_hi(*reading, data[0] >> 1, data[5]))
                        return ENVSYS_SCRITOVER;
 
-               if (ipmi_test_threshold(*reading, data[0] ,
-                   data[4], data[1]))
+               if (ipmi_test_threshold_hi(*reading, data[0] , data[4]))
                        return ENVSYS_SWARNOVER;
 
+               if (ipmi_test_threshold_lo(*reading, data[0] >> 2 , data[3]))
+                       return ENVSYS_SCRITUNDER;
+
+               if (ipmi_test_threshold_lo(*reading, data[0] >> 1, data[2]))
+                       return ENVSYS_SCRITUNDER;
+
+               if (ipmi_test_threshold_lo(*reading, data[0] , data[1]))
+                       return ENVSYS_SWARNUNDER;
+
                break;
 
        case IPMI_SENSOR_TYPE_INTRUSION:


Home | Main Index | Thread Index | Old Index