mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Merge branch 'issue1283' into develop
This commit is contained in:
commit
237d22b160
1
NEWS
1
NEWS
@ -61,6 +61,7 @@ Bugs corrected:
|
|||||||
* Crashes when influxdb option set #1260
|
* Crashes when influxdb option set #1260
|
||||||
* AMP for kernel process is not working #1261
|
* AMP for kernel process is not working #1261
|
||||||
* Arch linux package (2.11.1-2) psutil (v5.4.1): RuntimeWarning: ignoring OSError #1203
|
* Arch linux package (2.11.1-2) psutil (v5.4.1): RuntimeWarning: ignoring OSError #1203
|
||||||
|
* Glances crash with extended process stats #1283
|
||||||
|
|
||||||
Backward-incompatible changes:
|
Backward-incompatible changes:
|
||||||
|
|
||||||
|
@ -300,7 +300,8 @@ class GlancesProcesses(object):
|
|||||||
try:
|
try:
|
||||||
extended['tcp'] = len(top_process.connections(kind="tcp"))
|
extended['tcp'] = len(top_process.connections(kind="tcp"))
|
||||||
extended['udp'] = len(top_process.connections(kind="udp"))
|
extended['udp'] = len(top_process.connections(kind="udp"))
|
||||||
except psutil.AccessDenied:
|
except (psutil.AccessDenied, psutil.NoSuchProcess):
|
||||||
|
# Manage issue1283 (psutil.AccessDenied)
|
||||||
extended['tcp'] = None
|
extended['tcp'] = None
|
||||||
extended['udp'] = None
|
extended['udp'] = None
|
||||||
except (psutil.NoSuchProcess, ValueError, AttributeError) as e:
|
except (psutil.NoSuchProcess, ValueError, AttributeError) as e:
|
||||||
@ -396,7 +397,7 @@ def sort_stats(stats, sortedby=None, reverse=True):
|
|||||||
process[sortedby][3],
|
process[sortedby][3],
|
||||||
reverse=reverse)
|
reverse=reverse)
|
||||||
except Exception:
|
except Exception:
|
||||||
stats.sort(key=lambda x:(weighted(x['cpu_percent']),
|
stats.sort(key=lambda x: (weighted(x['cpu_percent']),
|
||||||
weighted(x['memory_percent'])),
|
weighted(x['memory_percent'])),
|
||||||
reverse=reverse)
|
reverse=reverse)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user