Hi there. I’m trying to report on DHCP activity on one of our routers.
In order to do this I have created a simple script (dhcp-count) which is as follows:
:global monDHCPCounter;
:set monDHCPCounter ($monDHCPCounter + 1);
I have made this script the lease-script for the DHCP server placing its name in the relevant box on the DHCP server config. The console shows as follows:
name=“site” interface=hotspot lease-time=4h address-pool=larger hotspot bootp-support=static authoritative=yes use-radius=no lease-script=dhcp-count
So far so good. However when I reboot the box and zero everything, I eventually see that the run-count of the script exceeds the value of the variable “monDHCPCounter”
This seems unexpected as Id expect them to follow each other in lock step. Can anybody explain how the script run count can contain run events where the variable was not incremented?