Thanks, I've looked at the sample.py a few times already but i couldn't get it to run in our environment (the GUI encumberance keeps it from running in our environment) and hence it was a little difficult to get my head wrapped around the code itself if i couldn't see it in action. This is on top of there not seeming to be much documentation on the different function calls, other than looking at the source code for the swig interface (the .i file) or the lib's c code
i'll take a look at the the program you attached too, but basically what i'm trying to do is query power data against an HP sl-line of systems that don't have full-blown iLO's (the cheaper SL systems had a less capable lo100, like the sl160z g6 or the sl165s g7) which originally made power-monitoring difficult and limited via an HP tool that only runs locally. But I've discovered the utility they use locally to query the data from the (sl6000/sl6500) chassis the systems are in, uses ipmi raw under the hood, and these ipmi raw queries work remotely against the bmc of the host as well. i was hoping to have something that can frequently poll power usage out-of-band (since the readings appear to be instantaneous and not averaged over an interval) while we are doing benchmarking against new procs from AMD (hence i don't want to run the utility HP provides locally since that will take away CPU time from the benchmarks). my C is really not that strong but i've getting a good grasp on python lately (been using perl for a while now as well), hence i was trying to get more familiar with OO/python and use OpenIPMI, but from what i've seen, OpenIPMI seems to want to do all this leg work for you that i'm not sure i need, and i'm not sure how to just have it do something low-level/simple like connect to a bmc, authenticate, start a session, and with the same session poll a raw cmd against the bmc every few seconds (or more frequently depending on the resolution of the data being returned). the limited amount of example code i had see of OpenIPMI get incredibly complex really fast (esp when GUI functionality is entangled into the code IMO needlessly). i just want to do something simple like throw some raw hex queries (netfn/cmd/data) at a bmc and get the data back as quickly as possible.. hopefully w/o forking a separate helper command to do it (e.g. ipmitool or ipmiutil).. and i was hoping OpenIPMI could spare me having to re-invent the lower framework of crafting udp packets and stuffing them with ipmi-compatible data just to do a simple ipmi-raw query :-\ but it started to seem like OpenIPMI wasn't intended for this use, but instead to help write more complex management software suites (with OpenIPMI handling the complicated tasks). Hence my original question to this list if OpenIPMI is too powerful a tool for my simple needs :) I was hoping someone had some simple sample code that took a username/password/ip for the bmc, and i could hard-code the hex queries into the code and adapt it to the rest of my needs. On Wed, 12 Oct 2011 10:02:16 -0500, Corey Minyard wrote: > On 10/11/2011 04:02 PM, [email protected] wrote: >> So I have some ipmitool raw commands i run remotely against a >> host's >> bmc, and wanted to code them via the python bindings (so i can >> more >> frequent polling and then do further processing w/o forking >> ipmitool >> over and over). >> >> However the documentation is a bit sparse and i can't honestly see >> how >> do i construct some code to do this? >> >> So i have to ask, is emulating raw requests something viable via >> OpenIPMI? Is there any examples i can look at ? Even if it's just >> in C, >> i figure the python bindings are pretty thinly swig'ified, but if >> i >> could figure out if/how that's done, i'll tackle pythonifying it >> afterwards. > > Sure, that's easy. There is a file named "swig/python/sample.py" > that has a sample of a python interface. I've also attached a > little program that does a get device id command every 5 seconds. > Run > it with "sample2.py smi 0" to talk to the local interface. > > What are you trying to get, btw? OpenIPMI can do most of the > interpretation work for you. > > -corey ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Openipmi-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openipmi-developer
