Script for TX and RX count Zero

i need script for Metal 2shpn some time i found wireless card the RX and TX count Zero (0) and the Registration option in wireless peoples access point still connecting i don’t know why :frowning:

to repair this problem must restart the Metal , i need some one make to me Script when this problem happen system reboot

This is for 5 clients on a sector on wireless interface, wlan1.

Change the IPs to those of the client RBs and change wlan1 to your wireless interface.
Add to scheduler to run once on startup.

#AUTO restart stalled sector
#Ping Sector clients
#If no successful pings -> Restart Sector

:local latency
:local runloop true

:while ($runloop =  true) do={
   :delay 20s
   :set latency 0
   :local latency1 [/ping address=172.18.194.6 interval=1000ms count=1];
   :local latency2 [/ping address=172.18.194.14 interval=1000ms count=1];
   :local latency3 [/ping address=172.18.194.22 interval=1000ms count=1];
   :local latency4 [/ping address=172.18.194.30 interval=1000ms count=1];
   :local latency5 [/ping address=172.18.194.86 interval=1000ms count=1];
   
   :set latency ($latency1 + $latency2 +$latency3 + $latency4 + $latency5)

   if ($latency = 0) do={
      :log info "Sector Freeze detected"
      :log info "Sector Disabled"
      interface disable wlan1
      delay 3s
      interface enable wlan1
      :log info "Sector Enabled"
      delay 100s
   }
}

Its not an elegant solution, but i wrote it in 5min a while back and it solved the exact issue you are having.

If you neaten, tweak, come up with something better please share.

Thanx DanaH for help , it must add IPs to those of the client ?? some client’s Ips when i make ping in mikrotik give me timeout

and this script make disable & enable or reboot ??

try this
{
:local bps
/interface monitor-traffic wlan1 interval=2s do={:set bps (rx-bits-per-second)} once
if ($bps < 10) do={system reboot} }
add a scheduller with reboot policy

^^^What he said^^^

But for me rebooting the rb wasn’t necessary, just disabling and enabling the interface was enough to get it running again.

Sent from my XT910 using Tapatalk 2

i try it and not working with me :frowning:

your script working but he disable and enable wlan1 all time , when my problem happen disable & enable not working with me must restart i don’t know why :frowning:

i try scan option in wireless interface and nothing appears this show me the wlan1 freeze then i restart Metal

paste in the terminal, and check the outut.