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

0
votes
1answer
388 views

logrotate not rotates my logs

my logrotate works perfectly, except for this configuration: /var/awdata/awarchive.*.log /var/log/awstats.log { rotate 12 } this is my logrotate -d /etc/logorate.conf considering log ...
3
votes
1answer
3k views

manually rotating logfile with rsyslogd

I want to force logfile rotation using logrotate -f /var/log/syslog, but it's only return tones of: error: syslog:1 unknown option 'May' -- ignoring line error: syslog:1 unexpected text I know that ...
9
votes
2answers
5k views

Logrotate not working

I am trying to get logrotate to work on my VPS to rotate my apache files weekly. Currently the contents of the apache2 config file is as such. "/var/www/user/site.com/logs/*.log" { weekly ...
3
votes
1answer
918 views

How can I specify multiple rules for a particular log file(s) with logrotate?

I have a logrotate.d config file that looks something like this: /home/myapp/log/* { daily compress dateext ifempty delaycompress olddir /home/myapp/baklog } There are a few ...
2
votes
1answer
225 views

logrotate> removing delaycompress function: should I compress the last log myself?

I'm removing the delaycompress function from my logrotating script. Before running logrotate again, should I compress the last log myself ? This is the actual situation: -rw-r----- 1 root adm 4,7M ...
1
vote
2answers
143 views

Advice on apache log files

I have a small VPS that a friend and I use to host a few websites. We are both relatively inexperienced with server management and are unsure of an effective way to deal with the logs that Apache ...
2
votes
2answers
761 views

Where does logrotate save their own log?

I have a logrotate running into a EC2 AWS machine rotatting Apache logs. Once packed, apache logs are saved into AWS S3 via s3fs. The problem is that I recetly noticed that I didn't have logs rotated. ...
3
votes
3answers
86 views

logrotate security

Are there any concerns about the security of logrotate running as root? Had someone ask couldn't a malicious user subvert the config to overwrite anything? Is is okay to run logrotate out of the ...
4
votes
1answer
3k views

Logrotate does not remove old logs

for some reason the old log files are not deleted. Example with apache What the conf file says: $ cat /etc/logrotate.d/apache2 /var/log/apache2/*.log { weekly missingok rotate 2 ...
7
votes
2answers
5k views

logrotate not rotating the logs

I have this logrotate config and I am running on Ubuntu 10.04. /var/log/mysql/mysql-slow.log { daily rotate 3 compress notifempty missingok create 660 mysql adm postrotate ...
8
votes
3answers
380 views

Free-space driven log rotation on linux?

Someone just asked me 'how long should we keep logs for our application', and my answer was 'until the disk is full' as there's no reason to throw them away other than running out of space. However, ...
0
votes
1answer
210 views

Memcached logrotate file not being installed. Bug with memcached 1.4.2?

My memcached logs are getting huge (in excess of 5GB). This isn't a huge problem in itself. I can easily remove them. I've sourced the problem to the memcached 1.4.2 package not installing a ...
0
votes
0answers
400 views

Logrotate Successful, original file still with original size

Have the same (as in Logrotate Successful, original file goes back to original size) problem with logrotate. Use it for rotating flume logs: Launch flume as bin/flume node_nowatch -n apps_collector ...
2
votes
1answer
180 views

Can I manually compress file when logrotate with delaycompress is active

I have a daily logrotate set up with compress, missingok, delaycompress, dateext options. I need to compress the delayed log file. Can I do it manually now or should I wait till logrotate does it when ...
0
votes
1answer
490 views

using logrotate on win7 with cygwin

I am using the famous logrotate with windows 7 and cygwin, I have the latest cygwin dll but somehow the app doesn't work for me, and the config file seems to be ok. Has anyone encountered this before? ...
0
votes
1answer
188 views

setting logrotate to use UTC time

Is it possible to force logrotate to use UTC time for one configuration? I need the dateext to be set to UTC. I was hoping it was as simple as setting a date varible. Should I just run postrotate and ...
0
votes
2answers
368 views

Apache Log Rotation

Is there any mod or program for Apache Httpd which rotate logs as well as purge them without the restarting of server processes? I have checked a few options, mod_autorotate, rotatelogs, ...
0
votes
2answers
245 views

Logrotate won't rotate logs with a space

I have a log file a service of mine makes that has the filename "Feed1 - 1.stat". logrotate refuses to rotate this file, but only when run via cron. Running logrotate via the shell will rotate the ...
7
votes
2answers
5k views

Equivalent of LogRotate for Windows?

We have a huge logfile being written by a vendor's application. Let's assume the vendor won't do anything that we ask. Is there any way of rotating that logfile somehow? We're looking at about 300 MB ...
1
vote
3answers
2k views

Apache becomes unresponsive on Sundays

For some reason, most Sundays around 5-6AM local time Apache is not working properly. I can't find the reason, and I'm stuck troubleshooting. I'm running Magento on Apache2 with an SSL certificate, ...
16
votes
3answers
2k views

Equivalent of logrotate on OSX

Is logrotate hiding somewhere on OSX, or is there an equivalent? It's not in /usr/sbin.
5
votes
5answers
218 views

How should I deal with logs before they get to big?

I found out my disk was full today, and I freed up 10% just from deleting mostly logs from multiple websites. I, personally, like to keep logs as an archive, because I may need to look back on them ...
2
votes
2answers
225 views

Best Way to Keep Up on Linux Log Files

I run multiple Linux (Ubuntu) web servers and am looking for a convenient way to keep tabs on important log files. I'd like to monitor pertinent LAMP logs as well as server accesses/logins. Are there ...
0
votes
2answers
617 views

logrotate fails to instruct Apache to reopen logs on Amazon Linux

I have very good experience with logrotate normally, but on a recent installation using "Amazon Linux" (CentOS 6 deployed by Amazon) on EC2, logrotate fails to cause Apache to reopen its logs. The ...
1
vote
2answers
112 views

unidentifiable httpd log rotator

I have my own server instance which is centos 5.7 and have installed apache some time ago. Now I noticed that my log files are rotating. I couldn't remember if I had set up something or not since ...
1
vote
1answer
325 views

Mail logs files as attachments with sendmail

I'm using logrotate to rotate my log files. I've set it up to create new logfiles every week. However I would like it to first mail me the logfiles as attachments. The /var/log/httpd file currently ...
1
vote
1answer
365 views

nginx host server log rotation all sites

I have setup individual log files for each of my sites in the directory /var/log/nginx-hosts/ and I have to configure log rotation for those files. The base I am starting with is ...
2
votes
1answer
443 views

logrotate compress only last n logs

I need to make daily rotate /var/log/messages to be kept for 60 days, last 30 logs must be compressed with bzip2. That's my logrotate config: /var/log/messages { ...
2
votes
1answer
1k views

FreeBSD 8.1 64bit logrotate - ELF interpreter /libexec/ld-elf-so.1 not found

I am trying to get logrotate running on a FreeBSD 8.1 virtual machine. I installed the logrotate with pkg_add, I have created the logrotate.config file and also run: mkdir /var/lib/ touch ...
5
votes
2answers
2k views

Can postgres internal log rotation mechanism delete log files older than a certain time?

I am using posgtres' internal log rotation mechanism. I would like log files older than 30 days to be deleted. How do I get postgres to do this? If postgres does not support it, can I set logrotate to ...
0
votes
1answer
165 views

can logrotate process all *.log in a directory tree?

Logrotate can work on individual files or wildcarded files (*.log, for example) in a specified directory, but does it inherently have the ability to traverse a directory tree of arbitrary depth and ...
0
votes
2answers
86 views

apache access.log to keep only records from last 3 monthes

I need Apache accesslog file to be parsed fast in realtime and always to keep only last 3 months data. So I need tool which everyday cutting old records(and moving them to another file) from log file ...
1
vote
1answer
179 views

How do I work around the fact that Apache needs to be restarted to rotate the logs?

It seems so "primitive" that HTTPD has to be restarted just to rotate the logs. There has got be other ways to accomplish this! Note that I do not use nor wish to use AWStats, one of the ways to ...
1
vote
1answer
1k views

What process creates the access_log.processed file

We are having some problems with log rotation on our Centos box. We've configured the server to perform a logrotation every day and keep the logs for 30 days. In our log folder, every day a file ...
0
votes
1answer
222 views

How to make logrotate keep the last week into the current .log

Is it possible to get logrotate to keep the last week of logs in the current file? for example : errors.log contains 30 days of logs after log rotate executes , I would have : errors.log with ...
1
vote
1answer
4k views

logrotate won't rotate my logs automatically

I have two different (i386 v AMD) Debian boxes and have the same problem. logrotate won't rotate my logs automatically. It works fine when i force it manually like /usr/sbin/logrotate -f ...
1
vote
1answer
567 views

Varnish logrotate issue

I have this in logrotate.d/varnish file: /var/log/varnish/*log { create 640 http log compress postrotate /bin/kill -USR1 `cat ...
0
votes
1answer
174 views

Understanding logrotate's create directive

There is a web application (php/apache2) which opens a log file somewhere at a start of a request handling and closes it (as far as I know) when the handling is finished. Between log file open and ...
7
votes
2answers
9k views

When to use delaycompress option in logrotate?

The man page of logrotate says that: It can be used when some program cannot be told to close its logfile and thus might continue writing to the previous log file for some time. I'm confused by ...
2
votes
3answers
884 views

Preferred format of file names which include a timestamp

As we all know "unix" can have anything in a file except '/' and '\0', sysadmins however tend to have a much smaller preference, mainly due to nothing liking spaces as input ... and a bunch of things ...
1
vote
1answer
143 views

How do I tell logrotate what files to rotate with cron?

On my webserver I have this file: /etc/logrotate.d/apache2 I know it is logrotating /var/log/apache2/.log, but if I want to add things that are in /usr/home/www/site1/logs/.log do I just duplicate ...
2
votes
1answer
378 views

Reason to use rsyslog for log rotating?

Is there any benefit to using rsyslog's rotation abilities over the standard /sbin/logrotate?
0
votes
2answers
198 views

logrotation size limit is not effecting

I have fixed size limit in logrotation 1M. The script run on every hours even though its rotating less than 1Mb files. I dont know what i have done wrong. Below is my configuration parameters. ...
2
votes
1answer
1k views

Understanding reference to /var/log/wtmp in /etc/logrotate.conf

I have the following lines in my /etc/logrotate.conf file which I'm not quite sure what they do: (Edited in to show full file) # see "man logrotate" for details # rotate log files weekly weekly # ...
11
votes
5answers
1k views

Grepping through .gz log files

Does there exist a magical shell piping which would allow easily to grep through bunch of .gz log files without needing to extract them somewhere? .gz files are Apache logs, result of log rotation. ...
1
vote
2answers
847 views

Preventing logrotate's dateext from overwriting files

I'm working with a system where I would like to use the dateext function of logrotate (or some other way) to add the date to a logfile when it is rotated. However in this system it is important that ...
1
vote
1answer
591 views

Determine root cause of broken pipe on Linux?

I have a webapp running on some servers that have their Apache log files on an OCFS2 SAN volume. The internal webapp logging is done using log4perl, in pipe mode, with cronolog on the other end of ...
0
votes
1answer
837 views

Logrotate and copytruncate on file larger than remaining free space

I have a Nagios alert about disk space on our /var/log mountpoint on a production system. We have a catalina.out (Tomcat) file which has grown to 768 megs, and there are 171 megs left on the mount ...
1
vote
2answers
1k views

Logrotate configuration for httpd (CentOS)

I'm running Apache 2.2.3 on CentOS 5.5 and just noticed the following logrotate postrotate configuration in /etc/logrotate.d/httpd: postrotate /sbin/service httpd reload > /dev/null 2>/dev/null ...
3
votes
2answers
6k views

How to compress and clean logs with logrotate but not rotate them

I have a Tomcat server which create access logs via a valve (org.apache.catalina.valves.FastCommonAccessLogValve). This valve takes care of rotating the access log file, but not of compressing them ...