LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   logrotate description (https://www.linuxquestions.org/questions/linux-software-2/logrotate-description-211502/)

pharmhand02 07-30-2004 11:51 AM

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,

Ankheg 07-30-2004 12:15 PM

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. :)

pharmhand02 07-30-2004 02:05 PM

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

pharmhand02 07-30-2004 02:57 PM

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

Ankheg 07-30-2004 05:50 PM

Quote:

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.
I don't think execute is the proper term here...but I think we're on the same page anyway. *.conf files are usually "read in" by their respective programs, and are I guess executed within the program, but it isn't a true execution. They generally direct their owner on how to execute.

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.

pharmhand02 08-02-2004 09:18 AM

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.