Skript kontroly queues a dhcp serveru

Z Wiki UnArt Slavičín
Skočit na navigaciSkočit na vyhledávání
# Omezeni queues na parent, bez omezeni nechte hodnotu "none"
:global parent "none"

# Pomocne promenne
:global ip
:global found

:foreach ip in=[/ip dhcp-server lease find] do={
  :set found 0

  :foreach i in=[/queue simple find parent=$parent] do={ 
    :if ([:find [/queue simple get $i target-addresses] ([/ip dhcp-server lease get $ip address]."/32")]!=0) do={
      :set found 1
    }
  }
  :put [/ip dhcp-server lease get $ip address]." ".$found
}