X-Git-Url: http://git.onelab.eu/?p=mom.git;a=blobdiff_plain;f=bwmon.py;h=4e601efc6bb9d0fd8812ed29f24763b771fc3364;hp=ed9cd7b79b73af4e63bce6441a30d24302c53f47;hb=0cd50336ca253f653c330291b3779050a362e7a6;hpb=e6575041387c49c337c981483c3b4a999bd78f7a 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: