Correct the issue #136

This commit is contained in:
Nicolas Hennion 2012-12-13 13:53:35 +01:00
parent 8dc626dae6
commit d3baaaa6c4

View File

@ -490,7 +490,7 @@ class GlancesGrabProcesses:
try: try:
procstat['username'] = proc.username procstat['username'] = proc.username
except psutil.AccessDenied, err: except psutil.AccessDenied, err:
procstat['username'] = "" procstat['username'] = "?"
pass pass
if hasattr(proc, 'get_nice'): if hasattr(proc, 'get_nice'):
@ -698,12 +698,12 @@ class GlancesStats:
phymem = psutil.virtual_memory() phymem = psutil.virtual_memory()
# buffers and cached (Linux, BSD) # buffers and cached (Linux, BSD)
buffers = getattr(phymem, 'buffers', lambda: 0) buffers = getattr(phymem, 'buffers', 0)
cached = getattr(phymem, 'cached', lambda: 0) cached = getattr(phymem, 'cached', 0)
# active and inactive not available on Windows # active and inactive not available on Windows
active = getattr(phymem, 'active', lambda: 0) active = getattr(phymem, 'active', 0)
inactive = getattr(phymem, 'inactive', lambda: 0) inactive = getattr(phymem, 'inactive', 0)
# phymem free and usage # phymem free and usage
total = phymem.total total = phymem.total