السلام عليكم ورحمة الله وبركاته
معانا النهاردة طريقة مبسطة جدا لمعرفة كمية الداتا من كل خط بسهولة
- غير اسم كارت الدخول الاول الى WAN1 والكارت الثالث الى WAN3
-ضع الاسكربت ده فى الترمنال
معانا النهاردة طريقة مبسطة جدا لمعرفة كمية الداتا من كل خط بسهولة
- غير اسم كارت الدخول الاول الى WAN1 والكارت الثالث الى WAN3
-ضع الاسكربت ده فى الترمنال
/file print file=Fnan-txL1 /file print file=Fnan-rxL1 /file print file=Fnan-FW1tx /file print file=Fnan-FW1rx /file print file=Fnan-txL3 /file print file=Fnan-rxL3 /file print file=Fnan-FW3tx /file print file=Fnan-FW3rx :delay 5s /file set "Fnan-txL1.txt" contents="0" /file set "Fnan-rxL1.txt" contents="0" /file set "Fnan-FW1tx.txt" contents="0" /file set "Fnan-FW1rx.txt" contents="0" /file set "Fnan-txL3.txt" contents="0" /file set "Fnan-rxL3.txt" contents="0" /file set "Fnan-FW3tx.txt" contents="0" /file set "Fnan-FW3rx.txt" contents="0" :global trfctx1 (0) :global trfcrx1 (0) :global trfctx3 (0) :global trfcrx3 (0) :global lasttx1 (($trfctx1 + [/interface ethernet get WAN1 tx-bytes]) / 1024 / 1024 ) :global lastrx1 (($trfcrx1 + [/interface ethernet get WAN1 rx-bytes]) / 1024 / 1024 ) /interface ethernet set WAN1 comment "Tx=$lasttx1 MiB Rx=$lastrx1 MiB" :global lasttx3 (($trfctx3 + [/interface ethernet get WAN3 tx-bytes]) / 1024 / 1024 ) :global lastrx3 (($trfcrx3 + [/interface ethernet get WAN3 rx-bytes]) / 1024 / 1024 ) /interface ethernet set WAN3 comment "Tx=$lasttx3 MiB Rx=$lastrx3 MiB" /system scheduler add disabled=no interval=8m name=Bandwidth on-event=": if ( [ /system resource\ \_get uptime ] < \"11m\" ) do={\r\ \n:global trfctx1 [/file get \"Fnan-txL1.txt\" contents]\r\ \n}\r\ \n: if ( [ /system resource get uptime ] < \"11m\" ) do={\r\ \n:global trfcrx1 [/file get \"Fnan-rxL1.txt\" contents]\r\ \n}\r\ \n: if ( [ /system resource get uptime ] < \"11m\" ) do={\r\ \n:global trfctx3 [/file get \"Fnan-txL3.txt\" contents]\r\ \n}\r\ \n: if ( [ /system resource get uptime ] < \"11m\" ) do={\r\ \n:global trfcrx3 [/file get \"Fnan-rxL3.txt\" contents]\r\ \n}" policy=\ ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \ start-time=startup add disabled=no interval=11m name=Bandwidth1 on-event=":global currenttx1 [/in\ terface ethernet get WAN1 tx-bytes]\r\ \n:global currentrx1 [/interface ethernet get WAN1 rx-bytes]\r\ \n:global currenttx3 [/interface ethernet get WAN3 tx-bytes]\r\ \n:global currentrx3 [/interface ethernet get WAN3 rx-bytes]\r\ \n/file set \"Fnan-txL1.txt\" contents=(\$trfctx1 + \$currenttx1)\r\ \n/file set \"Fnan-rxL1.txt\" contents=(\$trfcrx1 + \$currentrx1)\r\ \n/file set \"Fnan-txL3.txt\" contents=(\$trfctx3 + \$currenttx3)\r\ \n/file set \"Fnan-rxL3.txt\" contents=(\$trfcrx3 + \$currentrx3)\r\ \n/file set \"Fnan-FW1tx.txt\" contents=((\$trfctx1 + \$currenttx1)/ 1024 \ / 1024)\r\ \n/file set \"Fnan-FW1rx.txt\" contents=((\$trfcrx1 + \$currentrx1)/ 1024 \ / 1024)\r\ \n/file set \"Fnan-FW3tx.txt\" contents=((\$trfctx3 + \$currenttx3)/ 1024 \ / 1024)\r\ \n/file set \"Fnan-FW3rx.txt\" contents=((\$trfcrx3 + \$currentrx3)/ 1024 \ / 1024)\r\ \n:global lasttx1 ((\$trfctx1 + [/interface ethernet get WAN1 tx-bytes]) /\ \_1024 / 1024 )\r\ \n:global lastrx1 ((\$trfcrx1 + [/interface ethernet get WAN1 rx-bytes]) /\ \_1024 / 1024 )\r\ \n/interface ethernet set WAN1 comment \"Tx=\$lasttx1 MiB Rx=\$lastrx1 MiB\ \"\r\ \n:global lasttx3 ((\$trfctx3 + [/interface ethernet get WAN3 tx-bytes]) /\ \_1024 / 1024 )\r\ \n:global lastrx3 ((\$trfcrx3 + [/interface ethernet get WAN3 rx-bytes]) /\ \_1024 / 1024 )\r\ \n/interface ethernet set WAN3 comment \"Tx=\$lasttx3 MiB Rx=\$lastrx3 MiB\ \"\r\ \n" policy=\ ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \ start-time=startup
ليست هناك تعليقات:
إرسال تعليق