On Thu, Oct 08, 2009 at 02:06:30PM +0100, Ian Chard wrote:

> I'm using the stock OpenBSD dhcpd, and I'd like to monitor the state of 
> the pool (how many addresses in use/available).  Is there any way of 
> doing this without writing a parser for /var/db/dhcpd.leases?  

You could set up your dhcpd to maintain PF tables (see dhcpd's -A -C
and -L options) and monitor the number of entries in the tables. You
could even use something like pfctl -t assigned -T show | wc -l

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

Reply via email to