Community discussions

 
whiskeyman7
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 86
Joined: Tue Jul 30, 2013 8:30 pm
Location: Costa Rica

scripting to pull the tx-current from interface

Tue Jul 29, 2014 3:44 am

Hello,
Does anyone know the scripting syntax to pull "if possible" the tx-current from a particular interface directly. I have done a bit of google fu but failed. I am trying to avoid using the bandwidth tool.

Thanks in advance.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 5942
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: scripting to pull the tx-current from interface

Tue Jul 29, 2014 1:21 pm

What do you mean bay tx-current? As far as I know such parameter does not exist in RouterOS.
 
marizo
newbie
Posts: 33
Joined: Sun May 04, 2014 8:41 pm

Re: scripting to pull the tx-current from interface

Tue Jul 29, 2014 2:33 pm

you mean current tx-bits-per-second or tx-bits-per-second?
it's under /interface monitor-traffic
wiki about that

i'm not very familiar with MT sintax, i tried to rewrite one of scripts, but fail.
so i can give only a sample of another variable- wlan frequency, but i think it should be something similar:
in terminal - all info about wlan
/interface wireless monitor wlan once do=
and script who creates variable freq
/interface wireless monitor wlan once do={:global freq [:pick $channel 0 4]}
/interface monitor-traffic wlan once do=
and extract variable tx-bits-per-second

upd:
Found example in this forum too
although there is /interface monitor, but needs /interface monitor traffic it's working.
/interface monitor-traffic wlan once do={
:global txbps $("tx-bits-per-second");
:global rxbps $("rx-bits-per-second");
}
 
whiskeyman7
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 86
Joined: Tue Jul 30, 2013 8:30 pm
Location: Costa Rica

Re: scripting to pull the tx-current from interface

Thu Jul 31, 2014 5:11 am

Thank you very much!
/interface monitor-traffic 1_WAN_1 once do={
     :global rxbps $("rx-bits-per-second");
}
This is exactly what I was looking for

Who is online

Users browsing this forum: No registered users and 9 guests