Compare commits

...

5 Commits

Author SHA1 Message Date
Nicolas Hennion
5b172642c9
Merge 3e8df20e42 into 036eb976e9 2024-06-28 03:08:06 +02:00
Nicolas Hennion
036eb976e9
Merge pull request #2854 from CognitiveDisson/patch-1
Remove duplicate line from the README file
2024-06-27 06:37:58 +02:00
Vadim Smal
2c5a1150bd
Remove duplicate line from the README file 2024-06-26 23:35:37 +01:00
nicolargo
f6066e5d46 PsUtil 6+ no longer check PID reused #2755 2024-06-26 18:56:31 +02:00
snyk-bot
3e8df20e42
fix: dev-requirements.txt to reduce vulnerabilities
The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-SETUPTOOLS-3180412
2024-06-17 11:37:22 +00:00
2 changed files with 6 additions and 4 deletions

View File

@ -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:

View File

@ -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)