Difference between revisions of "NOC:ctwug qos"

From CTWUG Wiki
Jump to: navigation, search
(Script)
(Script)
Line 4: Line 4:
  
 
== Script ==
 
== Script ==
/queue simple
+
/queue simple
:local qos
+
:local qos
:foreach qos in [find] do={
+
:foreach qos in [find] do={
  :if ( [:pick [get $qos comment] 0 4] = "AUTO" ) do=[remove $qos]
+
  :if ( [:pick [get $qos comment] 0 4] = "AUTO" ) do=[remove $qos]
}
+
}
/interface
+
/interface
:local qos
+
:local qos
:foreach qos in [find] do={
+
:foreach qos in [find] do={
  :local com [get $qos comment]
+
  :local com [get $qos comment]
  :if ( [:pick $com 0 6] = "client" ) do={
+
  :if ( [:pick $com 0 6] = "client" ) do={
    :local name [get $qos name]
+
    :local name [get $qos name]
    :local p1 ([:find $com ";"] + 1)
+
    :local p1 ([:find $com ";"] + 1)
    :local p2 [:find $com ";" $p1]
+
    :local p2 [:find $com ";" $p1]
    :local mb ([:pick $com $p1 $p2]*1000)
+
    :local mb ([:pick $com $p1 $p2]*1000)
    :local com ("AUTO ".$name." BULK")
+
    :local com ("AUTO ".$name." BULK")
    /queue simple add interface=$name name=$com packet-marks=BULK comment=$com max-limit=("0/".$mb) direction=download disabled=yes
+
    /queue simple add interface=$name name=$com packet-marks=BULK comment=$com max-limit=("0/".$mb) direction=download disabled=yes
  }
+
  }
}
+
}
/system script run ctwug_run
+
/system script run ctwug_run
  
 
== WMS ==
 
== WMS ==
 
[[Wug Management System]]
 
[[Wug Management System]]

Revision as of 10:50, 7 November 2012

Purpose

Dependencies

Script

/queue simple
:local qos
:foreach qos in [find] do={
  :if ( [:pick [get $qos comment] 0 4] = "AUTO" ) do=[remove $qos]
}
/interface
:local qos
:foreach qos in [find] do={
  :local com [get $qos comment]
  :if ( [:pick $com 0 6] = "client" ) do={
    :local name [get $qos name]
    :local p1 ([:find $com ";"] + 1)
    :local p2 [:find $com ";" $p1]
    :local mb ([:pick $com $p1 $p2]*1000)
    :local com ("AUTO ".$name." BULK")
    /queue simple add interface=$name name=$com packet-marks=BULK comment=$com max-limit=("0/".$mb) direction=download disabled=yes
  }
}
/system script run ctwug_run

WMS

Wug Management System