The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
14 views

Why is logrotate not rotating my httpd logs correctly? [on hold]

What I want is for my logs to have a by day log file that is labeled by date and I want to keep the last 60 days of log files. Here is the configuration I am using to try and do that. /var/log/httpd/*...
0
votes
1answer
21 views

how much time logrotate waits between postrotate and compression

I'm writing a software and I want to reload log files when the process get a SIGHUP from something like logrotate. The question is, how much time the application can use before logrotate starts ...
1
vote
1answer
26 views

logrotate not working as expected with my custom log

I turned on mysql general log, and since it was growing pretty fast I thought of using logrotate daily, so I created the log yesterday at about 2pm and this is how the log looks like: -rw-rw---- 1 ...
0
votes
1answer
52 views

logrotate Compress doesn't work at all redhat 7

My logrotate compress is not working at all. Log rotation will rotate file but it doesn't compress at all. Any simple mistake i am doing please let me know. This is output of logrotate -v /etc/...
29
votes
4answers
56k views

How to make log-rotate change take effect

I followed this link to change log-rotate configuration for RHEL 6 After I made the change to config file, what should I do to let this take effect?
4
votes
5answers
2k views

nginx logrotate error on cron job

I'm running Ubuntu 14.04 LTS and nginx on a Digital Ocean VPS and occasionally receive these emails about a failed cron job: Subject Cron test -x /usr/sbin/anacron || ( cd / && run-parts ...
18
votes
2answers
21k views

How to avoid apache reload when rotating logs?

I use logrotate to rotate Apache access-, error- and rewrite-logs. My config file looks like this: /apache/*log { compress dateext rotate 365 size=+300M olddir /log/old/apache ...
28
votes
3answers
26k views

Logrotate: “log does not need rotating” why?

I have the following new logrotate configuration: /var/log/nexus/nexus.log { rotate 7 missingok compress delaycompress copytruncate daily } When I run logrotate -d nexus, I ...
3
votes
1answer
724 views

Permission denied when running logrotate with anacron

I am trying to figure out what is causing anacron to send me the following error message: /etc/cron.daily/logrotate: /var/log/mariadb/mariadb.log-20140710.gz: Permission denied error: error running ...
3
votes
2answers
2k views

Logrotate maually on FreeBSD 8

I am able to rotate any log file manually via logroatate like this: logrotate -f /etc/logrotate.d/my-hourly-file I want to know how to perform the same action on FreeBSD 8? My investigation shows ...
0
votes
1answer
22 views

Logrotate.d odd behaviour

I have an issue with log rotation. I'm using rsyslog to collect fairly large amounts of syslog data from some Cisco kit. The standard syslog files are rotating/cleaning up just fine, however the ones ...
3
votes
2answers
4k views

How does logrotate treat globbing?

If I have a logrotate config file like this, # matches multiple ones /var/log/project/*.log { ... prerotate ... endscript ... } So how does the glob work here? If I have 3 log ...
1
vote
0answers
84 views

logrotation- rotate and maxage command

please check the below script where I have to rotate the file for 30 days and its moved into the backup directory after rotation. So as I have used rotate 30 and maxage 30, when the logrotation ...
1
vote
1answer
128 views

logrotation - rotate and maxage command

Can anybody please explain me about the function of 'rotate' and 'maxage' in logrotation as this is very confusing . consider am using the below values in my script: rotate 30 maxage 30 Thank you.....
1
vote
1answer
70 views

Logrotation of a file

I want to rotate a file and place the rotated file inside a new directory called 'backup'. The rotation of the log is working fine where the rotated file is not getting moved inside the backup ...
0
votes
1answer
275 views

Nginx Log Rotation Doesn't Seem to Be Working Correctly

I discovered that my partition mounted as /var had filled up. In tracking down the disk usage, I found that my Nginx log file is huge, and it doesn't seem to be writing to the correct file. ls -ltr ...
0
votes
0answers
156 views

logrotate works when run manually, doesn't when run with cron

This is on Ubuntu Server 14.04, but I think it's applicable to all OSes. I'm running logrotate as a cron job, cron settings are the defaults (logrotate exists in /etc/cron.daily). I'm running a ...
-1
votes
1answer
54 views

logrotate : size mentioned 2000M in connf still logs size is more than 2000M

My /etc/logrotate.conf : # see "man logrotate" for details # rotate log files weekly weekly # keep 4 weeks worth of backlogs rotate 4 # create new (empty) log files after rotating old ones create ...
1
vote
1answer
191 views

log compression using logrotate

I was trying to set compression for jboss log files. The log files I want to compress are console.log and server.log. Compression for console.log is working fine, but server.log I am seeing issues. I ...
1
vote
2answers
230 views

logrotate not working

I want to set up daily logrotate for my Tomcat server' catalina.out log file but it's not working - I haven't seen the rotated log files created. To troubleshoot, I ran logrotate -d /etc/logrotate....
1
vote
1answer
153 views

logrotate fails to rotate logs: error setting owner

Recently I've noticed that logrotate does not rotate my logs. user1@host:~$ /usr/sbin/logrotate /home/user1/logrotate.conf -v gives me an error: error: error setting owner of /home/logs/mylog.log.1 ...
1
vote
1answer
796 views

How can I learn some advanced logrotate techniques? [closed]

The logrotate section in the Linux administrator's handbook is very brief. The man page is ok but lacks examples. Where can I find some more comprehensive information, examples, and best-practice ...
1
vote
1answer
35 views

handle large number of same log using cron or logrotate

We have an app deployed in a server, which, under some scenarios, generates some logs in the below format. process_name.hostname.common_text.log.{error/info/warning}.date.time Now, due to this ...
0
votes
2answers
235 views

Troubleshooting Logrotate

The Problem I have several identical servers all running identical logrotate configurations rotating a custom log file. On at least one of the servers my logs are not getting rotated correctly. I ...
1
vote
1answer
29 views

What is the most recent log file in logrotate utility

I have multiple log files abc-log,abc-log.1, and abc-log.2 rotated by logrotate utility. Among these rotated log files which is the log file which contains the recent logs? Is it abc-log or abc-log.1?
0
votes
1answer
130 views

logrotate doesn't respect rotate parameter

I've been having some trouble with logrotate, it seemingly does not do what I'm telling it to do. Environment: Centos 6.4 logrotate 3.7.8 My /etc/logrotate.conf file has the following: # rotate ...
0
votes
0answers
44 views

is it possible to increase the xorg log backup level in ubuntu?

I thought it was 3 before. But right now it only keeps Xorg.0.log and Xorg.0.log.old. Can I increase it to 10 or some other value? It seems the logrotate does not affect the Xorg.0.log at all. ...
0
votes
1answer
55 views

Logrotate: Message in log configuration file for rotation

I am trying to make a configuration file for rotation in /etc/logrotate.d/ I did this: sudo cat > service /var/log/service/service.log { rotate 6 compress size=120M missingok create 0777 ...
1
vote
0answers
29 views

What is the max value of the rotate parameter of a logrotate configuration file?

I would just like to make sure I can put in a relatively large value like 730 for two years without having something unexpected happen.
1
vote
1answer
122 views

logrotate :: How to delete old logs in a logfile after logfile size reaches 1M size

How can I keep log file size limited to 1M? I want to delete old log entries in a log file after log file size reaches 1M size. I do not want to delete the log file itself.
2
votes
3answers
2k views

how to implement logrotate in shell script

test.sh #!/bin/bash echo "Hello World" test2.sh #!/bin/bash while true do sh test.sh >> /script_logs/test.log & done I want to implement logrotate to control the log file size, so ...
0
votes
1answer
677 views

Delete files only with logrotate

I have an application which rotates its own log files on an hourly basis. Each hour I want to remove all of the files more then n days old. I have to use logrotate to do this because of business ...
1
vote
2answers
3k views

How to make sendmail write to new maillog

I want to rotate my maillog, but I want to make sure the newly rotated log contains the last 2M lines from the previous log: # write the last 2M lines to a new log tail -n 2000000 /var/log/...
0
votes
0answers
88 views

After logrotate my tomcat logs all all zero

I've a problem rotating my tomcat logs. I've the following logrotate-file for tomcat8 (/etc/logrotate.d/tomcat8): /var/log/tomcat8/catalina.out { copytruncate weekly rotate 8 compress ...
1
vote
1answer
34 views

logrotate create group not working

cat /etc/issue Welcome to SUSE Linux Enterprise Server 11 SP1 for VMware (x86_64) - Kernel \r (\l). rpm -qf /etc/logrotate.conf logrotate-3.7.7-10.22 tail -n15 /etc/logrotate.d/syslog /var/log/...
0
votes
1answer
140 views

logrotate not compressing files as expected

With the logrotate config. below I was expecting the program to start compressing log files after creating the first backup file. Instead I am seeing this: [root@host ~]# ll /var/log total 1.2M ...
1
vote
1answer
201 views

Rotating catalina.out with timestamp format using logrotate. like catalina.$date.out

I am using logrotate to rotate catalina.out, but after rotation the filename is like catalina.out.1.gz. I want it to rotate the file with a timestamp in its name, like: catalina-2015-08-10-2337.out....
0
votes
0answers
27 views

Move files that are 7 days or older, cronjob [duplicate]

I want to move some log files that are 7 days or older to another folder and then delete those files after another week. I'm using logrotate to create a new log file every 2 hours in a folder. I ...
2
votes
1answer
774 views

logrotate every 2 hours

I'm trying to make httpry logs every 2 hours. I added this to my logrotate.conf file: /var/log/httpry/*.log { rotate 1 weekly create 640 root admin missingok notifempty } I ...
0
votes
1answer
485 views

Run logrotate as specific user

I am using log rotate to rotate logs for a daemon I have running (A web service). The log rotate is as follows: /var/log/deamon/error.log { daily rotate 20 compress delaycompress ...
1
vote
0answers
148 views

logadm permission issue in Solaris

Facing the following issue in a solaris box while using logadm tool . It is showing me permission denied error . -> logadm -w princelog /html/web/www.log -C 3 -s 500m -z 0 logadm: Error: /etc/...
1
vote
1answer
2k views

What is rotating Tomcat log files?

One of our servers has Alfresco installed, and this is the content of /opt/alfresco/tomcat/logs: -rw-r--r-- 1 root root 4.1K Jun 29 10:41 catalina.2015-06-29.log -rw-r--r-- 1 root root 352 Jul 1 ...
0
votes
1answer
44 views

Longer term logrotate

Does anyone know what the config would be for keeping log files for 8 months but compressing them every day? I got this: /500Gb/wireshark/log/* { rotate 240 daily size 1000M ...
-1
votes
1answer
133 views

Who was the original author of logrotate and what year was it written?

The question started as an internal team debate. But we realized we couldn't find any information about when the original version of logrotate was authored and who wrote it.Do you have idea?
1
vote
2answers
4k views

Error stat of log failed: Permission denied during LogRotation

After installing a new CentOS 6.0 server, logrotate was working absolutely fine. Then one day due to a kernel panic, the server had to be hard booted, and ever since log rotation is not rotating the ...
2
votes
1answer
66 views

appendable and greppable archive on CentOS to hold many log files (logrotate on steroids)

I have a bunch of applications on a CentOS 6.3 box, which generate daily logs (text files with a very similar content) in this vein: /data/logs/app/my-2014-06-29.log /data/yet_another_app/logs/...
2
votes
0answers
362 views

Logrotate archive old log files which has date extention

Everyday a log file is created in my directory. But with time, there tend to be a lot of log files. I want to keep the latest 4 log files in .log format, and compress the rest and copy the compressed ...
4
votes
2answers
1k views

Does setting the system time back impair logrotate operation?

I'm working on an embedded linux system where the root filesystem is mounted from an SDcard. Although many systems like this just mount /var/log on a ramdisk, I'd like to save the logs to the SDcard ...
2
votes
1answer
605 views

Why does logrotate zip a file before it is closed

I'm using logrotate to rotate mysql output. When cron runs logrotate, I get frequently get an e-mail with the following content: error: Compressing program wrote following message to stderr when ...
0
votes
0answers
30 views

logrotate logs in special dir format

I have my log file in this format in /var/log//YYYYMMDD/app[1-5].log I would like the following: On the 3rd of each month, move the directory /var/log//YYYYMMDD where MM is the previous month to /...