Sheng Peng wrote: > Hi, > I am new to IPMI. > I am trying to write a piece code to get hardware status thru IPMI > interface to my application. > I did some research of openIPMI, freeIPMI and ipmitool. > It seems openIPMI is more popular than freeIPMI and works for my DELL > server. So I don't worry about freeIPMI anymore. > > Then I installed ipmitool, it seems no problem to get the info of my > server. > But when I looked into the source code. I am confused. > Say if I just want to read temperature and fan RPM, should I use > openIPMI API (if there is a thing called openIPMI API), or just ioctl > like ipmitool source code does? If you want a simple scripted solution, ipmitool is a fine tool for that. So if you just want to get readings and store them in a file, and maybe send an email if they are out of range, ipmitool and a script, IMHO, is your best bet.
If you need access from a C program, you need performance/efficiency, or you need to do a lot of IPMI work, IMHO the OpenIPMI API is the way to go. It's not as easy as scripting ipmitool, but it's very powerful. You can also access the OpenIPMI API from perl or python. The OpenIPMI GUI, in fact, is written in python. Direct ioctls work, but if you upgrade your firmware or move to a different box your program will probably be broken because the sensor numbers will not be consistent. I'd recommend against that approach. ipmitool and OpenIPMI will read the data from the BMC and translate into meaningful names/types that are less likely to change, making your program more portable. > > And I found for my Fedora 6, ipmi.h is under /usr/include/linux from > kernel-hearders-xxx.rpm. > But for my other system with RHEL, I can only find ipmi.h from kernel > src or openIPMI/ipmitool source. > Why the ipmi.h is not in a "public" area anymore? It's a kernel include file. So it comes from the kernel. -corey > Thanks. > Sheng > > ------------------------------------------------------------------------ > Make every e-mail and IM count. Join the i’m Initiative from > Microsoft. > <http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_%20MakeCount> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > Ipmitool-devel mailing list > Ipmitool-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ipmitool-devel > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel