* Fixed output of -s -v and -d flags.
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Wed, 6 Dec 2006 19:22:45 +0000 (19:22 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Wed, 6 Dec 2006 19:22:45 +0000 (19:22 +0000)
Still testing.

bwmon.py

index ed9cd7b..4e601ef 100755 (executable)
--- 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: