Dynamic simple queue "total-bytes"?

I have written a script which interrogates the dynamic queues from Usermanager.

When the users download more than 150MB the script should override the speed of the queues released by user-manager:

{
:local traf 0;
/queue simple;
:foreach i in=[find dynamic=yes] do={
:set traf [get $i total-bytes];
:if ($traf > 150000000) do = {
set $i limit-at=64000/64000 max-limit=64000/64000 burst-threshold=0/0 burst-limit=0/0 burst-time=0/0;
}
}
}

I have noticed that the above script does not work correctly because “total-bytes” only gives me the Target Upload bytes.
Is that because the default queue type of a dynamic queue is the “default-small” queue?

How can I extract the total-bytes not only the Target Upload bytes?

Any help will be appreciated.

what is traffic limit of the rule before you run the script?

There is no traffic limit only speed limit.

sorry, bandwidth limit =)

if it exists, then queue is being created and should count traffic…