Correct test before using cache

pull/1860/head
nicolargo 2021-05-13 14:12:47 +02:00
parent 3411065d94
commit e4ee9f88dc
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ class Plugin(GlancesPlugin):
# MEM
container_stats['memory'] = self.get_docker_memory(container.id, self.thread_list[container.id].stats)
container_stats['memory_usage'] = container_stats['memory'].get('usage', None)
if container_stats['memory'].get('usage', None) is not None:
if container_stats['memory'].get('cache', None) is not None:
container_stats['memory_usage'] -= container_stats['memory']['cache']
# IO
container_stats['io'] = self.get_docker_io(container.id, self.thread_list[container.id].stats)