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:
cc74f43
)
- nm_net parameters are now in bps
author
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 26 Jun 2006 20:20:17 +0000
(20:20 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 26 Jun 2006 20:20:17 +0000
(20:20 +0000)
bwmon.py
patch
|
blob
|
history
diff --git
a/bwmon.py
b/bwmon.py
index
1abdda1
..
b1b18e6
100755
(executable)
--- a/
bwmon.py
+++ b/
bwmon.py
@@
-14,7
+14,7
@@
# Andy Bavier <acb@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
# Andy Bavier <acb@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
-# $Id: bwmon.py,v 1.
3 2006/05/08 17:37:28
mlhuang Exp $
+# $Id: bwmon.py,v 1.
4 2006/06/02 04:00:00
mlhuang Exp $
#
import syslog
#
import syslog
@@
-112,13
+112,9
@@
class Slice:
# Query Node Manager for max rate overrides
(new_maxrate, new_maxexemptrate) = nm.query(self.name, [('nm_net_max_rate', -1), ('nm_net_max_exempt_rate', -1)])
# Query Node Manager for max rate overrides
(new_maxrate, new_maxexemptrate) = nm.query(self.name, [('nm_net_max_rate', -1), ('nm_net_max_exempt_rate', -1)])
- if new_maxrate != -1:
- new_maxrate *= 1000
- else:
+ if new_maxrate == -1:
new_maxrate = default_maxrate
new_maxrate = default_maxrate
- if new_maxexemptrate != -1:
- new_maxexemptrate *= 1000
- else:
+ if new_maxexemptrate == -1:
new_maxexemptrate = default_maxexemptrate
if new_maxrate != maxrate or new_maxexemptrate != maxexemptrate:
new_maxexemptrate = default_maxexemptrate
if new_maxrate != maxrate or new_maxexemptrate != maxexemptrate:
@@
-273,11
+269,11
@@
def main():
(version, slices) = pickle.load(f)
f.close()
# Check version of data file
(version, slices) = pickle.load(f)
f.close()
# Check version of data file
- if version != "$Id: bwmon.py,v 1.
3 2006/05/08 17:37:28
mlhuang Exp $":
+ if version != "$Id: bwmon.py,v 1.
4 2006/06/02 04:00:00
mlhuang Exp $":
print "Not using old version '%s' data file %s" % (version, datafile)
raise Exception
except Exception:
print "Not using old version '%s' data file %s" % (version, datafile)
raise Exception
except Exception:
- version = "$Id: bwmon.py,v 1.
3 2006/05/08 17:37:28
mlhuang Exp $"
+ version = "$Id: bwmon.py,v 1.
4 2006/06/02 04:00:00
mlhuang Exp $"
slices = {}
# Get special slice IDs
slices = {}
# Get special slice IDs