mirror of
https://github.com/nicolargo/glances.git
synced 2024-08-17 00:10:48 +03:00
Compare commits
5 Commits
ae206e50c4
...
ebf40b5452
Author | SHA1 | Date | |
---|---|---|---|
|
ebf40b5452 | ||
|
036eb976e9 | ||
|
2c5a1150bd | ||
|
f6066e5d46 | ||
|
9219b458fb |
@ -221,8 +221,6 @@ Run last version of Glances container in *console mode*:
|
||||
|
||||
By default, the /etc/glances/glances.conf file is used (based on docker-compose/glances.conf).
|
||||
|
||||
By default, the /etc/glances/glances.conf file is used (based on docker-compose/glances.conf).
|
||||
|
||||
Additionally, if you want to use your own glances.conf file, you can
|
||||
create your own Dockerfile:
|
||||
|
||||
|
@ -12,3 +12,4 @@ requirements-parser
|
||||
ruff
|
||||
semgrep
|
||||
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
|
||||
requests>=2.32.2 # not directly required, pinned by Snyk to avoid a vulnerability
|
||||
|
@ -123,7 +123,9 @@ class GlancesProcesses:
|
||||
"""Reset the internal cache."""
|
||||
self.cache_timer = Timer(0)
|
||||
self.processlist_cache = {}
|
||||
psutil.process_iter.cache_clear()
|
||||
if hasattr(psutil.process_iter, 'cache_clear'):
|
||||
# Cache clear only available in PsUtil 6 or higher
|
||||
psutil.process_iter.cache_clear()
|
||||
|
||||
def reset_processcount(self):
|
||||
"""Reset the global process count"""
|
||||
@ -451,7 +453,9 @@ class GlancesProcesses:
|
||||
)
|
||||
)
|
||||
# Only get the info key
|
||||
processlist = [p.info for p in processlist]
|
||||
# PsUtil 6+ no longer check PID reused #2755 so use is_running in the loop
|
||||
# Note: not sure it is realy needed but CPU consumption look teh same with or without it
|
||||
processlist = [p.info for p in processlist if p.is_running()]
|
||||
# Sort the processes list by the current sort_key
|
||||
processlist = sort_stats(processlist, sorted_by=self.sort_key, reverse=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user