monitor bandwidth and report

Hi!

I need script to monitor bandwidth, and report about this.

#Have this:
:local i 0;

/tool bandwidth-test 192.168.250.1 user=admin password=****** direction=transmit protocol=tcp duration=5s do={
:set i $tx-10-second-average;
}

:if ($i<1000000) do={
/tool e-mail send to=my@e-mail.pr subject=$i; }

But this script don`t work. $i=0 because $tx-10-second-average takes in 1s, but I neet to 3-5s.

Thanks!

Works for me.
By the way “tx-10-second-average” should be in quotes otherwise you will get syntax error.

work, but only in 3.x! in 2.x don`t work.

Since we’re on the topic… I have 2 more questions.

Is there a way to pull graphs or totals of a random IP? On occasion we want to look at customer X and see how much bandwidth they have used for the month or the last 5 days or whatever.

Expanding on that, what is the best method for pulling this information for input into an accounting system for all your users?