logrotate description
I am having a problem with logrotate not functioning. Please point me to the documentation that explains, indepth & technically, how the system logging works. I gave up on the Red Hat site.
When I run logrotate /etc/logrotate.conf I get this error: error:mysqld:3 unknown user 'mysql' System logging operates properly on my four US systems and they do not have a user 'mysql'. I need real, technical data to read, if it exists. Thank you, |
These sites should help a little, but I don't know how different, if any, it would be from what you were reading on RedHat's page.
http://www.wlug.org.nz/logrotate(8) http://www.topology.org/linux/logrotate.html http://www.comptechdoc.org/os/linux/...sysconfig.html -- Down about 1/2 way, about the same info as the link just above, but maybe easier to read for some? Running the .conf file is probably not what you want to do, since it's just the configuration for logrotate (thinking it was a typo, but making sure :)). I don't think the default install usually has a 'mysql' anything in logrotate.conf, but many popular distros have a /etc/logrotate.d/ directory as well, that contains package specific log rotation needs. A 'mysql' logrotate config file might be in there, and might be problematic. Just to get it going, you might open up that file and comment out each configuration line (just put a # in front of it), and see if that works. If it does, then it will be easier to narrow down the exact problem. Hope this helps. :) |
Am I to assume that syslogd also executes /etc/logrotate.conf? If so where is this documented? So far I've read what gets done but not how it gets done.
The command I ran (a Unix Admin put this in the crontab to force daily rotation) is: /usr/sbin/logrotate /etc/logrotate.conf. That is also the way to force a manual rotation of system logs. My US Linux servers do not have an entry in cron for logrotation so I'm assuming a daemon fires off log rotation. Why aren't the UK Linix servers running a logrotate. Is it syslogd? As a SUN admin I find locating linux docs very frustrating. Thank you for your help, Ed |
Partially Resolved
I have partially resolved the problem. I moved /var/log/mysqld to a Hold directory.
Now I'm able to manually rotate all the logs listed on /etc/logrotate.d/syslog. Not sure about automatic execution. Thank you, Ed |
Quote:
As far as the automatic execution goes... You might want to check the /etc/cron.* directories (if you have them) for something related to logrotate. There are usually /etc/cron.d, /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly. As you might guess, hourly goes off every hour, daily every day, etc, so long as it's setup in the crontab (usually is by default). Anyway, I'd be willing to bet that within one of those (probably daily), you'll find something related to logrotate. |
Moving the "mysqld" file out of /etc/logrotate.d fixed my problem.
Now all my listed logs are rotated by the system cron daemon. I now understand how all the logrotations happens in Linux. Thank you for your assistance with this problem. Ed |
All times are GMT -5. The time now is 11:14 PM. |