git://git.onelab.eu
/
mom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8168a43
)
Bug fix: default rate cap was always applied
author
Andy Bavier
<acb@cs.princeton.edu>
Tue, 7 Jun 2005 22:24:57 +0000
(22:24 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Tue, 7 Jun 2005 22:24:57 +0000
(22:24 +0000)
pl_mom.pl
patch
|
blob
|
history
pl_mom.spec
patch
|
blob
|
history
diff --git
a/pl_mom.pl
b/pl_mom.pl
index
86a56c8
..
55da825
100755
(executable)
--- a/
pl_mom.pl
+++ b/
pl_mom.pl
@@
-197,8
+197,8
@@
sub bandwidth_monitor {
$Cap{$slice} = "sent";
bw_cap_mail($slice);
if (! $debug) {
$Cap{$slice} = "sent";
bw_cap_mail($slice);
if (! $debug) {
- log_bandwidth_cap($slice, $
bwcap_default
);
- cap_bandwidth($slice, $
bwcap_default
);
+ log_bandwidth_cap($slice, $
Maxrate{$slice}
);
+ cap_bandwidth($slice, $
Maxrate{$slice}
);
}
}
} else {
}
}
} else {
@@
-363,12
+363,12
@@
sub bw_cap_mail {
my ($slicename) = @_;
my $hostname = hostname();
my $date = get_date();
my ($slicename) = @_;
my $hostname = hostname();
my $date = get_date();
- my $sent = int($Cutoff{$slicename}/
1000000000
);
+ my $sent = int($Cutoff{$slicename}/
(1024*1024)
);
my $bwcap = $Maxrate{$slicename};
send_mail("$alias_addr, $slicename\@slices.planet-lab.org",
"$proc capped bandwidth of slice $slicename on $hostname",
my $bwcap = $Maxrate{$slicename};
send_mail("$alias_addr, $slicename\@slices.planet-lab.org",
"$proc capped bandwidth of slice $slicename on $hostname",
- "Slice $slicename has transmitted more than ${sent}
G
B today".
+ "Slice $slicename has transmitted more than ${sent}
M
B today".
" on $hostname. ".
"Its bandwidth will be capped at $bwcap until midnight GMT.".
"\n\n$date $hostname bwcap $slicename\n");
" on $hostname. ".
"Its bandwidth will be capped at $bwcap until midnight GMT.".
"\n\n$date $hostname bwcap $slicename\n");
diff --git
a/pl_mom.spec
b/pl_mom.spec
index
d476755
..
6a90f78
100644
(file)
--- a/
pl_mom.spec
+++ b/
pl_mom.spec
@@
-1,6
+1,6
@@
%define name pl_mom
%define version 0.3
%define name pl_mom
%define version 0.3
-%define release
8
.planetlab%{?date:.%{date}}
+%define release
9
.planetlab%{?date:.%{date}}
Summary: PlanetLab mom -- Cleans up your mess
Name: %{name}
Summary: PlanetLab mom -- Cleans up your mess
Name: %{name}