From dda9dd3b8fe00ade32da675a0cb72a6f8ed7e26a Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sun, 18 Nov 2018 21:23:13 +0100 Subject: [PATCH] ERROR -- Can not grab extended stats (invalid attr name 'num_fds') #1351 --- NEWS | 1 + glances/processes.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4824ae59..ecec8b14 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Bugs corrected: * Crash after running fine for several hours #1335 * Timezone listed doesn’t match system timezone, outputs wrong time #1337 * Compare issue with Process.cpu_times() #1339 + * ERROR -- Can not grab extended stats (invalid attr name 'num_fds') #1351 Others: diff --git a/glances/processes.py b/glances/processes.py index 9d6d115c..7fd76bad 100644 --- a/glances/processes.py +++ b/glances/processes.py @@ -279,7 +279,10 @@ class GlancesProcesses(object): try: top_process = psutil.Process(proc['pid']) extended_stats = ['cpu_affinity', 'ionice', - 'num_ctx_switches', 'num_fds'] + 'num_ctx_switches'] + if LINUX: + # num_fds only avalable on Unix system (see issue #1351) + extended_stats += ['num_fds'] if WINDOWS: extended_stats += ['num_handles']