Hi Al,<br><br><div class="gmail_quote">2011/7/1 Albert Chu <span dir="ltr"><<a href="mailto:chu11@llnl.gov" target="_blank">chu11@llnl.gov</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Arnaud,<br>
<div><div></div><div><br>
On Fri, 2011-07-01 at 01:56 -0700, Arnaud Quette wrote:<br>
> Hi Al,<br>
><br>
> (FYI, I cc'ed the NUT developers list for info)<br>
><br>
> 2011/6/30 Albert Chu <<a href="mailto:chu11@llnl.gov" target="_blank">chu11@llnl.gov</a>><br>
> Hi Arnaud,<br>
><br>
> On Tue, 2011-06-28 at 12:19 -0700, Arnaud Quette wrote:<br>
><br>
> > Hi Al,<br>
> ><br>
> > 2011/6/28 Albert Chu <<a href="mailto:chu11@llnl.gov" target="_blank">chu11@llnl.gov</a>><br>
> > On Tue, 2011-06-28 at 02:28 -0700, Arnaud Quette<br>
> wrote:<br>
> > (...)<br>
> > > I'm *very* interested in!<br>
> > > this could even serve as a simple example, shipped<br>
> in the<br>
> > examples/<br>
> > > directory.<br>
> ><br>
> ><br>
> ><br>
> > Unfortunately, it will require knowledge of the IPMI<br>
> > protocol/specification, which makes it difficult<br>
> (and why I<br>
> > probably<br>
> > never bothered with an example).<br>
> ><br>
> > Everything is in the ipmi-fru and ipmi-sensors<br>
> tools, however<br>
> > I imagine<br>
> > a lot of the options, permutations of things, IPMI<br>
> spec<br>
> > details, etc. is<br>
> > what's making it confusing.<br>
> ><br>
> > Give me some time, and I'll try to "whittle" the<br>
> ipmi-fru and<br>
> > ipmi-sensors tools into a far simpler example that<br>
> can give<br>
> > you a basis<br>
> > for what you're trying to accomplish.<br>
> ><br>
> > sure, thanks a lot for your much appreciated proposition.<br>
> > since I have some hard deadlines, do you have any<br>
> approximate idea on<br>
> > when you'd be able to release this?<br>
><br>
><br>
> Attached is a simplified ipmi-fru that you can hopefully use<br>
> to extract<br>
> the FRU information you seek. "gcc ipmi-fru-example.c<br>
> -lfreeipmi" is<br>
> all you need to do. I took out a lot of stuff, and there a<br>
> number of<br>
> special cases not handled. It may not work for all<br>
> motherboards, but is<br>
> a good place to start.<br>
><br>
> awesome, thanks a lot Al!<br>
> I'm starting to see the light, though I've not yet read the code<br>
> thoroughly...<br>
><br>
> I just have to check (maybe with libdetect) how to identify PSU, but I<br>
> already got the following data by modifying<br>
> ipmi_fru_parse_open_device_id() to specify a known PSU ID:<br>
><br>
> FRU Board Language: English<br>
> FRU Board Manufacturing Date/Time: 01/05/11 - 08:51:00<br>
> FRU Board Manufacturer: DELL<br>
> FRU Board Product Name: PWR SPLY,717W,RDNT<br>
> FRU Board Serial Number: CN179721130031<br>
> FRU Board Part Number: 0RN442A01<br>
><br>
> FRU Power Supply Overall Capacity: 717 Watts<br>
> FRU Power Supply Peak VA: 0 VA<br>
> FRU Power Supply Max Inrush Current: 0 Amps<br>
> FRU Power Supply Inrush Interval: 0 ms<br>
> FRU Power Supply Low End Input Voltage 1: 90000 mV<br>
> FRU Power Supply High End Input Voltage 1: 264000 mV<br>
> FRU Power Supply Low End Input Voltage 2: 0 mV<br>
> FRU Power Supply High End Input Voltage 2: 0 mV<br>
> FRU Power Supply Low End Acceptable Frequencey: 47 Hz<br>
> FRU Power Supply High End Acceptable Frequencey: 63 Hz<br>
> FRU Power Supply A/C Dropout Tolerance: 0 ms<br>
> FRU Power Supply Predictive Fail Support: No<br>
> FRU Power Supply Power Factor Correction Supported: No<br>
> FRU Power Supply AutoSwitch Supprt: Yes<br>
> FRU Power Supply Hot Swap Support: Yes<br>
> FRU Power Supply Peak Capacity: 0 Watts<br>
> FRU Power Supply Hold Up Time: 0 s<br>
> FRU Power Supply Voltage 1: 12V<br>
> FRU Power Supply Voltage 2: 12V<br>
> FRU Power Supply Total Combined Wattage: 0 Watts<br>
><br>
> As for sensors, I figured you would probably want to use<br>
> libipmimonitoring, since it's at a much higher level. I would<br>
> suggest<br>
> looking at the ipmimonitoring-sensors.c file.<br>
><br>
> indeed, that's what I understood.<br>
> as told above, I just got to check libdetect for PSU identification,<br>
> then everything should be alright.<br>
<br>
</div></div>I assuming you mean libipmidetect? libipmidetect is primarily used for<br>
detecting if ipmi over LAN exists, not for identifying any particular<br>
component. Not sure if it would be any use for you.<br></blockquote><div><br>understood. we may have needs in the future, to do the same detection over the network.<br>but for now, I've released a preliminary version of 'nut-ipmipsu', which supports only FRU info retrieval.<br>
It is available in NUT trunk, includes an m4 macro (ready for pkgconfig, but currently using AC_CHECK_HEADERS/FUNCS), and an abstracted IPMI implementation (only provided by FreeIPMI).<br><br>
I still have to had the sensor's info, and have 2 questions for you:<br>- is there a way to automatically determine which sensor is attached to an FRU?<br>Ie, I've found that the first PSU is ID 2. But how do I know that sensor X is the one attached to this board?<br>
- the things I'm using to parse FRU (like ipmi_fru_parse_ctx_create) and other things (lie ipmi_ctx_find_inband) are not available in 0.7.17 (the base I'm working on, Ubuntu up to 11.04).<br>I've dug quickly the ChangeLog, but was not able to identify clearly when these functions were added.<br>
What is the minimal FreeIPMI required?<br><br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div>
><br>
> Hopefully that's enough to get you going. LMK if you need<br>
> some help<br>
> deciphering the code more.<br>
><br>
> this should not be needed, but thanks for your kind proposition.<br>
><br>
> but you should probably publish this code in examples/, with a name<br>
> like "simple-ipmi-fru.c" or alike, and highlight this code sample a<br>
> bit.<br>
<br>
</div>That's the plan eventually :P<br></blockquote></div><br>so I've a minor patch for you (attached) ;)<br clear="all">it fixes indentation (replace tabs by spaces), and a typo on 'frequenc*e*y'.<br>it may also be interesting to give the example compilation line in the file header...<br>
<br>cheers,<br>Arnaud<br>-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://powerquality.eaton.com" target="_blank">http://powerquality.eaton.com</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br><br>