From: Mark Huang Date: Mon, 26 Jun 2006 20:20:17 +0000 (+0000) Subject: - nm_net parameters are now in bps X-Git-Tag: myplc-0_4-rc1~1 X-Git-Url: http://git.onelab.eu/?p=mom.git;a=commitdiff_plain;h=15714637b8ddca17507725083c5a923b9f87ee06 - nm_net parameters are now in bps --- diff --git a/bwmon.py b/bwmon.py index 1abdda1..b1b18e6 100755 --- a/bwmon.py +++ b/bwmon.py @@ -14,7 +14,7 @@ # Andy Bavier # 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 @@ -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)]) - if new_maxrate != -1: - new_maxrate *= 1000 - else: + if new_maxrate == -1: 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: @@ -273,11 +269,11 @@ def main(): (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: - 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