<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.3">
</HEAD>
<BODY>
I have had this occur intermittently in the past with Apache, solution was to restart apache on the postrotate, I'd still suggest doing this to avoid future occurences<BR>
<BR>
<BR>
Cheers<BR>
<BR>
Tim<BR>
<BR>
-----Original Message-----<BR>
<B>From</B>: <A HREF="mailto:knud.skrald@guldberg.info">knud.skrald@guldberg.info</A><BR>
<B>Cc</B>: DNS-DISCUSS <<A HREF="mailto:DNS-DISCUSS%20%3cdnsmasq-discuss@lists.thekelleys.org.uk%3e">dnsmasq-discuss@lists.thekelleys.org.uk</A>><BR>
<B>Subject</B>: Re: [Dnsmasq-discuss] Logrotate again<BR>
<B>Date</B>: Thu, 29 Oct 2009 13:17:50 +0100<BR>
<BR>
<PRE>
Still working correct...
Strange !
Knud
> Strange... this night it made the log rotation just as expected !
> I have not changed anything...!
> I will keep it under observation...
>
> Suggestion:
> Could SIG's be written to the logfile ?
> It would be nice in a case like this to see if the SIG is received by DNSMASQ
>
> Knud
>
>
> Citat af Tim Allingham <<A HREF="mailto:tim@theallinghams.com">tim@theallinghams.com</A>>:
>
>> Have you tried restarting the service after the logrotate?
>
> Yes then DNSMASQ use the new file instead the old handle
>
>>
>> It sounds like the file handle is being kept open by dnsmasq, rather
>> then opened and closed per write.
>>
> Yes my conclussion was the same
>
>>
>> Restarting the service should kick it back onto writing into the new
>> file, as the handle will be re-initiated. You can configure this as a
>> post-rotate action in your logrotate conf.
>
> Yes but so far I understand sigusr2 should actually close and reopen
> the log file
>
>>
>> Cheers
>>
>> Tim
>>
>> -----Original Message-----
>> From: <A HREF="mailto:knud.skrald@guldberg.info">knud.skrald@guldberg.info</A>
>> To: <A HREF="mailto:dnsmasq-discuss@lists.thekelleys.org.uk">dnsmasq-discuss@lists.thekelleys.org.uk</A>
>> Subject: Re: [Dnsmasq-discuss] Logrotate again
>> Date: Tue, 27 Oct 2009 18:41:30 +0100
>>
>>
>> <A HREF="mailto:richardvoigt@gmail.com">richardvoigt@gmail.com</A> wrote:
>>> On Tue, Oct 27, 2009 at 8:14 AM, <<A HREF="mailto:knud.skrald@guldberg.info">knud.skrald@guldberg.info</A>> 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?
>>
>> root
>> I have tried and another user ...non of the logrotate aktivities are
>> then allowed
>> I dont know which user the logrotate run under ..
>>
>>>
>>>> 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).
>>
>> Hmmm....just tested from root user(again)...now it works as expected
>> By setting the size to something small...and deleting the log file from
>> today
>>
>> logrotate -f /etc/logrotate.conf
>>
>> I will wait and see this night what happend
>>
>>
>>
>> Knud
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> <A HREF="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</A>
>> <A HREF="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</A>
>>
>
>
>
_______________________________________________
Dnsmasq-discuss mailing list
<A HREF="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</A>
<A HREF="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</A>
</PRE>
</BODY>
</HTML>