From 0cd50336ca253f653c330291b3779050a362e7a6 Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Wed, 6 Dec 2006 19:22:45 +0000 Subject: [PATCH] * Fixed output of -s -v and -d flags. Still testing. --- bwmon.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) 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: -- 2.43.0