mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-27 19:04:50 +03:00
Update GraphFlame
This commit is contained in:
parent
ca246a1ae5
commit
487a758edf
1578
docs/_static/glances-flame.svg
vendored
1578
docs/_static/glances-flame.svg
vendored
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 106 KiB |
@ -143,7 +143,7 @@ class Config(object):
|
||||
def read(self):
|
||||
"""Read the config file, if it exists. Using defaults otherwise."""
|
||||
for config_file in self.config_file_paths():
|
||||
logger.info('Search glances.conf file in {}'.format(config_file))
|
||||
logger.debug('Search glances.conf file in {}'.format(config_file))
|
||||
if os.path.exists(config_file):
|
||||
try:
|
||||
with open(config_file, encoding='utf-8') as f:
|
||||
|
@ -391,17 +391,22 @@ class GlancesProcesses(object):
|
||||
|
||||
# Manage cached information
|
||||
if is_cached:
|
||||
# Add cached values
|
||||
# Grab cached values (in case of a new incoming process)
|
||||
if proc['pid'] not in self.processlist_cache:
|
||||
self.processlist_cache[proc['pid']]= psutil.Process(pid=proc['pid']).as_dict(attrs=cached_attrs,
|
||||
ad_value=None)
|
||||
for cached in cached_attrs:
|
||||
proc[cached] = self.processlist_cache[proc['pid']][cached]
|
||||
try:
|
||||
self.processlist_cache[proc['pid']]= psutil.Process(pid=proc['pid']).as_dict(attrs=cached_attrs,
|
||||
ad_value=None)
|
||||
except psutil.NoSuchProcess:
|
||||
pass
|
||||
# Add cached value to current stat
|
||||
try:
|
||||
proc.update(self.processlist_cache[proc['pid']])
|
||||
except KeyError:
|
||||
pass
|
||||
else:
|
||||
# Save values to cache
|
||||
self.processlist_cache[proc['pid']] = { cached: proc[cached] for cached in cached_attrs }
|
||||
|
||||
|
||||
# Compute the maximum value for keys in self._max_values_list: CPU, MEM
|
||||
# Usefull to highlight the processes with maximum values
|
||||
for k in self._max_values_list:
|
||||
|
Loading…
Reference in New Issue
Block a user