Open GoogleCodeExporter opened 8 years ago
Probably has to do with this issue. OS X 10.8.4, when I call get_connections()
I always get:
In [26]: p1.get_connections()
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-26-2368f2c26189> in <module>()
----> 1 p1.get_connections()
/Users/viktor/anaconda/lib/python2.7/site-packages/psutil/__init__.pyc in
get_connections(self, kind)
708 all the sum of all the possible families and protocols
709 """
--> 710 return self._platform_impl.get_connections(kind)
711
712 def is_running(self):
/Users/viktor/anaconda/lib/python2.7/site-packages/psutil/_psosx.pyc in
wrapper(self, *args, **kwargs)
145 def wrapper(self, *args, **kwargs):
146 try:
--> 147 return fun(self, *args, **kwargs)
148 except OSError:
149 err = sys.exc_info()[1]
/Users/viktor/anaconda/lib/python2.7/site-packages/psutil/_psosx.pyc in
get_connections(self, kind)
275 % (kind, ', '.join([repr(x) for x in conn_tmap])))
276 families, types = conn_tmap[kind]
--> 277 rawlist = _psutil_osx.get_process_connections(self.pid,
families, types)
278 ret = []
279 for item in rawlist:
OSError: [Errno 12] Cannot allocate memory
Original comment by alefnula
on 9 Aug 2013 at 10:20
Ah! That's not good. Unfortunately I cannot reproduce that.
Do you think you could try to debug the issue in order to see what function
call is failing?
In detail you should look at psutil/_psutil_osx.c, get_process_connections()
function and put printf()s before all the "PyErr_SetFromErrno(PyExc_OSError);"
occurrences.
Original comment by g.rodola
on 26 Aug 2013 at 8:16
Original issue reported on code.google.com by
jlo...@gmail.com
on 18 Jun 2013 at 12:44