Community discussions

MikroTik App
 
marko_bg
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 03, 2006 11:48 am

send mail with UPLOAD and DOWNLOAD traffic

Sun Jan 21, 2007 7:54 pm

: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 ?

Who is online

Users browsing this forum: No registered users and 19 guests