On Wed, 2011-07-20 at 13:29 -0700, Arnaud Quette wrote:
> Hey Al,
> 2011/7/19 Albert Chu <address@hidden
> > (...)
> > I assuming you mean libipmidetect? libipmidetect is
> > used for
> > detecting if ipmi over LAN exists, not for
> identifying any
> > particular
> > component. Not sure if it would be any use for you.
> > understood. we may have needs in the future, to do the same
> > over the network.
> > but for now, I've released a preliminary version of
> > which supports only FRU info retrieval.
> > It is available in NUT trunk, includes an m4 macro (ready
> > pkgconfig, but currently using AC_CHECK_HEADERS/FUNCS), and
> > abstracted IPMI implementation (only provided by FreeIPMI).
> > I still have to had the sensor's info, and have 2 questions
> for you:
> > - is there a way to automatically determine which sensor is
> > to an FRU?
> > Ie, I've found that the first PSU is ID 2. But how do I know
> > sensor X is the one attached to this board?
> Whew. It's not going to be easy. The current FRU format does
> support information to point you to the specific sensor
> that's sad, since to an IPMI newbie like me, such a reference seems
> obviously required and mandatory.
> I was pretty sure that I was missing something around the sensor owner
> ID, order of appearance (ie the 1rst PSU FRU with the first PSU
> sensor) or alike.
> If you tried to match power supply names (e.g. "PS 1"), that
> probably work for many motherboards. However, there is no
> that a motherboard would ensure the FRU power supply name
> matches the
> sensor one. In fact, I looked at one motherboard I have here,
> and they
> don't match.
> I *think* there is another way, but it gets complicated. You
> start to
> dig into a lot of IPMI specifics and nuances (which most of
> the FreeIPMI
> libraries naturally try to hide).
> If you take a look at the original ipmi-fru code,
> run_cmd_args() has a
> loop that loops through the sensor data repository (where
> records on
> each sensor are kept). That's where ipmi-fru finds the device
> IDs (e.g.
> ID 2) to look through. In the FRU SDR entry, there is another
> field for
> an fru_entity_id and fru_entity_instance (see
> freeipmi/templates/ipmi-sdr-record-format-templates.h). That
> entity ID
> and instance could be mapped to the entity-id/instance for the
> SDR records (in combination w/ checking the sensor-type and a
> few other
> fields). This will probably work on most motherboards.
> However, this later part is quite complicated. You'd be
> scanning/parsing the SDR manually to find these little bits
> b/c it isn't
> normally available in libipmimonitoring.
> This is such a unique case, I doubt it'd be something that
> would "fit"
> along with any of the current freeipmi libraries. I can help
> you write
> something for NUT that is specific for your needs though. It
> can scan
> for FRU entries, then perhaps scan for sensor entries, and
> give you back
> record IDs?? Which can subsequently be pumped into
> for the specific sensors??
> I understand ;-)
> do you think it involves duplicating a large chunk of the libs?