Hi Dan,

It appears to be a pretty standard power supply sensor, so I'm not sure why the "sensor state" output is incorrect.

I did some tests locally and everything appears to work.  So I'm not sure why it's uniquely not working in your environment.

I'm not sure if you're up for some re-building and debugging?

```

git clone https://github.com/chu11/freeipmi-mirror.git
cd freeipmi
patch -p1 < debug.patch
./autogen.sh
./configure --enable-debug
make
ipmi-sensors/ipmi-sensors --output-sensor-state --record-ids=2483

```

where debug.patch is attached.

My first thought is that somewhere between the sensor read and the "interpretation" for the sensor state, the event bitmask is not what we think it is.  So lets see if we can verify if that's the case first.

Al


On 12/11/24 09:10, Dan Mahoney (Gushi) wrote:
Here’s the -vv output:

Record ID: 2483
Record Type: Compact Sensor Record (2h)
ID String: PS2 Status
Sensor Type: Power Supply (8h)
Sensor Number: 201
IPMB Slave Address: 10h
Sensor Owner ID: 20h
Sensor Owner LUN: 0h
Channel Number: 0h
Entity ID: power supply (10)
Entity Instance: 2
Entity Instance Type: Physical Entity
Event/Reading Type Code: 6Fh
Sensor Direction: Unspecified
Positive Hysteresis: N/A
Negative Hysteresis: N/A
Assertion Event Enabled: 'Power Supply Failure detected'
Assertion Event Enabled: 'Predictive Failure'
Deassertion Event Enabled: 'Power Supply Failure detected'
Deassertion Event Enabled: 'Predictive Failure'
Share Count: 0
ID String Instance Modifier Type: Numeric
ID String Instance Modifier Offset: 0
Entity Instance Sharing: Same for all records
Sensor Event: 'Presence detected'
Sensor Event: 'Power Supply Failure detected'
Sensor Event: 'Power Supply input lost (AC/DC)'

Debug output is over at: 
https://urldefense.us/v3/__https://pastebin.com/Vit4YB0Z__;!!G2kpM7uM-TzIFchu!z_-tQrQR8_o_pyHapF83fodSB2NaM7SdqsJckn4Gso3nI6lL174bOS2VFbmxYNV-XDyDR36EERJwBQ$
  (where I edited the hostname out).

On Dec 10, 2024, at 13:16, Al Chu <[email protected]> wrote:

-vv --record-ids=2483

--
Al Chu
Livermore Computing
Lawrence Livermore National Laboratory
diff --git a/libfreeipmi/interpret/ipmi-interpret.c b/libfreeipmi/interpret/ipmi-interpret.c
index 0a9cbfaf1..b8b639c6c 100644
--- a/libfreeipmi/interpret/ipmi-interpret.c
+++ b/libfreeipmi/interpret/ipmi-interpret.c
@@ -1484,6 +1484,7 @@ ipmi_interpret_sensor (ipmi_interpret_ctx_t ctx,
           goto cleanup;
         }
 
+      fprintf (stderr, "%s:%d sensor event bitmask = %X\n", __FUNCTION__, __LINE__, sensor_event_bitmask);
       if (_get_sensor_state (ctx,
                              event_reading_type_code,
                              sensor_type,
diff --git a/libfreeipmi/sensor-read/ipmi-sensor-read.c b/libfreeipmi/sensor-read/ipmi-sensor-read.c
index f3aa4bf68..5e1ec9ea9 100644
--- a/libfreeipmi/sensor-read/ipmi-sensor-read.c
+++ b/libfreeipmi/sensor-read/ipmi-sensor-read.c
@@ -790,6 +790,7 @@ ipmi_sensor_read (ipmi_sensor_read_ctx_t ctx,
       goto cleanup;
     }
 
+  fprintf (stderr, "%s:%d sensor event bitmask %d %d %X\n", __FUNCTION__, __LINE__, sensor_event_bitmask1_flag, sensor_event_bitmask2_flag, (*sensor_event_bitmask));
   if (FIID_OBJ_GET (obj_cmd_rs,
                     "sensor_reading",
                     &val) < 0)
_______________________________________________
Freeipmi-users mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/freeipmi-users

Reply via email to