LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Logrotate strange problem (https://www.linuxquestions.org/questions/linux-software-2/logrotate-strange-problem-437904/)

FragInHell 04-23-2006 12:46 AM

Logrotate strange problem
 
Hi.

I'm using logrotate on a cent os 4.3 box, but for some reason this box out off all the others has a logrotate problem. When my logs rotate each week, messages becomes messages.1 for example but the system continues to weite to messages.1 ans therefore message is empty.Its doing this for all the standard logs, log rotate makes, there no changes to it, its just as it out of the box.
Has any one come across this before?

Thanks in advance.

Keith.

gilead 04-23-2006 06:35 AM

It sounds like the syslogd isn't being restarted when the logs are rotated. Is your logrotate setup so that there is an /etc/logrotate.d/syslog file? If so, does it restart syslogd? For example:
Code:

/var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog {
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
    endscript
}


ataraxia 04-23-2006 10:49 AM

I had this happen to me a while back (like last year). It went away after an upgrade. In my case, I think it was just a bug in logrotate.

FragInHell 05-07-2006 06:12 PM

Hi,

Thanks for all the feedback, I removed and re-installed both logrotate and syslog, which seams to have cured the problem, Sunday night the logs have all rotated correctly.

Thanks again for the help.

Keith.


All times are GMT -5. The time now is 01:47 AM.