cosmetic - normalize diffs
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 18 Jul 2012 12:39:07 +0000 (14:39 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 18 Jul 2012 12:39:07 +0000 (14:39 +0200)
bwlimit_lxc.py
bwlimit_vs.py

index ae4a020..d58234c 100644 (file)
@@ -1,14 +1,6 @@
 #!/usr/bin/python
 #
 #!/usr/bin/python
 #
-# TEMPORARY
-# this file historically came with util-vserver-pl which is not available
-# on lxc-powered nodes
-# it is thus intended to become packaged separately at some point
-#
-# It was renamed into bwlimitlxc so that this branch can be tested on
-# vserver nodes as well
-# TEMPORARY
-
+# This file is under git as plnode-utils/bwlimit_lxc.py
 # 
 # Bandwidth limit module for PlanetLab nodes. The intent is to use the
 # Hierarchical Token Bucket (HTB) queueing discipline (qdisc) to allow
 # 
 # Bandwidth limit module for PlanetLab nodes. The intent is to use the
 # Hierarchical Token Bucket (HTB) queueing discipline (qdisc) to allow
@@ -332,6 +324,7 @@ def tc(cmd):
 
     return run(TC + " " + cmd)
 
 
     return run(TC + " " + cmd)
 
+
 def ebtables(cmd):
     """
     Shortcut for running a ebtables command
 def ebtables(cmd):
     """
     Shortcut for running a ebtables command
@@ -589,7 +582,7 @@ def on(xid, dev = dev, share = None, minrate = None, maxrate = None, minexemptra
 
     tc("class replace dev %s parent 1:20 classid 1:%x htb rate %dbit ceil %dbit quantum %d" % \
        (dev, exempt_minor | xid, minexemptrate, maxexemptrate, share * quantum))
 
     tc("class replace dev %s parent 1:20 classid 1:%x htb rate %dbit ceil %dbit quantum %d" % \
        (dev, exempt_minor | xid, minexemptrate, maxexemptrate, share * quantum))
-    
+
     # Attach a FIFO to each subclass, which helps to throttle back
     # processes that are sending faster than the token buckets can
     # support.
     # Attach a FIFO to each subclass, which helps to throttle back
     # processes that are sending faster than the token buckets can
     # support.
@@ -605,6 +598,7 @@ def on(xid, dev = dev, share = None, minrate = None, maxrate = None, minexemptra
     tc("filter replace dev %s parent 1: protocol ip prio 1 handle %d fw flowid 1:%x" % \
         (dev, xid, default_minor | xid))
 
     tc("filter replace dev %s parent 1: protocol ip prio 1 handle %d fw flowid 1:%x" % \
         (dev, xid, default_minor | xid))
 
+
 def set(xid, share = None, minrate = None, maxrate = None, minexemptrate = None, maxexemptrate = None, dev = dev ):
     on(xid = xid, dev = dev, share = share,
        minrate = minrate, maxrate = maxrate,
 def set(xid, share = None, minrate = None, maxrate = None, minexemptrate = None, maxexemptrate = None, dev = dev ):
     on(xid = xid, dev = dev, share = share,
        minrate = minrate, maxrate = maxrate,
index ab760b5..9cdfc55 100644 (file)
@@ -1,4 +1,6 @@
 #!/usr/bin/python
 #!/usr/bin/python
+#
+# This file is under git as plnode-utils/bwlimit_vs.py
 # 
 # Bandwidth limit module for PlanetLab nodes. The intent is to use the
 # Hierarchical Token Bucket (HTB) queueing discipline (qdisc) to allow
 # 
 # Bandwidth limit module for PlanetLab nodes. The intent is to use the
 # Hierarchical Token Bucket (HTB) queueing discipline (qdisc) to allow
@@ -46,8 +48,6 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2006 The Trustees of Princeton University
 #
-# $Id: bwlimit.py,v 1.15 2007/02/07 04:21:11 mlhuang Exp $
-#
 
 import sys, os, re, getopt
 import pwd
 
 import sys, os, re, getopt
 import pwd
@@ -579,7 +579,6 @@ def on(xid, dev = dev, share = None, minrate = None, maxrate = None, minexemptra
     tc("qdisc replace dev %s parent 1:%x handle %x pfifo" % \
        (dev, exempt_minor | xid, exempt_minor | xid))
 
     tc("qdisc replace dev %s parent 1:%x handle %x pfifo" % \
        (dev, exempt_minor | xid, exempt_minor | xid))
 
-
 def set(xid, share = None, minrate = None, maxrate = None, minexemptrate = None, maxexemptrate = None, dev = dev ):
     on(xid = xid, dev = dev, share = share,
        minrate = minrate, maxrate = maxrate,
 def set(xid, share = None, minrate = None, maxrate = None, minexemptrate = None, maxexemptrate = None, dev = dev ):
     on(xid = xid, dev = dev, share = share,
        minrate = minrate, maxrate = maxrate,