:local emailaddr "tvuj@email.cz";
:local name [/system identity get name];
:local date ([/system clock get date]);
:local time ([/system clock get time]);
:local telo
:log info "Starting Data_Sum Script..."
:set telo ("Suma prenesenych dat za klienty Download / Upload [MB]" . "\n")
/queue simple
:foreach i in=[find] do={
:local totalcurrent ([get $i bytes])
:local pos5 [:find $totalcurrent "/"]
:local pos6 [:len $totalcurrent]
:local bytesupcurrent ([:pick $totalcurrent 0 ($pos5)])
:local bytesdowncurrent ([:pick $totalcurrent ($pos5+1) $pos6])
:local megsupcurrent ($bytesupcurrent / 1048576)
:local megsdowncurrent ($bytesdowncurrent / 1048576)
:set telo ($telo . [get $i name] . " - " . [get $i target] )
:set telo ($telo . ": " . $megsdowncurrent . " / " . $megsupcurrent . "\n" )
}
/tool e-mail send to="tvuj@email.cz" subject=($name . " - Data_Sum_Compact") body=$telo
/queue simple reset-counters-all
Mirek