Using the python bindings (with 2.0.19 of OpenIPMI and python 2.7.1), 
 got the code to work nicely, but when it finishes, i get the following 
 junk:

 $ ./openipmi-sample2.py lan -U username -P mypassword bmcipaddr
 INFO: test 0 ipmi_lan.c(connection_up): Connection 0 to the BMC is up
 INFO: test 0 ipmi_lan.c(connection_up): Connection to the BMC restored
 Conn up
 MC: test(0.20)
 got response: [0, 18, 1, 4, 34, 2, 223, 11, 0, 0, 0, 0, 3, 1, 0, 0]


 Never freed 176 bytes at 0x80e58d8, allocated at 0x4054913f 0x4054a16e 
 0x404e35a4 0x4049c301 0x4008aef6 0x400eeb5d
 Never freed 52 bytes at 0x80e59d0, allocated at 0x401ab2e6 0x404fcf55 
 0x405491b7 0x4054a16e 0x404e35a4 0x4049c301
 Never freed 8 bytes at 0x80e5a58, allocated at 0x401aaee9 0x401ab30a 
 0x404fcf55 0x405491b7 0x4054a16e 0x404e35a4
 Never freed 14640 bytes at 0x8113ef8, allocated at 0x405491cd 
 0x4054a16e 0x404e35a4 0x4049c301 0x4008aef6 0x400eeb5d
 ......

 If i pipe stderr to /dev/null it'll be clean, but i am wondering if 
 there's a better way to fix this ?


 I am looking at sample2.py with the following diff (so it actually 
 exits at some point instead of querying endlessly):

 --- OpenIPMI-2.0.19/swig/python/sample2.py     2011-10-12 
 11:03:25.000000000 -0400
 +++ OpenIPMI-2.0.19/swig/python/sample2.py  2011-10-12 
 17:23:54.615437000 -0400
 @@ -94,14 +65,18 @@
      pass

  nexttime = time.time()
 -while main_handler.name != "done":
 +num_poll = 1
 +while main_handler.name != "done" and num_poll <= 2:
      OpenIPMI.wait_io(1000)
      now = time.time()
      if main_handler.mc and now >= nexttime:
          nexttime += 5
 +        num_poll += 1
          main_handler.mc.to_mc(main_handler)
      pass

  OpenIPMI.shutdown_everything()
  print "done"
  sys.exit(0)

 (just pasting this diff so you see i'm using known-working code)

------------------------------------------------------------------------------
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

Reply via email to