Prihlásiť sa Odoslať Novinky :: FAQ :: Rozšírené vyhľadávanie :: Napísali o nás :: Ankety
Main Menu
· Home
· 
· FAQ
· 
· Diskusia
· 











Main Menu
· Domov

Moduly
· AvantGo
· Downloads
· FAQ
· News
· Recommend Us
· Reviews
· Search
· Sections
· Stats
· Topics
· Top List
· Web Links
· Forum

Jazyk
Výber jazykovej mutácie:



The time now is 18.07.2019 - 19:34


Nefunkcny FUP skript

Post new topic Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
 
Author Message
oto
Post subject: Nefunkcny FUP skript  PostPosted: 22.07.2011 - 22:34 #92457
Basic


Joined: Okt 24, 2005
Posts: 149

Zdravim,
tento skript funguje na x86 MikroTiku v.3.9, ale na v. 5.4 uz nepracuje.Co treba upravit pre funkcnost? Dakujem za odpovede.
Code: › :local k 0
:local traf 0
:local cas [:pick [/system clock get time] 0 2]

#Casove rozmedzie kedy sa ma skript aplikovat
:if (($cas > 8) && ($cas <23)) do {

#Prechadyanie jednotlivýzch  queus
  /queue simple
  :foreach k in=[/queue simple find disabled=no ] do {
    :local meno [:pick [/queue simple get $k name] 0 4]
    :local rych [get $k max-limit]
    :local traf [get $k total-bytes]
    :if ( $meno!="garant" ) do {
#Definovanie 2G programov a FUP pre nich 1500 MB
      :if ($traf > 1590000000) do  {
   :if ([:find [/queue simple get $k name] "0400"] >= 0) do {
         /queue simple set $k max-limit=200000/1100000
   }
   :if ([:find [/queue simple get $k name] "0800"] >= 0) do {
         /queue simple set $k max-limit=128000/350000
   }
   :if ([:find [/queue simple get $k name] "1024"] >= 0) do {
         /queue simple set $k max-limit=180000/550000
   }
   :if ([:find [/queue simple get $k name] "1280"] >= 0) do {
         /queue simple set $k max-limit=200000/800000
   }

   
  }

    }
  }
  }
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
JOFO
Post subject: RE: Nefunkcny FUP skript  PostPosted: 23.07.2011 - 10:55 #92476
Majster


Joined: Jan 08, 2006
Posts: 2545

na prvy pohlad mi vbil do oci len jeden rozdiel...
a sice chybajuce rovnitko za do... neviem ako v 3.X ale v 4.X a 5.X je tusim syntax takyto
Code: › :if (vyraz) do={ }

k tomu FUPu by som dodal len tolko, ze to treba cim skor zo siete vystrnadit. Nerobi to dobrotu ani v sieti ani u zakaznikov. Zrusenim FUPu som usetril nemale mnozstvo systemovych prostriedkov...
neviem aku mas linku, ale myslim ze ked mozem bez FUPu fungovat ja, ktory mam len malicku siet v porovnani s niektorymi kolegami tuna, tak by to nemal byt problem pre hocikoho. Jedine ze zdielas len nejaku 4M linku kde potrebujes usetrit co najviac kapacity...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
oto
Post subject: RE: Nefunkcny FUP skript  PostPosted: 23.07.2011 - 11:56 #92481
Basic


Joined: Okt 24, 2005
Posts: 149

Dik za radu ,ale zatial bez uspechu.Tu je to po uprave
Code: ›
:local k 0
:local traf 0
:local cas [:pick [/system clock get time] 0 2]

#Casove rozmedzie kedy sa ma skript aplikovat
:if (($cas > 8) && ($cas <23)) do={

#Prechadyanie jednotlivýzch  queus
  /queue simple
  :foreach k in=[/queue simple find disabled=no ] do={
    :local meno [:pick [/queue simple get $k name] 0 4]
    :local rych [get $k max-limit]
    :local traf [get $k total-bytes]
    :if ( $meno!="garant" ) do={
#Definovanie 2G programov a FUP pre nich 1500 MB
      :if ($traf > 1590000000) do={
   :if ([:find [/queue simple get $k name] "0400"] >= 0) do={
         /queue simple set $k max-limit=200000/1100000
   }
   :if ([:find [/queue simple get $k name] "0800"] >= 0) do={
         /queue simple set $k max-limit=128000/350000
   }
   :if ([:find [/queue simple get $k name] "1024"] >= 0) do={
         /queue simple set $k max-limit=180000/550000
   }
   :if ([:find [/queue simple get $k name] "1280"] >= 0) do={
         /queue simple set $k max-limit=200000/800000
   }

   
  }

    }
  }
  }


Linka je garant 40/40 a stahovacov nechcem.
Skript sa aplikuje ,lebo na cca 2 sek. sa zvysi vytazenie MK na 20%.Ale nevykona zmenu.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Thomas
Post subject: RE: Nefunkcny FUP skript  PostPosted: 23.07.2011 - 13:01 #92483
Majster


Joined: Okt 31, 2006
Posts: 2062
Location: TT
jé môj starý sskript , okopčený aj stými preklepmy v komentoch Smile

skopíroval som túto verziu čo si sem pastol ako prvú , vytvoril sq spustil a funguje ....

ros 5.2
 
 View user's profile Send private message Visit poster's website ICQ Number 
Reply with quote Back to top
oto
Post subject: RE: Nefunkcny FUP skript  PostPosted: 23.07.2011 - 14:42 #92488
Basic


Joined: Okt 24, 2005
Posts: 149

Ano Thomas je to ten skript co si mi robil v aute v Trnave pred Maxom,pred par rokmi.Ale neviem preco pri MK 5.4 mi nefunguje.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
JOFO
Post subject: RE: Nefunkcny FUP skript  PostPosted: 23.07.2011 - 14:53 #92489
Majster


Joined: Jan 08, 2006
Posts: 2545

skripty v ROS su nehorazne narocne na systemove prostriedky a hlavne procak... ak mas tych queue viac, tak to pojde istu dobu na 100%
napr ja som mal pri 150 queues cca 2 minuty procak na 100% a to bolo 1,4GHz AMDcko nie nejake blato od Mikrotiku.
Dobre ti radim, zrus FUP a pojde to ovela lepsie... manaj ti zatazi linku stahovanie filmu rychlostou 8Mbit/s ako stahovanie filmu na 0,5Mbit/s
ja na 50M neaplikujem ziadne FUP a vysmiatejsich zakaznikov som este nemal Smile
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
oto
Post subject: RE: Nefunkcny FUP skript  PostPosted: 23.07.2011 - 15:41 #92493
Basic


Joined: Okt 24, 2005
Posts: 149

Kym sa k tomu odhodlam chcem aby toto este bezalo.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Thomas
Post subject: RE: Nefunkcny FUP skript  PostPosted: 24.07.2011 - 11:17 #92520
Majster


Joined: Okt 31, 2006
Posts: 2062
Location: TT
Hovorím skúšal som na 5.2 tam to ide , skúsim ešte na niečom s 5.4 nasymulovať čo to robí .
 
 View user's profile Send private message Visit poster's website ICQ Number 
Reply with quote Back to top
oto
Post subject: RE: Nefunkcny FUP skript  PostPosted: 24.07.2011 - 15:28 #92525
Basic


Joined: Okt 24, 2005
Posts: 149

Este jedna vec ma zaujima.Ked je v SQ nastavena rychlost na unlimited ,nezobrazuje prenosovu rychlost klienta a tym padom ani prenesene data.Rychlost ukazuje a data pocita iba ked je namiesto unlimited nastavena nejaka hodnota.Treba nieco zapnut aby pri nastavenej hodnote unlimited ukazovalo kientovu rychlost?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
JOFO
Post subject: RE: Nefunkcny FUP skript  PostPosted: 24.07.2011 - 16:51 #92527
Majster


Joined: Jan 08, 2006
Posts: 2545

to sa navzajom vylucuje podla mna... tyto by vznikol pojem neobmedzeny shaping co je blbost... aspon takto som si vsimol ze to fungovalo v ROS... ked nastavis nejaky max limit, tak shapuje, ak nastavis unlimited, tak kedze nema co shapovat, tak neshapuje... tusim ak nastavis nejaky garantovany rate, tak by to malo zacat shapovat.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
oto
Post subject: RE: Nefunkcny FUP skript  PostPosted: 24.07.2011 - 19:27 #92528
Basic


Joined: Okt 24, 2005
Posts: 149

Zatial shapujem u kienta.Toto co som pisal sluzi iba na FUP aby router pocital data a pri istom limite nastavil speed.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Thomas
Post subject: RE: Nefunkcny FUP skript  PostPosted: 25.07.2011 - 11:51 #92540
Majster


Joined: Okt 31, 2006
Posts: 2062
Location: TT
Code: › :local k 0
:local traf 0
:local cas1 [:pick [/system clock get time] 0 1]
:local cas2  [:pick [/system clock get time] 1 2]
:local cas  ((10 * $cas1) + $cas2)
#Casove rozmedzie kedy sa ma skript aplikovat

:if (($cas > 8) && ($cas <23)) do {


#Prechadyanie jednotlivýzch  queus
  /queue simple
  :foreach k in=[/queue simple find disabled=no ] do {
    :local meno [:pick [/queue simple get $k name] 0 4]
    :local rych [get $k max-limit]
    :local traf [get $k total-bytes]
    :if ( $meno!="garant" ) do {
#Definovanie 2G programov a FUP pre nich 1500 MB
      :if ($traf < 1590000000) do  {
   :if ([:find [/queue simple get $k name] "0400"] >= 0) do {
         /queue simple set $k max-limit=200000/1100000
   }
   :if ([:find [/queue simple get $k name] "0800"] >= 0) do {
         /queue simple set $k max-limit=128000/350000
   }
   :if ([:find [/queue simple get $k name] "1024"] >= 0) do {
         /queue simple set $k max-limit=180000/550000
   }
   :if ([:find [/queue simple get $k name] "1280"] >= 0) do {
         /queue simple set $k max-limit=200000/800000
   }

   
  }

    }
  }
  }



nejak nechcela tá premenná s časom prechádzať cez podmienku tak som sa pohral s časom
Code: › :local cas1 [:pick [/system clock get time] 0 1]
:local cas2  [:pick [/system clock get time] 1 2]
:local cas  ((10 * $cas1) + $cas2)

prečo tomu tak je čo tam zas pomenili sa mi zisťovať nechce anavyše tá možnosť resp. nemožnosť debugovania mk scriptov...
takto to funguje aj pod 5.4 .
 
 View user's profile Send private message Visit poster's website ICQ Number 
Reply with quote Back to top
oto
Post subject: RE: Nefunkcny FUP skript  PostPosted: 25.07.2011 - 16:36 #92551
Basic


Joined: Okt 24, 2005
Posts: 149

Dakujem Ti za ochotu,vecer otestujem.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
airbilly
Post subject: RE: Nefunkcny FUP skript  PostPosted: 25.07.2011 - 19:05 #92559
Guru


Joined: Mar 13, 2005
Posts: 1865
Location: Nitra
oto wrote: ›Dakujem Ti za ochotu,vecer otestujem.

Eee, nie dakujem - ale vypytaj si cislo uctu.
 
 View user's profile Send private message Send e-mail Visit poster's website MSN Messenger ICQ Number 
Reply with quote Back to top
oto
Post subject: RE: Nefunkcny FUP skript  PostPosted: 25.07.2011 - 19:49 #92560
Basic


Joined: Okt 24, 2005
Posts: 149

Nepotrebujem lekciu slusneho spravania.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
All times are GMT
Post new topic Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
 
Jump to:  

Powered by PNphpBB2 © 2003-2005 The PNphpBB Group
Credits

(C) SKFree 2002-2010: Powered by POSTNUKE. Môžete prebera? naše správy vo formáte XML(RSS)