Community discussions

MikroTik App
 
User avatar
vixxant
newbie
Topic Author
Posts: 38
Joined: Thu Mar 17, 2011 7:36 pm
Contact:

Interface Traffic sms

Tue Jul 10, 2012 2:47 pm

I am trying to make a script that greps the rx-bits-per-second: and tx-bits-per-second: of a interface and put in in a variable then send a sms something like below

:global tx
:global rx
/interface monitor-traffic ether1 once do={
:set tx $rx-bits-per-second
:set rx $rx-bits-per-second
/tool sms send usb2 phone-number=xxxxxxx message="$tx &rx" channel=1}
 
User avatar
vixxant
newbie
Topic Author
Posts: 38
Joined: Thu Mar 17, 2011 7:36 pm
Contact:

Re: Interface Traffic sms

Wed Jul 11, 2012 8:55 am

ok got it working by

interface monitor-traffic [/interface find name=ether1] once do={
:local tx (tx-bits-per-second / 1024);
:local rx (rx-bits-per-second / 1024);
:put $tx;
:put $rx;
/tool sms send usb2 phone-number=989xxxx message="tx = $tx rx = $rx" channel=1
}

can anyone point me in right direction on how can i add a variable to the sms

Who is online

Users browsing this forum: akakua, Bing [Bot] and 135 guests