Page 1 of 1

send mail with UPLOAD and DOWNLOAD traffic

Posted: Sun Jan 21, 2007 7:54 pm
by marko_bg
:local traf;
/queue simple
:set traf [get [find target-addresses=("1.1.1.1" . $i)] total-bytes]
:if ($traf > 1048576) do = { /tool e-mail send to=test@test.test subject="traffic info" body=("
You have,
UPLOAD / DOWNLOAD = " . [get [find target-addresses=("1.1.1.1" . $i)] bytes] . " Bytes.
)
}
..........................................

With this script I receive:

You have,
UPLOAD / DOWNLOAD = ,422561781/587954150,Bytes.

..........................................

Can I receive traffic in MBytes, separate upload from download ?
somethig like this:

UPLOAD = ,402,MBytes.
DOWNLOAD = ,560,MBytes.

also can I removed this comma ?