Re: [Freeipmi-devel] Fwd: ipmimonitoring-sensors.c discretereading workaround

2018-12-13 Thread Albert Chu
Ok, I think the issue was the very first sensor in your motherboard is
an OEM one, leading to the corner case.  I've updated it with a
different fix.  See if that works.

Al

On Thu, 2018-12-13 at 16:53 +0100, Florian wrote:
> Unfortunately the behaviour seems to be same as before.
> Also I found out that this also happens when I just set
> ignore_non_interpretable_sensors to 0, regardless of the
> discrete_reading.
> Here are the debug logs again: https://privatebin.florianstroeger.com
> /?a6ca58fafa858533#UnYEGT64uxq1Pt5p//LVT2jxzga2sKGeUhURExSixkE=
> (Again, more than 6800 lines)
> 
> Florian
> 
> 
> On Wed, Dec 12, 2018 at 10:47 PM Albert Chu  wrote:
> > Ahh, you didn't mention there was an error message :-)
> > 
> > I think this is just a corner case in the example, where it should
> > only
> > be calling a function if the bitmask type is known.  I've updated
> > the
> > example in the same branch.  Could you give it a try?
> > 
> > Al
> > 
> > On Wed, 2018-12-12 at 20:41 +0100, Florian wrote:
> > > Hey,
> > > 
> > > Yes, your recapitulation is correct.
> > > I've also done everything you said in your email again and added
> > the
> > > both debug parameters.
> > > Here is the log: https://privatebin.florianstroeger.com/?fd665f9c
> > dea8
> > > a9c8#F8H5p5lmKmTqiUkMhfwSZgeKLjcyPfrMaXmCj6b0TTQ=
> > > (more than 6800 lines of output)
> > > 
> > > Florian
> > > 
> > > On Wed, Dec 12, 2018 at 8:12 PM Albert Chu 
> > wrote:
> > > > On Wed, 2018-12-12 at 12:27 +0100, Florian wrote:
> > > > > Sorry, I forgot.
> > > > > 
> > > > > I finally get the readings: 
> > > > > root@preisschild-server-2:~/ipmi# gcc -O2 -o ipmimonitoring-
> > > > sensors
> > > > > ipmimonitoring-sensors.c -lipmimonitoring &&
> > ./ipmimonitoring-
> > > > sensors
> > > > > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor
> > State,
> > > > > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code,
> > > > Sensor
> > > > > Event Bitmask, Sensor Event String
> > > > > 5, Power Meter, 5, Current, N/A, 174.00, W, 9h, 2h, 'Device
> > > > Enabled'
> > > > 
> > > > Ok, good, that means it's working.
> > > > 
> > > > > The only thing now is, I only get it when I set record_ids[]
> > to
> > > > {5,
> > > > > 0}  and record_ids_length = 1.
> > > > > If I set them to the default values (0 and 0), nothing shows,
> > > > unless
> > > > > I set ignore_non_interpretable_sensors to 1.
> > > > 
> > > > Wait a second, so lets go back to the default example file that
> > > > comes
> > > > with FreeIPMI.
> > > > 
> > > > This default example file shows most sensors, but not #5.  And
> > #8 &
> > > > #9
> > > > don't have watt readings.  Correct?
> > > > 
> > > > If you set discrete_reading = 1, watt readings show up on #8 &
> > #9,
> > > > but
> > > > sensor #5 still doesn't show up?  That's what I would expect.
> > > > 
> > > > If you then set ignore_non_interpretable_sensors = 0, then I
> > would
> > > > expect record #5's sensor to show up w/ watt readings.  But
> > you're
> > > > saying at this point no sensors are output at all?
> > > > 
> > > > Al
> > > > 
> > > > > Florian
> > > > > 
> > > > > On Wed, Dec 12, 2018 at 12:50 AM Albert Chu 
> > > > wrote:
> > > > > > Just to double check, ignore_non_interpretable_sensors is
> > set
> > > > to 0?
> > > > > > 
> > > > > > Al
> > > > > > 
> > > > > > On Tue, 2018-12-11 at 20:55 +0100, Florian wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > Sure, here's the log: https://privatebin.florianstroeger.
> > com/
> > > > ?77d
> > > > > > 4fd1
> > > > > > > 8f282d55e#K0MG3NEiH0+sZvFNo+s8F9zvm1DYTj3f6kU8OEjvtmQ=
> > > > > > > 
> > > > > > > Florian
> > > > > > > 
> > > > > > > On Tue, Dec 11, 2018 at 7:29 PM Albert Chu  > v>
> > > > > > wrote:
> > > > > > > > Hey Florian,
> > > > > > > > 
> > > > > > > > Good, so atleast the "discrete reading" workaround
> > works
> > > > > > correctly
> > > > > > > > now.
> > > > > > > > 
> > > > > > > > > With IPM_MONITORING_FLAGS_DEBUG I did not get any
> > more
> > > > logs,
> > > > > > so I
> > > > > > > > did
> > > > > > > > > it with IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS.
> > > > > > > > 
> > > > > > > > Could you set both of these with the or operator and
> > re-
> > > > run,
> > > > > > i.e 
> > > > > > > > 
> > > > > > > > unsigned int ipmimonitoring_init_flags =
> > > > > > IPM_MONITORING_FLAGS_DEBUG
> > > > > > > > |
> > > > > > > > IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS
> > > > > > > > 
> > > > > > > > Thanks,
> > > > > > > > Al
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On Tue, 2018-12-11 at 08:52 +0100, Florian wrote:
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > -- Forwarded message -
> > > > > > > > > From: Florian 
> > > > > > > > > Date: Tue, Dec 11, 2018 at 8:52 AM
> > > > > > > > > Subject: Re: [Freeipmi-devel] ipmimonitoring-
> > sensors.c
> > > > > > > > > discretereading workaround
> > > > > > > > > To: Albert Chu 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > Hey Al,
> > > > > > > > > 
> 

Re: [Freeipmi-devel] Fwd: ipmimonitoring-sensors.c discretereading workaround

2018-12-13 Thread Florian
Unfortunately the behaviour seems to be same as before.
Also I found out that this also happens when I just set
ignore_non_interpretable_sensors to 0, regardless of the discrete_reading.
Here are the debug logs again:
https://privatebin.florianstroeger.com/?a6ca58fafa858533#UnYEGT64uxq1Pt5p//LVT2jxzga2sKGeUhURExSixkE=
(Again, more than 6800 lines)

Florian


On Wed, Dec 12, 2018 at 10:47 PM Albert Chu  wrote:

> Ahh, you didn't mention there was an error message :-)
>
> I think this is just a corner case in the example, where it should only
> be calling a function if the bitmask type is known.  I've updated the
> example in the same branch.  Could you give it a try?
>
> Al
>
> On Wed, 2018-12-12 at 20:41 +0100, Florian wrote:
> > Hey,
> >
> > Yes, your recapitulation is correct.
> > I've also done everything you said in your email again and added the
> > both debug parameters.
> > Here is the log: https://privatebin.florianstroeger.com/?fd665f9cdea8
> > a9c8#F8H5p5lmKmTqiUkMhfwSZgeKLjcyPfrMaXmCj6b0TTQ=
> > (more than 6800 lines of output)
> >
> > Florian
> >
> > On Wed, Dec 12, 2018 at 8:12 PM Albert Chu  wrote:
> > > On Wed, 2018-12-12 at 12:27 +0100, Florian wrote:
> > > > Sorry, I forgot.
> > > >
> > > > I finally get the readings:
> > > > root@preisschild-server-2:~/ipmi# gcc -O2 -o ipmimonitoring-
> > > sensors
> > > > ipmimonitoring-sensors.c -lipmimonitoring && ./ipmimonitoring-
> > > sensors
> > > > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State,
> > > > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code,
> > > Sensor
> > > > Event Bitmask, Sensor Event String
> > > > 5, Power Meter, 5, Current, N/A, 174.00, W, 9h, 2h, 'Device
> > > Enabled'
> > >
> > > Ok, good, that means it's working.
> > >
> > > > The only thing now is, I only get it when I set record_ids[] to
> > > {5,
> > > > 0}  and record_ids_length = 1.
> > > > If I set them to the default values (0 and 0), nothing shows,
> > > unless
> > > > I set ignore_non_interpretable_sensors to 1.
> > >
> > > Wait a second, so lets go back to the default example file that
> > > comes
> > > with FreeIPMI.
> > >
> > > This default example file shows most sensors, but not #5.  And #8 &
> > > #9
> > > don't have watt readings.  Correct?
> > >
> > > If you set discrete_reading = 1, watt readings show up on #8 & #9,
> > > but
> > > sensor #5 still doesn't show up?  That's what I would expect.
> > >
> > > If you then set ignore_non_interpretable_sensors = 0, then I would
> > > expect record #5's sensor to show up w/ watt readings.  But you're
> > > saying at this point no sensors are output at all?
> > >
> > > Al
> > >
> > > > Florian
> > > >
> > > > On Wed, Dec 12, 2018 at 12:50 AM Albert Chu 
> > > wrote:
> > > > > Just to double check, ignore_non_interpretable_sensors is set
> > > to 0?
> > > > >
> > > > > Al
> > > > >
> > > > > On Tue, 2018-12-11 at 20:55 +0100, Florian wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Sure, here's the log: https://privatebin.florianstroeger.com/
> > > ?77d
> > > > > 4fd1
> > > > > > 8f282d55e#K0MG3NEiH0+sZvFNo+s8F9zvm1DYTj3f6kU8OEjvtmQ=
> > > > > >
> > > > > > Florian
> > > > > >
> > > > > > On Tue, Dec 11, 2018 at 7:29 PM Albert Chu 
> > > > > wrote:
> > > > > > > Hey Florian,
> > > > > > >
> > > > > > > Good, so atleast the "discrete reading" workaround works
> > > > > correctly
> > > > > > > now.
> > > > > > >
> > > > > > > > With IPM_MONITORING_FLAGS_DEBUG I did not get any more
> > > logs,
> > > > > so I
> > > > > > > did
> > > > > > > > it with IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS.
> > > > > > >
> > > > > > > Could you set both of these with the or operator and re-
> > > run,
> > > > > i.e
> > > > > > >
> > > > > > > unsigned int ipmimonitoring_init_flags =
> > > > > IPM_MONITORING_FLAGS_DEBUG
> > > > > > > |
> > > > > > > IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Al
> > > > > > >
> > > > > > >
> > > > > > > On Tue, 2018-12-11 at 08:52 +0100, Florian wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > > -- Forwarded message -
> > > > > > > > From: Florian 
> > > > > > > > Date: Tue, Dec 11, 2018 at 8:52 AM
> > > > > > > > Subject: Re: [Freeipmi-devel] ipmimonitoring-sensors.c
> > > > > > > > discretereading workaround
> > > > > > > > To: Albert Chu 
> > > > > > > >
> > > > > > > >
> > > > > > > > Hey Al,
> > > > > > > >
> > > > > > > > Thanks for the fast patch,
> > > > > > > >
> > > > > > > > We got at least a partial victory:
> > > > > > > > After setting discrete_reading to 1, I got two of the PSU
> > > > > sensors
> > > > > > > > working:
> > > > > > > > 8, Power Supply 1, 8, Power Supply, Nominal, 45.00, W,
> > > 6Fh,
> > > > > 1h,
> > > > > > > > 'Presence detected'
> > > > > > > > 9, Power Supply 2, 9, Power Supply, Nominal, 40.00, W,
> > > 6Fh,
> > > > > 1h,
> > > > > > > > 'Presence detected'
> > > > > > > > Unfortunately sensor 5 (total power meter)  doesn't show
> > > up.
> > > > > > > >
> > > > > > > > 

Re: [Freeipmi-devel] Fwd: ipmimonitoring-sensors.c discretereading workaround

2018-12-12 Thread Albert Chu
Ahh, you didn't mention there was an error message :-)

I think this is just a corner case in the example, where it should only
be calling a function if the bitmask type is known.  I've updated the
example in the same branch.  Could you give it a try?

Al

On Wed, 2018-12-12 at 20:41 +0100, Florian wrote:
> Hey,
> 
> Yes, your recapitulation is correct.
> I've also done everything you said in your email again and added the
> both debug parameters.
> Here is the log: https://privatebin.florianstroeger.com/?fd665f9cdea8
> a9c8#F8H5p5lmKmTqiUkMhfwSZgeKLjcyPfrMaXmCj6b0TTQ=
> (more than 6800 lines of output)
> 
> Florian
> 
> On Wed, Dec 12, 2018 at 8:12 PM Albert Chu  wrote:
> > On Wed, 2018-12-12 at 12:27 +0100, Florian wrote:
> > > Sorry, I forgot.
> > > 
> > > I finally get the readings: 
> > > root@preisschild-server-2:~/ipmi# gcc -O2 -o ipmimonitoring-
> > sensors
> > > ipmimonitoring-sensors.c -lipmimonitoring && ./ipmimonitoring-
> > sensors
> > > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State,
> > > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code,
> > Sensor
> > > Event Bitmask, Sensor Event String
> > > 5, Power Meter, 5, Current, N/A, 174.00, W, 9h, 2h, 'Device
> > Enabled'
> > 
> > Ok, good, that means it's working.
> > 
> > > The only thing now is, I only get it when I set record_ids[] to
> > {5,
> > > 0}  and record_ids_length = 1.
> > > If I set them to the default values (0 and 0), nothing shows,
> > unless
> > > I set ignore_non_interpretable_sensors to 1.
> > 
> > Wait a second, so lets go back to the default example file that
> > comes
> > with FreeIPMI.
> > 
> > This default example file shows most sensors, but not #5.  And #8 &
> > #9
> > don't have watt readings.  Correct?
> > 
> > If you set discrete_reading = 1, watt readings show up on #8 & #9,
> > but
> > sensor #5 still doesn't show up?  That's what I would expect.
> > 
> > If you then set ignore_non_interpretable_sensors = 0, then I would
> > expect record #5's sensor to show up w/ watt readings.  But you're
> > saying at this point no sensors are output at all?
> > 
> > Al
> > 
> > > Florian
> > > 
> > > On Wed, Dec 12, 2018 at 12:50 AM Albert Chu 
> > wrote:
> > > > Just to double check, ignore_non_interpretable_sensors is set
> > to 0?
> > > > 
> > > > Al
> > > > 
> > > > On Tue, 2018-12-11 at 20:55 +0100, Florian wrote:
> > > > > Hi,
> > > > > 
> > > > > Sure, here's the log: https://privatebin.florianstroeger.com/
> > ?77d
> > > > 4fd1
> > > > > 8f282d55e#K0MG3NEiH0+sZvFNo+s8F9zvm1DYTj3f6kU8OEjvtmQ=
> > > > > 
> > > > > Florian
> > > > > 
> > > > > On Tue, Dec 11, 2018 at 7:29 PM Albert Chu 
> > > > wrote:
> > > > > > Hey Florian,
> > > > > > 
> > > > > > Good, so atleast the "discrete reading" workaround works
> > > > correctly
> > > > > > now.
> > > > > > 
> > > > > > > With IPM_MONITORING_FLAGS_DEBUG I did not get any more
> > logs,
> > > > so I
> > > > > > did
> > > > > > > it with IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS.
> > > > > > 
> > > > > > Could you set both of these with the or operator and re-
> > run,
> > > > i.e 
> > > > > > 
> > > > > > unsigned int ipmimonitoring_init_flags =
> > > > IPM_MONITORING_FLAGS_DEBUG
> > > > > > |
> > > > > > IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS
> > > > > > 
> > > > > > Thanks,
> > > > > > Al
> > > > > > 
> > > > > > 
> > > > > > On Tue, 2018-12-11 at 08:52 +0100, Florian wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > -- Forwarded message -
> > > > > > > From: Florian 
> > > > > > > Date: Tue, Dec 11, 2018 at 8:52 AM
> > > > > > > Subject: Re: [Freeipmi-devel] ipmimonitoring-sensors.c
> > > > > > > discretereading workaround
> > > > > > > To: Albert Chu 
> > > > > > > 
> > > > > > > 
> > > > > > > Hey Al,
> > > > > > > 
> > > > > > > Thanks for the fast patch,
> > > > > > > 
> > > > > > > We got at least a partial victory:
> > > > > > > After setting discrete_reading to 1, I got two of the PSU
> > > > sensors
> > > > > > > working: 
> > > > > > > 8, Power Supply 1, 8, Power Supply, Nominal, 45.00, W,
> > 6Fh,
> > > > 1h,
> > > > > > > 'Presence detected'
> > > > > > > 9, Power Supply 2, 9, Power Supply, Nominal, 40.00, W,
> > 6Fh,
> > > > 1h,
> > > > > > > 'Presence detected'
> > > > > > > Unfortunately sensor 5 (total power meter)  doesn't show
> > up. 
> > > > > > > 
> > > > > > > After setting record_ids[] to {5, 0}  and
> > record_ids_length =
> > > > 1,
> > > > > > I
> > > > > > > only get the headers:
> > > > > > > Record ID, Sensor Name, Sensor Number, Sensor Type,
> > Sensor
> > > > State,
> > > > > > > Sensor Reading, Sensor Units, Sensor Event/Reading Type
> > Code,
> > > > > > Sensor
> > > > > > > Event Bitmask, Sensor Event String
> > > > > > > 
> > > > > > > Before your patch it looked like this:
> > > > > > > Record ID, Sensor Name, Sensor Number, Sensor Type,
> > Sensor
> > > > State,
> > > > > > > Sensor Reading, Sensor Units, Sensor Event/Reading Type
> > Code,
> > > > > > Sensor
> > > > > > > Event Bitmask, 

Re: [Freeipmi-devel] Fwd: ipmimonitoring-sensors.c discretereading workaround

2018-12-11 Thread Albert Chu
Just to double check, ignore_non_interpretable_sensors is set to 0?

Al

On Tue, 2018-12-11 at 20:55 +0100, Florian wrote:
> Hi,
> 
> Sure, here's the log: https://privatebin.florianstroeger.com/?77d4fd1
> 8f282d55e#K0MG3NEiH0+sZvFNo+s8F9zvm1DYTj3f6kU8OEjvtmQ=
> 
> Florian
> 
> On Tue, Dec 11, 2018 at 7:29 PM Albert Chu  wrote:
> > Hey Florian,
> > 
> > Good, so atleast the "discrete reading" workaround works correctly
> > now.
> > 
> > > With IPM_MONITORING_FLAGS_DEBUG I did not get any more logs, so I
> > did
> > > it with IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS.
> > 
> > Could you set both of these with the or operator and re-run, i.e 
> > 
> > unsigned int ipmimonitoring_init_flags = IPM_MONITORING_FLAGS_DEBUG
> > |
> > IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS
> > 
> > Thanks,
> > Al
> > 
> > 
> > On Tue, 2018-12-11 at 08:52 +0100, Florian wrote:
> > > 
> > > 
> > > -- Forwarded message -
> > > From: Florian 
> > > Date: Tue, Dec 11, 2018 at 8:52 AM
> > > Subject: Re: [Freeipmi-devel] ipmimonitoring-sensors.c
> > > discretereading workaround
> > > To: Albert Chu 
> > > 
> > > 
> > > Hey Al,
> > > 
> > > Thanks for the fast patch,
> > > 
> > > We got at least a partial victory:
> > > After setting discrete_reading to 1, I got two of the PSU sensors
> > > working: 
> > > 8, Power Supply 1, 8, Power Supply, Nominal, 45.00, W, 6Fh, 1h,
> > > 'Presence detected'
> > > 9, Power Supply 2, 9, Power Supply, Nominal, 40.00, W, 6Fh, 1h,
> > > 'Presence detected'
> > > Unfortunately sensor 5 (total power meter)  doesn't show up. 
> > > 
> > > After setting record_ids[] to {5, 0}  and record_ids_length = 1,
> > I
> > > only get the headers:
> > > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State,
> > > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code,
> > Sensor
> > > Event Bitmask, Sensor Event String
> > > 
> > > Before your patch it looked like this:
> > > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State,
> > > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code,
> > Sensor
> > > Event Bitmask, Sensor Event String
> > > 5, Power Meter, 5, Current, N/A, N/A, N/A, 9h, 2h, 'Device
> > Enabled'.
> > > 
> > > With IPM_MONITORING_FLAGS_DEBUG I did not get any more logs, so I
> > did
> > > it with IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS.
> > > I've pasted the logs for that to my privatebin again: https://pri
> > vate
> > >
> > bin.florianstroeger.com/?29b500374675145d#dqIOvHjjtK0FbooesKFeC5Ow2
> > fl
> > > dIWSyuWIRiNnzW+0= 
> > > 
> > > Florian
> > > 
> > > On Tue, Dec 11, 2018 at 1:13 AM Al Chu  wrote:
> > > > Hey Florian,
> > > > 
> > > > I have an experimental branch called ipmimonitoring-discrete-
> > > > reading on
> > > > github here:
> > > > 
> > > > https://github.com/chu11/freeipmi-mirror/tree/ipmimonitoring-di
> > scre
> > > > te-r
> > > > eading
> > > > 
> > > > ./autogen.sh
> > > > ./configure
> > > > make
> > > > make install
> > > > re-compile ipmimonitoring-sensors.c and try it out
> > > > 
> > > > LMK if you need help, like getting to the right branch.  If you
> > > > can't
> > > > make install, LMK and I can show you some linker tricks.
> > > > 
> > > > Al
> > > > 
> > > > On Wed, 2018-12-05 at 20:34 +0100, Florian wrote:
> > > > > Hey Al,
> > > > > 
> > > > > That's awesome!
> > > > > 
> > > > > Sure, I'm totally OK with a git repo. As long as I just need
> > to
> > > > do
> > > > > configure and make I can do it.
> > > > > 
> > > > > Thanks for looking into this so fast!
> > > > > 
> > > > > Florian 
> > > > > 
> > > > > On Wed, Dec 5, 2018 at 8:26 PM Albert Chu 
> > wrote:
> > > > > > Hey Florian,
> > > > > > 
> > > > > > Ok, I think I found a bug.  The "discrete reading" flag is
> > > > passed
> > > > > > to an
> > > > > > underlying library correctly, but the result is not stored
> > in
> > > > > > libipmimonitoring correctly.  I don't remember how this
> > > > workaround
> > > > > > works 100%, because I never had this motherboard.
> > > > > > 
> > > > > > Once I look into this, how would like to be able to test? 
> > Will
> > > > > > pointing you to a github repo be ok?
> > > > > > 
> > > > > > For my personal notes for later: see 
> > > > > > _digital_sensor_reading() and _specific_sensor_reading(),
> > store
> > > > > > sensor
> > > > > > reading result and possibly units and other things too.
> > > > > > 
> > > > > > Al
> > > > > > 
> > > > > > On Wed, 2018-12-05 at 10:59 +0100, Florian wrote:
> > > > > > > Hey Albert,
> > > > > > > 
> > > > > > > The changeing of record_ids and record_ids_length showed
> > the
> > > > > > sensor 5
> > > > > > > (but no data) like this
> > > > > > > Record ID, Sensor Name, Sensor Number, Sensor Type,
> > Sensor
> > > > State,
> > > > > > > Sensor Reading, Sensor Units, Sensor Event/Reading Type
> > Code,
> > > > > > Sensor
> > > > > > > Event Bitmask, Sensor Event String
> > > > > > > 5, Power Meter, 5, Current, N/A, N/A, N/A, 9h, 2h,
> > 'Device
> > > > > > Enabled'.
> > > > > > > 
> > > 

Re: [Freeipmi-devel] Fwd: ipmimonitoring-sensors.c discretereading workaround

2018-12-11 Thread Florian
Hi,

Sure, here's the log:
https://privatebin.florianstroeger.com/?77d4fd18f282d55e#K0MG3NEiH0+sZvFNo+s8F9zvm1DYTj3f6kU8OEjvtmQ=


Florian

On Tue, Dec 11, 2018 at 7:29 PM Albert Chu  wrote:

> Hey Florian,
>
> Good, so atleast the "discrete reading" workaround works correctly now.
>
> > With IPM_MONITORING_FLAGS_DEBUG I did not get any more logs, so I did
> > it with IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS.
>
> Could you set both of these with the or operator and re-run, i.e
>
> unsigned int ipmimonitoring_init_flags = IPM_MONITORING_FLAGS_DEBUG |
> IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS
>
> Thanks,
> Al
>
>
> On Tue, 2018-12-11 at 08:52 +0100, Florian wrote:
> >
> >
> > -- Forwarded message -
> > From: Florian 
> > Date: Tue, Dec 11, 2018 at 8:52 AM
> > Subject: Re: [Freeipmi-devel] ipmimonitoring-sensors.c
> > discretereading workaround
> > To: Albert Chu 
> >
> >
> > Hey Al,
> >
> > Thanks for the fast patch,
> >
> > We got at least a partial victory:
> > After setting discrete_reading to 1, I got two of the PSU sensors
> > working:
> > 8, Power Supply 1, 8, Power Supply, Nominal, 45.00, W, 6Fh, 1h,
> > 'Presence detected'
> > 9, Power Supply 2, 9, Power Supply, Nominal, 40.00, W, 6Fh, 1h,
> > 'Presence detected'
> > Unfortunately sensor 5 (total power meter)  doesn't show up.
> >
> > After setting record_ids[] to {5, 0}  and record_ids_length = 1, I
> > only get the headers:
> > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State,
> > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code, Sensor
> > Event Bitmask, Sensor Event String
> >
> > Before your patch it looked like this:
> > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor State,
> > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code, Sensor
> > Event Bitmask, Sensor Event String
> > 5, Power Meter, 5, Current, N/A, N/A, N/A, 9h, 2h, 'Device Enabled'.
> >
> > With IPM_MONITORING_FLAGS_DEBUG I did not get any more logs, so I did
> > it with IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS.
> > I've pasted the logs for that to my privatebin again: https://private
> > bin.florianstroeger.com/?29b500374675145d#dqIOvHjjtK0FbooesKFeC5Ow2fl
> > dIWSyuWIRiNnzW+0=
> >
> > Florian
> >
> > On Tue, Dec 11, 2018 at 1:13 AM Al Chu  wrote:
> > > Hey Florian,
> > >
> > > I have an experimental branch called ipmimonitoring-discrete-
> > > reading on
> > > github here:
> > >
> > > https://github.com/chu11/freeipmi-mirror/tree/ipmimonitoring-discre
> > > te-r
> > > eading
> > >
> > > ./autogen.sh
> > > ./configure
> > > make
> > > make install
> > > re-compile ipmimonitoring-sensors.c and try it out
> > >
> > > LMK if you need help, like getting to the right branch.  If you
> > > can't
> > > make install, LMK and I can show you some linker tricks.
> > >
> > > Al
> > >
> > > On Wed, 2018-12-05 at 20:34 +0100, Florian wrote:
> > > > Hey Al,
> > > >
> > > > That's awesome!
> > > >
> > > > Sure, I'm totally OK with a git repo. As long as I just need to
> > > do
> > > > configure and make I can do it.
> > > >
> > > > Thanks for looking into this so fast!
> > > >
> > > > Florian
> > > >
> > > > On Wed, Dec 5, 2018 at 8:26 PM Albert Chu  wrote:
> > > > > Hey Florian,
> > > > >
> > > > > Ok, I think I found a bug.  The "discrete reading" flag is
> > > passed
> > > > > to an
> > > > > underlying library correctly, but the result is not stored in
> > > > > libipmimonitoring correctly.  I don't remember how this
> > > workaround
> > > > > works 100%, because I never had this motherboard.
> > > > >
> > > > > Once I look into this, how would like to be able to test?  Will
> > > > > pointing you to a github repo be ok?
> > > > >
> > > > > For my personal notes for later: see
> > > > > _digital_sensor_reading() and _specific_sensor_reading(), store
> > > > > sensor
> > > > > reading result and possibly units and other things too.
> > > > >
> > > > > Al
> > > > >
> > > > > On Wed, 2018-12-05 at 10:59 +0100, Florian wrote:
> > > > > > Hey Albert,
> > > > > >
> > > > > > The changeing of record_ids and record_ids_length showed the
> > > > > sensor 5
> > > > > > (but no data) like this
> > > > > > Record ID, Sensor Name, Sensor Number, Sensor Type, Sensor
> > > State,
> > > > > > Sensor Reading, Sensor Units, Sensor Event/Reading Type Code,
> > > > > Sensor
> > > > > > Event Bitmask, Sensor Event String
> > > > > > 5, Power Meter, 5, Current, N/A, N/A, N/A, 9h, 2h, 'Device
> > > > > Enabled'.
> > > > > >
> > > > > > IPMI_MONITORING_FLAGS_DEBUG unfortunately did not add ANY
> > > more
> > > > > logs
> > > > > > at all, so I tried with
> > > IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS
> > > > > > which gave me more logs.
> > > > > > Those are quite a lot of more lines, so I pasted it into my
> > > > > > privatebin: https://privatebin.florianstroeger.com/?58387298f
> > > 9b91
> > > > > 3c4#
> > > > > >