:local intf WAN
/interface
:local rx [get $intf rx-byte]
:if (rx > 1000000) do = {system/routerboard/usb/power-reset duration=5}
I think this is the script???
/interface
get $intf rx-byte not working also [get WAN rx-byte] not working. Only (print stats-detail) working but it showing all ports and all data.
rb3011 OS 7.9.2
:local intf "WAN";
:local rx [/interface get $intf rx-byte]
:if ($rx >= 1000000) do={
/system/routerboard/usb power-reset duration=5;
}
You must use the { } or the local variable on terminal is lost.
also do not use any spaces on “do = {”
and… 10 GB are 10.000.000.000 not 1.000.000
Reboot afer 10GB (GigaByte):
:if ([/interface get "WAN" rx-byte] > 10000000000) do={/system routerboard usb power-reset duration=5s}
Reboot afer ~10GiB (GibiByte):
:if ([/interface get "WAN" rx-byte] > 10995116278) do={/system routerboard usb power-reset duration=5s}
Lads thank you very much it’s working perfectly

Final code:
:local intf “WAN”;
:local rx [/interface get $intf rx-byte]
:if ([/interface get “WAN” rx-byte] > 10995116278) do={/system routerboard usb power-reset duration=10s}