Closed GoogleCodeExporter closed 8 years ago
Could you please try latest SVN version?
I've been doing a lot of work against memory-related stuff lately so the issue
at hand might already have been fixed by my changes.
Original comment by g.rodola
on 1 Aug 2012 at 1:11
SVN version seems to work properly, thanks!
Original comment by michal.s...@gmail.com
on 1 Aug 2012 at 1:25
However I got another similar problem (with a SVN version of psutil):
>>> psutil.phymem_usage()
__main__:1: DeprecationWarning: psutil.phymem_usage is deprecated
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/psutil/_common.py", line 101, in inner
return fun(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/psutil/__init__.py", line 1063, in phymem_usage
mem = virtual_memory()
File "/usr/lib/pymodules/python2.6/psutil/__init__.py", line 946, in virtual_memory
return _psplatform.virtual_memory()
File "/usr/lib/pymodules/python2.6/psutil/_pslinux.py", line 139, in virtual_memory
raise RuntimeError("line(s) not found")
RuntimeError: line(s) not found
Original comment by michal.s...@gmail.com
on 2 Aug 2012 at 11:55
Heh... that's controversial as I'm not sure what's best to do: fill the missing
fields with a null (0) value or let the exception propagate.
> cat /proc/meminfo
> MemTotal: 4194304 kB
> MemFree: 3757852 kB
> SwapTotal: 0 kB
> SwapFree: 0 kB
Is this the whole file content produced on Debian Squeeze? If not can you paste
the complete output?
Original comment by g.rodola
on 6 Aug 2012 at 5:37
Yes, unfortunatelly it is. But I don't think it's a Debian issue, but an OpenVZ
issue. It simply does not include all necessary info:
root@cdn-controller:~# uname -a
Linux cdn-controller.dev 2.6.32-5-openvz-amd64 #1 SMP Tue Jun 14 10:46:15 UTC
2011 x86_64 GNU/Linux
root@cdn-controller:~# cat /proc/meminfo
MemTotal: 4194304 kB
MemFree: 2943512 kB
SwapTotal: 0 kB
SwapFree: 0 kB
root@cdn-controller:~#
Original comment by michal.s...@gmail.com
on 7 Aug 2012 at 12:27
I suppose that's not the only missing piece of information.
Have you tried to run tests?
I expect other failures due to file contents of /proc fs being incomplete or
missing.
In that case I think we better off considering OpenVZ an unsupported platform.
I already have enough work on my hands with the other four *major* platforms
(and another fifth one on the way =)).
Original comment by g.rodola
on 9 Aug 2012 at 9:11
I modified both virtual_memory() and swap_memory() so that they no longer raise
an exception in case of missing values not found in /proc fs.
Instead, the missing values are now set to 0 and a RuntimeWarning is raised.
Done in r1534.
Original comment by g.rodola
on 17 Aug 2012 at 6:04
[deleted comment]
Updated csets after the SVN -> Mercurial migration:
r266 == revision f910f2f333cc
r1534 == revision 29c612ebf39d
Original comment by g.rodola
on 2 Mar 2013 at 12:11
Original comment by g.rodola
on 5 Mar 2013 at 12:16
Original comment by g.rodola
on 8 Apr 2013 at 1:21
Original comment by g.rodola
on 11 Apr 2013 at 9:17
Original comment by g.rodola
on 12 Apr 2013 at 6:21
Original issue reported on code.google.com by
michal.s...@gmail.com
on 1 Aug 2012 at 1:07