dhcpd.log file not rolling

Peter Rathlev peter at rathlev.dk
Tue Jan 11 14:16:47 UTC 2011

On Tue, 2011-01-11 at 08:36 -0500, jim wrote:
> Upgraded to Red Hat Enterprise 6 and DHCP Server 4.1.1-P1 last week
> and having a problem with the rolling of the dhcp.log file.
> Creates the new file dhcpd.log but dhcp sometimes is still putting the
> log messages in the wrong/old file.
> Creates the new file at 4:00 AM like on the old system, but the log
> messages are still going in to the file dhcpd.log-20110110 for couple
> of days.

Can you see when the currently running dhcpd was started? What is the
path to the running dhcpd executable?

It seems that the running dhcpd somehow isn't restarted, and it thus
keeps its file descriptors open.

> In the file /etc/logrotate.d/dhcpd have
>  /var/log/dhcpd.log {
>      daily
>      rotate 60
>      missingok
>      create 0644 root root
>      postrotate
>          /sbin/service dhcpd restart > /dev/null
>      endscript
>  }

I'm not familiar with RHEL 6, but if your 4.1.1-P1 is compiled from
source it's probably placed under /usr/local/sbin/ instead
of /usr/sbin/. And the "service" script might point at /usr/sbin/dhcpd
(look in /etc/init.d/dhcpd).

Otherwise you could remove the "> /dev/null" from the postrotate script
to maybe see some kind of error.


More information about the dhcp-users mailing list