From: Faiyaz Ahmed Date: Wed, 6 Dec 2006 19:22:45 +0000 (+0000) Subject: * Fixed output of -s -v and -d flags. X-Git-Tag: planetlab-4_0-rc1~13 X-Git-Url: http://git.onelab.eu/?p=mom.git;a=commitdiff_plain;h=0cd50336ca253f653c330291b3779050a362e7a6 * Fixed output of -s -v and -d flags. Still testing. --- diff --git a/bwmon.py b/bwmon.py index ed9cd7b..4e601ef 100755 --- a/bwmon.py +++ b/bwmon.py @@ -200,7 +200,14 @@ class Slice: # Query Node Manager for max rate overrides self.updateSliceAttributes() - + + if verbose: + print("\n%s slice attributes "\ + "maxrate %s, maxexemptrate %s" % \ + (self.name, + bwlimit.format_tc_rate(maxrate), + bwlimit.format_tc_rate(maxexemptrate))) + # Prepare message parameters from the template message = "" params = {'slice': self.name, 'hostname': socket.gethostname(), @@ -349,18 +356,6 @@ def main(): minexemptrate, maxexemptrate, bytes, exemptbytes) = params live.append(xid) - - if verbose: - print("\nRunning stats for %s from tc."\ - "\nminrate %s, maxrate %s, minexemptrate %s,"\ - " maxexemptrate %s, bytes %s, exemptbytes %s" % \ - (bwlimit.get_slice(xid), - bwlimit.format_tc_rate(minrate), - bwlimit.format_tc_rate(maxrate), - bwlimit.format_tc_rate(minexemptrate), - bwlimit.format_tc_rate(maxexemptrate), - bytes, - exemptbytes)) # Ignore root and default buckets if xid == root_xid or xid == default_xid: