Some investigation shows that the output of your command do have spaces.
"1234" bytes shows as "1 234"
viewtopic.php?t=122489
I have cleaned up the script in that thread some. Cut and past this to command line. (to create a function)
:global removeSpace do={
:local temp
:for i from=0 to=([:len $t] - 1) do={
:local char [:pick $t $i]
:if ($char = " ") do={
:set $char ""
}
:set temp ($temp . $char)
}
:return $temp
}
Then change your script to some like this:
:local txbyte
:set txbyte [$removeSpace t=[:tostr [/interface ethernet get ether1 value-name=driver-rx-byte ]]]
:if ($txbyte > 50000) do={
/interface ethernet reset-counters ether1
}