mirror of
https://github.com/nicolargo/glances.git
synced 2026-03-14 12:00:14 -04:00
Better Solaris 'io_counters' fix
This commit is contained in:
@@ -283,12 +283,14 @@ class GlancesProcesses(object):
|
||||
# Get the process IO counters
|
||||
proc_io = proc.io_counters()
|
||||
io_new = [proc_io.read_bytes, proc_io.write_bytes]
|
||||
except (psutil.AccessDenied, psutil.NoSuchProcess, NotImplementedError, AttributeError):
|
||||
except (psutil.AccessDenied, psutil.NoSuchProcess, NotImplementedError):
|
||||
# Access denied to process IO (no root account)
|
||||
# NoSuchProcess (process die between first and second grab)
|
||||
# Put 0 in all values (for sort) and io_tag = 0 (for display)
|
||||
procstat['io_counters'] = [0, 0] + [0, 0]
|
||||
io_tag = 0
|
||||
except AttributeError:
|
||||
return procstat
|
||||
else:
|
||||
# For IO rate computation
|
||||
# Append saved IO r/w bytes
|
||||
|
||||
Reference in New Issue
Block a user