SMS and check interface usage
Posted: Wed Jul 11, 2012 9:45 am
need some help in this , i am trying to monitor interface usage by sending a sms like below
this part is working fine but i want to pass a variable to the script to define interface like
the sms format which i am sending is
pls point me in the right direction
Code: Select all
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
}
Code: Select all
interface monitor-traffic [/interface find name=$var] 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
}
Code: Select all
:cmd password script scriptname var=ether1