:global iface ether5.WAN-ISP
:global trafikawal
:global trafik
# reset tanggal 1
#/system ntp client set primary-ntp=[:resolve id.pool.ntp.org] enabled=yes
#/system clock set time-zone-name="Asia/Jakarta"
:local date [/system clock get date]
:local tanggal [ :pick $date 4 6 ]
#:log warning $tanggal
:if ($tanggal = 1) do={:set trafikawal 0}
:set trafikawal [/interface get [find name=$iface] rx-byte]
:if ($trafikawal > 1073741824) do={
:set trafik ($trafikawal / 1073741824)
:set trafik ($trafik." GB")
} else={
:set trafik ($trafikawal / 1048576)
:set trafik ($trafik." MB")
}
:log warning "trafik $iface = $trafik"
/in ethernet set $iface comment="$trafikawal"
Tuesday, July 21, 2020
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment