I'm wondering what is the correct way to count how many IPs are in use in my network according to the dhcpd process.
Is it just a matter of counting "binding state active" lines in dhcpd.leases file? Or it is something more complicated?
Thanks in advance.
You could use ReportDHCP which parses your dhcp.leases file and provides you with a report that should give you what you are looking for.
dhcpd-pools is probably what you want.
Example:
dhcpd-pools -c 'path-to-dhcpd.config' -l 'path-to-lease-file' -L11 -sp -r
Explanation: It prints 'Range Headers' and 'Ranges' with '-L11' and then sorts recursively on 'percent' with '-sp -r'
Man page: http://dhcpd-pools.sourceforge.net/man.html
use at the command-line: Netsh dhcp server scope 192.168.1.0 show clients