From c63273b0be95de0a1789db23699fe48ea9c6c7d4 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 9 Mar 2011 15:40:16 +0000 Subject: [PATCH] 2011-03-09 Ramon Novoa * pandora_agent: Fixed a typo. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4076 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_agents/unix/ChangeLog | 4 ++++ pandora_agents/unix/pandora_agent | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pandora_agents/unix/ChangeLog b/pandora_agents/unix/ChangeLog index f2fab93a6a..b646b39a02 100644 --- a/pandora_agents/unix/ChangeLog +++ b/pandora_agents/unix/ChangeLog @@ -1,3 +1,7 @@ +2011-03-09 Ramon Novoa + + * pandora_agent: Fixed a typo. + 2011-03-09 Ramon Novoa * pandora_agent: Added a module to get the ocupied space % in a diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 4a9f278405..b2b7ede2b1 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -353,8 +353,8 @@ sub read_config (;$) { } elsif ($line =~ /^\s*module_freepercentdisk\s+(.*)$/) { $module->{'func'} = \&module_freepercentdisk; $module->{'params'} = $1; - } elsif ($line =~ /^\s*module_ocupiedpercentdisk\s+(.*)$/) { - $module->{'func'} = \&module_ocupiedpercentdisk; + } elsif ($line =~ /^\s*module_occupiedpercentdisk\s+(.*)$/) { + $module->{'func'} = \&module_occupiedpercentdisk; $module->{'params'} = $1; } elsif ($line =~ /^\s*module_max\s+(.*)\s*$/) { $module->{'max'} = $1; @@ -1051,9 +1051,9 @@ sub module_freepercentdisk ($) { } ################################################################################ -# Get the ocupied space in a partition in %. +# Get the occupied space in a partition in %. ################################################################################ -sub module_ocupiedpercentdisk ($) { +sub module_occupiedpercentdisk ($) { my $module = shift; # Check module parameters @@ -1064,8 +1064,8 @@ sub module_ocupiedpercentdisk ($) { return () unless defined ($Parts{$module->{'params'}}) and defined ($Parts{$module->{'params'}}{'avail'}); - my $ocupiedp = sprintf("%d", ($Parts{$module->{'params'}}{'total'} - $Parts{$module->{'params'}}{'avail'}) * 100 / $Parts{$module->{'params'}}{'total'}); - return ($ocupiedp); + my $occupiedp = sprintf("%d", ($Parts{$module->{'params'}}{'total'} - $Parts{$module->{'params'}}{'avail'}) * 100 / $Parts{$module->{'params'}}{'total'}); + return ($occupiedp); } ################################################################################