From b51c239f3ed56749f89fc8ca201cf056adf1ec17 Mon Sep 17 00:00:00 2001 From: fermin831 Date: Thu, 7 Dec 2017 14:11:38 +0100 Subject: [PATCH] Fixed disk_free on Windows automonitorization --- pandora_server/lib/PandoraFMS/Tools.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 4e77d3f25b..7487081c24 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -887,14 +887,14 @@ sub disk_free ($) { # Check relative path my $unit; if ($target =~ m/^([a-zA-Z]):/gi) { - $unit = $1/(1024*1024); + $unit = $1; } else { return; } # Get the free space of unit found my $all_disk_info = `wmic logicaldisk get caption, freespace`; if ($all_disk_info =~ m/$unit:\D*(\d+)/gmi){ - return $1; + return $1/(1024*1024); } return; }