Leases for fixed-address hosts not written to lease file?

Steve van der Burg steve.vanderburg at
Thu May 24 14:50:58 UTC 2007

>>> Emmanuel Halbwachs <Emmanuel.Halbwachs at> wrote:
> Hello,
> Steve van der Burg a écrit (Tue, May 22, 2007 at 01:45:49PM -0400) :
>> doesn't show up in the leases file.  I can see that the lease is
>> fine (by checking what the client gets), and all of my "normal"
>> (ie. no fixed address, just regular dynamic address assignment)
>> leases are logged just fine.
> As a DHCP newbie, I was about to ask the very same question (didn't
> RTFM much I admit), so I watch carefully the answers.
> For the moment, I use this workaround to have roughly an idea of
> machine is a currently DHCP client :
>     REGEXP="DHCPACK on 145.238"  (my prefix)
>     LOGFILE=/var/log/all.log
>     grep -i "$REGEXP" $LOGFILE \
>         | awk '{print $8}' \
>         | sort -u \
>         | sort -t . -n -k1,1 -k2,2 -k3,3 -k4,4 \
>         > $FILE
> And then some aggregation.

Thanks to everyone for your suggestions.  It looks like hacking the
server may not be the easiest way to get the job done, I can't really go
to 3.1.0 for production, so I think I'll stick with log-scraping, which
I'm already doing for a couple of other reasons anyway.

In case anyone is interested, I've posted my log-scraping code here: 

It is run via cron once a minute, and keeps track of the timestamp of
the last log line that it processed, so it doesn't needlessly scan huge
chunks of the logs that it has already seen.  It currently builds a
little perl data structure for new or renewed leases that it sees
logged, and sends them to another machine to be stuffed into a database.
 Here's a sample of that file: 


More information about the dhcp-users mailing list