On 11/22/2013 09:18 AM, Aleksandrs Saveljevs wrote:
> Good morning,
>
> We noticed that OpenIPMI versions 2.0.16 through 2.0.18 append "0" to 
> discrete sensor names. Here is an example to illustrate that:
>
> $ ipmitool -U ... -P ... -I lan -H ... -L user sensor | grep 
> Processor.Status | cut -d'|' -f1,2,3
> Processor Status | 0x0        | discrete
>
> We now launch different versions of ipmi_ui and view sensors for entity 
> 3.1 using "sensors 3.1" command:
>
> $ OpenIPMI-2.0.16-install/bin/ipmi_ui ...
> ...
> Sensors for entity
> 3.1:
>    3.1.Processor~Status0 - Processor Status0
>
> $ OpenIPMI-2.0.19-install/bin/ipmi_ui ...
> ...
> Sensors for entity
> 3.1:
>    3.1.Processor~Status - Processor Status
>
> It can be seen that in version 2.0.16 there is "0" appended to sensor 
> name, while version 2.0.19 does not have that.
>
> Since the "0" probably should not be there and since the newer version 
> fixes it, we assume the previous versions were a bit buggy. However, we 
> need to work around that bug in our software by increasing one of the 
> buffer sizes and we wish to know by how much we should increase it.
>
> Would increasing the maximum buffer size for sensor names by one byte 
> from 17 (16 for name plus terminating '\0') to 18 be enough?

That bug was there because there is an option in the IPMI SDRs (type 2)
to use the same SDR to represent multiple sensors, adding a number or an
alpha to the end of the name.  It was accidentally tacking this on to
the end of the sensor even if that option was not enabled.

However, your calculations on the maximum size of an IPMI sensor name
are incorrect.  Since you can use BCD and the field is 16 bytes max, you
can get up to 32 bytes in the ID string.  Adding the sensor sharing and
that's another three bytes (I believe 142 is the maximum number you can
get), so 35 bytes is the maximum, I believe.

-corey

>
> Aleksandrs
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing 
> conversations that shape the rapidly evolving mobile landscape. Sign up now. 
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Openipmi-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openipmi-developer


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to