freeipmi-devel
[Top][All Lists]
Advanced

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

[Freeipmi-devel] Sensor thresholds and sensor capabilities bits


From: Liebig, Holger
Subject: [Freeipmi-devel] Sensor thresholds and sensor capabilities bits
Date: Tue, 2 Jul 2013 14:56:22 +0200

We got a response from one of our customers that an old version of ipmi-sensors 
did not report the CPU temperature thresholds with some of our systems. I 
checked this and it was easily reproducible with the latest version of FreeIPMI 
and quite any of our systems, so I started looking for the root cause. FreeIPMI 
is using the sensor capabilities bits to determine if sensor thresholds are 
available or not. In our case this is encoded as 11b for reasons nobody seems 
to recall. From the spec:

Sensor Threshold Access Support
[3:2] - 00b = no thresholds.
        01b = thresholds are readable, per Reading Mask, below.
        10b = thresholds are readable and settable per Reading Mask and
              Settable Threshold Mask, respectively.
        11b = Fixed, unreadable, thresholds. Which thresholds are supported is
              reflected by the Reading Mask. The threshold value fields report
              the values that are ‘hard-coded’ in the sensor.

The only explanation I have is that 11b was interpreted by early Fujitsu SDR 
development as "Fixed/hard coded" in the above sentence and then carried over 
to any follow up system, while FreeIPMI is focusing on the "unreadable" word 
and does no further checking.  

My proposal would be to solve this in an OEM specific way, so 
--interpret-oem-data would be needed for correct output. Let me know if you 
have any thoughts on this proposal or regarding the interpretation of the spec.

Thanks & best regards,
Holger Liebig

-----------------------------------
svn diff
Index: ipmi-sensors-output-common.c
===================================================================
--- ipmi-sensors-output-common.c        (revision 9745)
+++ ipmi-sensors-output-common.c        (working copy)
@@ -451,12 +451,22 @@
       goto cleanup;
     }
 
-  if (threshold_access_support == IPMI_SDR_NO_THRESHOLDS_SUPPORT
-      || threshold_access_support == 
IPMI_SDR_FIXED_UNREADABLE_THRESHOLDS_SUPPORT)
-    {
-      rv = 0;
-      goto cleanup;
-    }
+    if ( state_data->oem_data.manufacturer_id == 
IPMI_IANA_ENTERPRISE_ID_FUJITSU) 
+        {
+          /* FTS, indicate fixed thresholds in SDR with 11b. IPMI Spec. 
ambiguous if you insist on the 'unreadable' */
+          if (threshold_access_support == IPMI_SDR_NO_THRESHOLDS_SUPPORT )
+            {
+              rv = 0;
+              goto cleanup;
+            }
+        }
+    
+    else if (threshold_access_support == IPMI_SDR_NO_THRESHOLDS_SUPPORT
+            || threshold_access_support == 
IPMI_SDR_FIXED_UNREADABLE_THRESHOLDS_SUPPORT)
+      {
+        rv = 0;
+        goto cleanup;
+      }
 
   /* achu:
    *

Attachment: threshold_capabilities.diff
Description: threshold_capabilities.diff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]