logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.

learn more… | top users | synonyms

3
votes
2answers
4k views

Why do JBoss and Logrotate create log files full of NUL characters?

I've set up Logrotate to rotate my JBoss Application Server 4.2.2.GA logs nightly. After the log files have been rotated and JBoss starts writing to them again, the new log files begin with as many ...
1
vote
1answer
180 views

Compressed email attachments for logrotate

How can I configure logrotate so that it emails me the files 'after' they have been compressed? Right now I am emailed the uncompressed files which can results in huge attachments.
1
vote
8answers
930 views

Weekly Cron / Logrotate / Denyhosts error

I am getting the following error email every week. It appears to be a problem with either cron, logrotate, or denyhosts. I'm not sure which. Subject: Cron <root@vps> test -x /usr/sbin/anacron ...
2
votes
2answers
216 views

script to rotate apache weblog

I am looking for a script that would rotate weblogs on apache. I'd like to schedule the script over cron so it could run periodically and rotate access_log and error_log for all websites on the ...
2
votes
2answers
740 views

Script to modify logrotate configuration files?

I'm looking for a script that will allow me to programatically modify logrotate configuration files. At the least I'd like it to be able to replace a block such as /var/log/wtmp { missingok ...
8
votes
5answers
7k views

Proper way to rotate Nginx logs

I would like to achieve rotation of nginx logs that: would work without any extra software (i.e. - best if without "logrotate") would create rotated files with names based on date Best approach is ...
8
votes
3answers
6k views

NginX Log Rotation

I am serving a couple different domains through NginX on the same server and they each log to their own file. I need to set up a script to rotate, and compress these files and add it to cron. I ...
1
vote
2answers
4k views

How to use wildcards within logrotate configuration files

I have the following configuration that is not working: 1) Using rsyslog with Centos 5. 2) Inside /etc/logrotate.d I have the file sj-piers-logs. SJ-PIERS-LOGS: /syslogrep/sjpiers-logs/0* { weekly ...
12
votes
3answers
3k views

Logrotate and Open Files

How does logrotate handle open files? Can logrotate rotate files that a process has open?
12
votes
8answers
3k views

Continuosly monitor logs with tail that are occasionally rotated

We're using tail to continuously monitor several logs, but when a log is rotated the tail for that file will cease. As far as I understand, the problem is that when the log is rotated, there is a new ...
2
votes
3answers
1k views

Logrotate ERROR: No file found for /var/log/apache*/*error.log

Logrotate runs daily and emails me a report. This has been working fine however I now get the following email daily also: Date: Mon, 10 Aug 2009 04:02:08 +0100 From: root@localhost.localdomain (Cron ...
1
vote
2answers
325 views

Log Rotate and OpenVZ Virtual Machines

I noticed that my OpenVZ virtual machines (VEs) don't have logrotate installed, and my logs are getting a bit big :-) Since the file systems of the VEs are exposed to the host via /vz/private/.. , ...
9
votes
3answers
7k views
4
votes
3answers
4k views

logrotate rename files with date

Right now, logrotate renames old log files to access.log.1.gz, access.log.2.gz, etc. I would prefer if it named them access.log.20090714.gz, access.log.20090715.gz, etc - one for each day. I cannot ...
2
votes
1answer
3k views

Best practices for web server log archiving (Linux + Nginx)

I want to preserve/archive all of my web server logs, and not have any of them be deleted by logrotate. What would a recommended approach be for this? This is a Linux box, running Nginx. Thanks in ...
1
vote
3answers
2k views

Apache access log rotation

I think my system is using logrotate for rotating logs including httpd logs The "current" files is logged here /var/log/httpd/ but I only see the last 5 days(I think) But how can I find where ...
8
votes
4answers
4k views

Cronolog vs logrotate

Which log rotation tool do you prefer?