Re: Log rotation in Debian /var/log
%% Ethan Benson [EMAIL PROTECTED] writes: eb On Wed, Mar 21, 2001 at 09:08:00PM -0500, Paul D. Smith wrote: This seems needlessly complex: how many different log rotating tools do we need to have on a system in order to do the job? Debian should pick one and try to move all the standard system services to use that one tool, IMO. eb debian packages have been rotating logs for a lot longer then eb logrotate has existed. Sure; I meant going forward it would be good to converge on one method. eb current debian policy *suggests* using logrotate, so packages should eb and some do, but its not required. Unfortunately after playing with logrotate, it has some significant drawbacks that would need to be addressed before it could be considered sufficiently generic to be used by everyone. -- --- Paul D. Smith [EMAIL PROTECTED]HASMAT--HA Software Methods Tools Please remain calm...I may be mad, but I am a professional. --Mad Scientist --- These are my opinions---Nortel Networks takes no responsibility for them.
Re: Log rotation in Debian /var/log
PDS == Paul D Smith [EMAIL PROTECTED] writes: PDS Unfortunately after playing with logrotate, it has some PDS significant drawbacks that would need to be addressed before PDS it could be considered sufficiently generic to be used by PDS everyone. Just curious: What drawbacks? -- Ilya Martynov AGAVA Software Company, http://www.agava.com
Re: Log rotation in Debian /var/log
%% Ilya Martynov [EMAIL PROTECTED] writes: im Just curious: What drawbacks? I found two, but only one is really critical: 1) You can use globbing to have a single stanza match multiple log files, BUT the entire stanza is run each time for each log file, _including_ the postrotate scripts! IMO, this makes it useless for any daemon that generates multiple log files, like Apache or even INN (the example they use in the man page!) Who wants to have their Apache or INN servers bounced 15 times in quick succession every night just because it generates 15 log files that need to be rotated? The postrotate script should be run _one_ time for each stanza, after all the logs are moved and before they are compressed. 2) If #1 is fixed, then there's a lesser problem that only one filename phrase is allowed per stanza. This is probably OK for a system log utility since it's not a good idea to put your log files in different places, but for a tool like Apache where you might have virtual hosts for different users and want to put the log files for each virtual host in that user's directory, it's going to be pretty hard to come up with only one globbing expression that matches all the log files! Of course, Apache has more serious requirements since you don't even know the names of all the log files; the current Apache setup parses them out of the Apache config file. It would be nice if logrotate handled that; maybe a special include syntax that invoked the file via popen() or something, and read its output. Or, something. -- --- Paul D. Smith [EMAIL PROTECTED]HASMAT--HA Software Methods Tools Please remain calm...I may be mad, but I am a professional. --Mad Scientist --- These are my opinions---Nortel Networks takes no responsibility for them.
Log rotation in Debian /var/log
So, how does this work? I mean, I know about logrotate and I ass-u-me that the logs in /var/log are rotated using logrotate... no? When I look in /etc/cron.daily/logrotate I see an invocation of logrotate with the config file /etc/logratate.conf. All well and good. But, there is no entry in /etc/logrotate.conf that pertains to the general contents of /var/log! It does /var/log/wtmp and /var/log/btmp and that's it. How are the rest of the log files getting rotated? Is this built into logrotate somehow so it doesn't need to be configured? Or what? Also, in the logrotate.conf file it has a comment that it includes the /etc/logrotate.d directory because RPM packages drop log rotation information into this directory. The only file there on my system is for junkbuster (which is a Debian package, not an RPM). If this is for RPM logrotate configs, is there somewhere else for Debian ones? Hmm, looking at the policy manual I see /etc/logrotate.d explicitly mentioned as the right place to put logrotate configs. Maybe this comment in logrotate.conf needs to be removed/reworded. Thanks... -- --- Paul D. Smith [EMAIL PROTECTED]HASMAT--HA Software Methods Tools Please remain calm...I may be mad, but I am a professional. --Mad Scientist --- These are my opinions---Nortel Networks takes no responsibility for them.
Re: Log rotation in Debian /var/log
Paul D. Smith wrote: How are the rest of the log files getting rotated? Is this built into logrotate somehow so it doesn't need to be configured? Or what? Indeed. I changed my logrotate.conf, to rotate weekly, for 52 weeks. So far, some files rotate daily, some rotate weekly, some rotate 4 times, some rotate 7 times. None rotate weekly, for 52 weeks. I'm suspecting logrotate doesn't actually use /etc/logrotate.conf in the manner the man pages suggest. mike dresser
Re: Log rotation in Debian /var/log
On Wed, Mar 21, 2001 at 12:31:28PM -0500, Paul D. Smith wrote: [...] I mean, I know about logrotate and I ass-u-me that the logs in /var/log are rotated using logrotate... no? When I look in /etc/cron.daily/logrotate I see an invocation of logrotate with the config file /etc/logratate.conf. All well and good. But, there is no entry in /etc/logrotate.conf that pertains to the general contents of /var/log! It does /var/log/wtmp and /var/log/btmp and that's it. How are the rest of the log files getting rotated? Is this built into logrotate somehow so it doesn't need to be configured? Or what? [...] Most of the system files are being rotated by sysklogd. Regards, Andreas.
Re: Log rotation in Debian /var/log
Most of the system files are being rotated by sysklogd. Regards, Andreas. Did some more digging, finally found savelog. If you check your /etc/cron.daily and /etc/cron.weekly, you'll find savelog is called by sysklogd. change the -c 4 to something higher, and in the other, the -c 7 to something higher. Wonder if it'd be a good idea for someone to stick # Note: System logs in /var/log are handled by daily and weekly crontab's in $crontab_location somewhere at the top of /etc/logrotate.conf =) Now i'm off to fix my logrotate =) Thanks for the tip Andreas, and thanks to Paul for asking about logrotate, got me thinking on the right track. mike
Re: Log rotation in Debian /var/log
OK, I see sysklogd. This seems needlessly complex: how many different log rotating tools do we need to have on a system in order to do the job? Debian should pick one and try to move all the standard system services to use that one tool, IMO. Next question: how in the heck are the Apache logs rotated? As far as I can tell, sysklogd doesn't do so. Anyway, none of the invocations of syslog-listfiles I came up with listed any of them to be rotated. Also, the apache config doesn't appear to use the method suggested in the Apache web site (pipe to rotatelogs or whatever). Nevertheless, my /var/log/apache/* log files are without a doubt being rotated. Who is doing it, and from where?!?! Enquiring minds want to know... -- --- Paul D. Smith [EMAIL PROTECTED]HASMAT--HA Software Methods Tools Please remain calm...I may be mad, but I am a professional. --Mad Scientist --- These are my opinions---Nortel Networks takes no responsibility for them.
Re: Log rotation in Debian /var/log
On Wed, Mar 21, 2001 at 09:08:00PM -0500, Paul D. Smith wrote: OK, I see sysklogd. This seems needlessly complex: how many different log rotating tools do we need to have on a system in order to do the job? Debian should pick one and try to move all the standard system services to use that one tool, IMO. debian packages have been rotating logs for a lot longer then logrotate has existed. current debian policy *suggests* using logrotate, so packages should and some do, but its not required. Next question: how in the heck are the Apache logs rotated? /etc/cron.daily/apache (or is it cron.weekly) As far as I can tell, sysklogd doesn't do so. Anyway, none of the invocations of syslog-listfiles I came up with listed any of them to be rotated. Also, the apache config doesn't appear to use the method suggested in the Apache web site (pipe to rotatelogs or whatever). Nevertheless, my /var/log/apache/* log files are without a doubt being rotated. Who is doing it, and from where?!?! each package installs its own cron job in cron.weekly or cron.daily to take care of log rotation, some packages use logrotate instead. some standard logs are rotated by sysklogd (messsges, auth.log etc) -- Ethan Benson http://www.alaska.net/~erbenson/ pgpvBIUhuf4de.pgp Description: PGP signature