From: Steve Muir Date: Tue, 14 Mar 2006 15:08:00 +0000 (+0000) Subject: use BWAVGRATE parameter rather than BWMAXRATE X-Git-Tag: planetlab-3_3-branch-point~21 X-Git-Url: http://git.onelab.eu/?p=mom.git;a=commitdiff_plain;h=708e302a5e0db162ab47116070105bfcedd2a60b use BWAVGRATE parameter rather than BWMAXRATE --- diff --git a/pl_mom.pl b/pl_mom.pl index c6ac506..576975e 100755 --- a/pl_mom.pl +++ b/pl_mom.pl @@ -3,6 +3,7 @@ use POSIX qw(setsid); use Sys::Syslog; use Sys::Hostname; +use RPC::XML; #use LWP::Simple; $debug = 0; @@ -285,16 +286,16 @@ sub get_slice_limits { if (defined %Maxrate) { undef %Maxrate; } if (defined %Cutoff) { undef %Cutoff; } if (-e $vservers) { - my $result = `grep -H "^BWMAXRATE" $vservers/*.conf`; + my $result = `grep -H "^BWAVGRATE" $vservers/*.conf`; chomp ($result); my @Lines = split(/\n/,$result); foreach $line ( @Lines ) { - if ($line =~ /\/([^\/]*).conf:BWMAXRATE=(.*)[Mm]bit/) { + if ($line =~ /\/([^\/]*).conf:BWAVGRATE=(.*)[Mm]bit/) { $slice = $1; $limit = $2."Mbit"; $cutoff = ($2 * 1000000 * 86400)/8; } else { - if ($line =~ /\/([^\/]*).conf:BWMAXRATE=(.*)[Kk]bit/) { + if ($line =~ /\/([^\/]*).conf:BWAVGRATE=(.*)[Kk]bit/) { $slice = $1; $limit = $2."Kbit"; $cutoff = ($2 * 1000 * 86400)/8;