dhcpd.leases file is growing out of control after upgrade

Scott Baker bakers at canbytel.com
Mon Aug 5 15:53:06 UTC 2013

On 08/05/2013 08:36 AM, Simon Hobson wrote:
> Scott Baker wrote:
>> Before the upgrade the dhcpd.leases would hover around 5
>> megs, depending on how recently the server has refreshed the on-disk
>> state. After the upgrade, the file only seems to grow. Over the weekend
>> my leases file was more than 275 megs! A simple "service dhcpd reload"
>> dropped the file back down to a respectable 3.7 megs.
> Sounds like the server isn't cleaning up as it should do - by default every hour.
> In the same directory asdhcpd.leases you should also see a file calleddhcpd.leases~ which at any time should be less than an hour old. This is the old leases file before the new one is swapped into place. Is this present, and is it's timestamp changing ?
> The logic of a cleanup is (AFAIK) :
> Write new clean leases file from in-memory tables to temporary file.
> If this is successful then
> Renamedhcpd.leases todhcpd.leases~ & rename temporary file todhcpd.leases

There is a dhcpd.leases~ file, but it does NOT appear to have been
updated in the last 50 minutes:

  6628 -rw-r--r--   1 dhcpd dhcpd   6786675 Aug  5 08:38 dhcpd.leases
278984 -rw-r--r--   1 dhcpd dhcpd 285674779 Aug  5 07:51 dhcpd.leases~

I restarted the dhcp server 7:51 to clean up the file so I guess that
makes sense.

Scott Baker - Canby Telcom
System Administrator - RHCE - 503.266.8253

More information about the dhcp-users mailing list