diff --git a/glances/plugins/glances_processlist.py b/glances/plugins/glances_processlist.py index 0a5eae45..113971bb 100644 --- a/glances/plugins/glances_processlist.py +++ b/glances/plugins/glances_processlist.py @@ -322,10 +322,10 @@ class Plugin(GlancesPlugin): msg = xpad + 'CPU affinity: ' + str(len(p['cpu_affinity'])) + ' cores' ret.append(self.curse_add_line(msg, splittable=True)) # Second line is memory info - if 'memory_info_ex' in p and p['memory_info_ex'] is not None: + if 'memory_info' in p and p['memory_info'] is not None: ret.append(self.curse_new_line()) msg = xpad + 'Memory info: ' - for k, v in iteritems(p['memory_info_ex']._asdict()): + for k, v in iteritems(p['memory_info']._asdict()): # Ignore rss and vms (already displayed) if k not in ['rss', 'vms'] and v is not None: msg += k + ' ' + self.auto_unit(v, low_precision=False) + ' ' diff --git a/glances/processes.py b/glances/processes.py index 7e27a002..5ae81ebc 100644 --- a/glances/processes.py +++ b/glances/processes.py @@ -290,11 +290,17 @@ class GlancesProcesses(object): procstat['cpu_affinity'] = None # Memory extended try: - procstat.update(proc.as_dict(attrs=['memory_info_ex'])) + procstat.update(proc.as_dict(attrs=['memory_full_info'])) except psutil.NoSuchProcess: pass except AttributeError: - procstat['memory_info_ex'] = None + # Fallback to standard memory_info stats + try: + procstat.update(proc.as_dict(attrs=['memory_info'])) + except psutil.NoSuchProcess: + pass + except AttributeError: + procstat['memory_info'] = None # Number of context switch try: procstat.update(proc.as_dict(attrs=['num_ctx_switches']))