Bring back 'rss' and 'cache' memory stats in docker plugin

Looks like the stats were removed because they where gone in Docker 1.11. This change put them back since they've been available again for a while now.
This commit is contained in:
Anartz Nuin 2020-07-21 12:06:52 +01:00
parent 9f8a812081
commit d0739342f6

View File

@ -319,9 +319,8 @@ class Plugin(GlancesPlugin):
ret = {}
# Read the stats
try:
# Do not exist anymore with Docker 1.11 (issue #848)
# ret['rss'] = all_stats['memory_stats']['stats']['rss']
# ret['cache'] = all_stats['memory_stats']['stats']['cache']
ret['rss'] = all_stats['memory_stats']['stats']['rss']
ret['cache'] = all_stats['memory_stats']['stats']['cache']
ret['usage'] = all_stats['memory_stats']['usage']
ret['limit'] = all_stats['memory_stats']['limit']
ret['max_usage'] = all_stats['memory_stats']['max_usage']