From 708e302a5e0db162ab47116070105bfcedd2a60b Mon Sep 17 00:00:00 2001 From: Steve Muir Date: Tue, 14 Mar 2006 15:08:00 +0000 Subject: [PATCH] use BWAVGRATE parameter rather than BWMAXRATE --- pl_mom.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.43.0