You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. import psutil
2. psutil.get_memory_info()
What is the expected output?
What do you see instead?
memory info
psutil.get_memory_info()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'get_memory_info'
What version of psutil are you using? What Python version?
0.2.0 , python 2.6 and 2.7
On what operating system? Is it 32bit or 64bit version?
32
get_memory_info() is a per-process function, not a module-wide system function:
>>> import psutil, os
>>> p = psutil.Process(os.getpid())
>>> p.get_memory_info()
meminfo(rss=3796992, vms=618160128)
Memory information for the system is retrieved with module functions like
avail_phymem()/avail_virtmem(), and used_phymem()/used_virtmem()
From [email protected] on December 02, 2010 01:19:28
Original issue: http://code.google.com/p/psutil/issues/detail?id=138
The text was updated successfully, but these errors were encountered: