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?
<snippet>
import psutil
n = 0
for p in psutil.process_iter():
try:
n += p.get_memory_percent()
except:
print p.pid
print p.name
raise
print n
</snippet>
raises:
D:\pyftpdlib\svn\psutil>foo.py
944
csrss.exe
Traceback (most recent call last):
File "D:\pyftpdlib\svn\psutil\foo.py", line 10, in <module>
n += p.get_memory_percent()
File "D:\pyftpdlib\svn\psutil\psutil\_psutil.py", line 250, in
get_memory_perc
ent
rss = _platform_impl.get_memory_info(self.pid)[0]
File "psutil\_psmswindows.py", line 29, in wrapper
raise AccessDenied
psutil.error.AccessDenied
csrss.exe is owned by the SYSTEM user, I'm running the script as Administrator.
Fixed, needed to set SE_DEBUG privilege first. I decided to just set this once in the
init of the module since it's needed all over the place for anything that reads data
for a process owned by another user.
From [email protected] on March 21, 2009 20:10:35
Original issue: http://code.google.com/p/psutil/issues/detail?id=42
The text was updated successfully, but these errors were encountered: