how to count IPs in use

Dima Fadeyev fadey at
Mon Oct 5 09:32:08 UTC 2009

Hi, everyone

I'd like to find out how many IPs are in use (from the point of view of
my dhcp server). First I thought it would just be a matter of counting
the leases that have "binding state active" in dhcpd.leases. However
there are quite a few leases that have this line, but also have the
"ends" date in the past. So, I'm a bit confused. 

lease {
  starts 1 2009/10/05 09:24:16;
  ends 1 2009/10/05 10:24:16;
  binding state active;

# date
Mon Oct  5 11:26:16 CEST 2009

Please, could anyone give me a hand. How do I find a number of IPs in

Thanks and best regards.

More information about the dhcp-users mailing list