How seperate download & upload bytes amount?!

Hi all,
I recently upgraded from v5 to v6. I used to check total-bytes for the usage of each ip on scripting. But, now, “Total Statistics” has stopped working & I don’t know why! However, the “Statistics” section works correctly on the simple queues.
Then, I have to make the get the amount of download using “bytes”. It gives me the output in “10832/26435” format that can not be compared to a number.

:put [/queue simple get [/queue simple find target=(“192.168.10.10/32”)] bytes ]

How can I seperate the download part of the number?!


Thanks

I would do something like this. If you want to test in the terminal, just enclose the entire script in brackets { }
:local bytes [/queue simple get [/queue simple find target=“192.168.10.10/32”] bytes]

:for i from=( [:len $bytes] - 1) to=0 do={
:if ( [:pick $bytes $i] = “/”) do={
:local upload [:pick $bytes 0 $i];
:local download [:pick $bytes ($i + 1) [:len $bytes]];
:put “u: $upload, d: $download”;
}
}

Thanks. I’m trying to use the code for my purpose & it almost works for me.