How to get an Interface's current Rx speed in script?

How to get an Interface’s current Rx speed in script? I’m a begginer.
:confused:
I’ve trid to write a script like this:

:put [/interface get [/interface find name=WAN] rx ]

But it seems doesn’t get me anywhere.
I’m using 3.2, Please help, much appreciated!

Try this:

# Tested on RouterOS 3.30
/interface monitor-traffic [/interface find name=WAN] once do={
	:local tx (tx-bits-per-second / 1024);
	:local rx (rx-bits-per-second / 1024);
	:put $tx;
	:put $rx;
}

I tried and changed it a little bit:

/interface monitor-traffic [/interface find name=ether1] once do={
:put (received-bits-per-second / 1024)
}

Thanks a lot!

Will you also help me with this one?
http://forum.mikrotik.com/t/how-to-get-a-random-mac-address-in-script/56296/1
thanks a lot :smiley: