[Dnsmasq-discuss] Logrotate again

richardvoigt at gmail.com richardvoigt at gmail.com
Tue Oct 27 15:03:45 GMT 2009


On Tue, Oct 27, 2009 at 8:14 AM,  <knud.skrald at guldberg.info> wrote:
> Hi
>
> I am new to this list...
>
> As <subj> says...I have a problem getting logrotate to work
> with the log file from dnsmasq.
> I have searched the earlierer postings
>
> Problem:
> When the logfile (dnsmasq) is rotated, dnsmasq log file is renamed to
> dnsmasq-date-xxx as usual logfiles.
> A new dnsmasq log file is created with size of zero bytes but it keeps
> to be of size zero and dnsmasq-date-xxx is kepp growing in size eg.
> dnsamsq is keep writing to this file instead of the newly created file.
>
> Sending "kill -s SIGUSR2 `cat /var/run/dnsmasq.pid`" from a command
> prompt makes dnsmasq to write to the "normal log file "dnsmasq"

Command prompt of what user?  Does it work as the logrotate user?

>
> to setup:
> fedora 11
> dnsmasq 2.46 from the fedora 11 packaged
>
> snip from logrotate.conf
>>>>>>>>>>>>>>>>
> /var/log/dnsmasq {
>     missingok
>     daily
>     rotate 3
>     size 100k
>     create 0640 nobody root
>     postrotate
>        kill -s USR2 `cat /var/run/dnsmasq.pid`

I'd try the usual suspects, such as writing to syslog from the
postrotate step to make sure it's being executed and the pid is as
expected (the file might not be readable, etc).

>     endscript
> }
>
> Knud
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>



More information about the Dnsmasq-discuss mailing list