From 7d4b4bb288b96fa2082df76df09cdf32660341a6 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Wed, 10 Jul 2019 10:41:59 +0200 Subject: [PATCH] Fix memory tomcat --- apps/tomcat/web/mode/memory.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/tomcat/web/mode/memory.pm b/apps/tomcat/web/mode/memory.pm index 5bfcf0614..435373be2 100644 --- a/apps/tomcat/web/mode/memory.pm +++ b/apps/tomcat/web/mode/memory.pm @@ -172,12 +172,13 @@ sub manage_selection { $self->{output}->option_exit(); } + my $total = $result->{memTotal}; $self->{global} = { - total => $result->{memTotal}, + total => $total, free => $result->{memFree}, - used => $result->{memTotal} - $result->{memFree}, - prct_free => $result->{memFree} * 100 / $result->{memMax}, - prct_used => ($result->{memTotal} - $result->{memFree}) * 100 / $result->{memMax}, + used => $total - $result->{memFree}, + prct_free => $result->{memFree} * 100 / $total, + prct_used => ($result->{memTotal} - $result->{memFree}) * 100 / $total, }; };