[Dnsmasq-discuss] dumping current dhcp leases without always updating the leasefile curing normal ?
rick.jones2 at hp.com
Tue Oct 15 16:32:22 BST 2013
>>> More context about what youre trying to achieve would help.
>> What I would like to be able to do is "know" (make an informed guess)
>> which of the clients which could have a lease probably have a lease (or
>> probably do not have a lease), but in an environment where I might have
>> either rather busy dnsmasq processes, or a large number of individually
>> not very busy dnsmasq processes and want to minimize the storage load.
>> But I don't need to know all the time, just occasionally and not
>> necessarily on a schedule and not necessarily all the dnsmasq processes.
>> So, I figured some sort of "dump your current leases" feature would
>> satisfy that.
>> I cannot really rely on the clients being willing to respond to the
>> likes of ping, they may only respond to things they've initiated
>> themselves. I also do not have other access to the clients (eg their
>> console). So, all I can think of presently is trying to ask the dnsmasq
>> process(es) what it believes its active leases happen to be.
>> BTW, sorry about botching the last part of the subject there.
> You could achieve the two aims "minimise storage load" and "know about
> dnsmasq leases" by implementing the lease database in some sort of
> lightweight database. Dnsmasq is designed so it can be without a lease
> file completely. At startup you prime the in-memory copy of the lease
> database via a DHCP-script "init" call, and then whilst dnsmasq is
> running is makes calls to the DHCP script as the data changes which can
> be used to update the database.
Is there more about the "reduce the writes to be nice to flash" changes
thanks for all the suggestions,
More information about the Dnsmasq-discuss