Hi Al,<br><br>(FYI, I cc'ed the NUT developers list for info)<br><br><div class="gmail_quote">2011/6/30 Albert Chu <span dir="ltr"><<a href="mailto:chu11@llnl.gov">chu11@llnl.gov</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Hi Arnaud,<br>
<br>
On Tue, 2011-06-28 at 12:19 -0700, Arnaud Quette wrote:<br>
</div><div class="im">> Hi Al,<br>
><br>
> 2011/6/28 Albert Chu <<a href="mailto:chu11@llnl.gov">chu11@llnl.gov</a>><br>
>         On Tue, 2011-06-28 at 02:28 -0700, Arnaud Quette wrote:<br>
>         (...)<br>
>         > I'm *very* interested in!<br>
>         > this could even serve as a simple example, shipped 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 (and why I<br>
>         probably<br>
>         never bothered with an example).<br>
><br>
>         Everything is in the ipmi-fru and ipmi-sensors tools, however<br>
>         I imagine<br>
>         a lot of the options, permutations of things, IPMI spec<br>
>         details, etc. is<br>
>         what's making it confusing.<br>
><br>
>         Give me some time, and I'll try to "whittle" the ipmi-fru and<br>
>         ipmi-sensors tools into a far simpler example that 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 approximate idea on<br>
> when you'd be able to release this?<br>
<br>
</div>Attached is a simplified ipmi-fru that you can hopefully use to extract<br>
the FRU information you seek.  "gcc ipmi-fru-example.c -lfreeipmi" is<br>
all you need to do.  I took out a lot of stuff, and there a number of<br>
special cases not handled.  It may not work for all motherboards, but is<br>
a good place to start.<br></blockquote><div><br>awesome, thanks a lot Al!<br>I'm starting to see the light, though I've not yet read the code thoroughly...<br><br>I just have to check (maybe with libdetect) how to identify PSU, but I already got the following data by modifying 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>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
As for sensors, I figured you would probably want to use<br>
libipmimonitoring, since it's at a much higher level.  I would suggest<br>
looking at the ipmimonitoring-sensors.c file.<br></blockquote><div> <br>indeed, that's what I understood.<br>as told above, I just got to check libdetect for PSU identification, then everything should be alright.<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;">
Hopefully that's enough to get you going.  LMK if you need some help<br>
deciphering the code more.<br></blockquote><div> <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 like "simple-ipmi-fru.c" or alike, and highlight this code sample a bit.<br>
</div></div><br>thanks again,<br clear="all">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>