The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
25 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
33 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
83 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/...
0
votes
1answer
25 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 ...
1
vote
0answers
93 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
158 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
75 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
371 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
184 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
79 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
221 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
301 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
179 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
36 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 ...
1
vote
1answer
30 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
152 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
49 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
65 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
33 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.
2
votes
3answers
3k 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
882 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 ...
0
votes
0answers
95 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
37 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
153 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 ...
0
votes
2answers
278 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
208 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
29 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
933 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
552 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
156 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 ...
1
vote
1answer
133 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.
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 ...
0
votes
1answer
46 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
135 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?
2
votes
0answers
397 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 ...
2
votes
1answer
637 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 /...
1
vote
1answer
165 views

Create new syslog file on boot

I want to create a new syslog file each time the system boots and save the old data in another file so that I can detect abnormal behavior on the current boot if any. Is there any configuration for ...
0
votes
1answer
1k views

OpenVPN client log not `logrotate`ing as expected

summary: I want to keep an OpenVPN client's main log from filling its filesystem, but I also need to keep a fairly high debug level (at least for now). My attempt to logrotate is currently not ...
1
vote
1answer
440 views

What exactly does logrotate do to apache log files? (apache 2.4 - ubuntu 14.04)

Other than a couple of basic VHOST's, I have default apache and apache logging configuration. Whenever I try to view my apache log files (error.log, access.log) I see that these files keep getting ...
2
votes
1answer
937 views

SELinux + logrotate + prerotate = Permission Denied

I have what (should) be a fairly straightforward task: Migrate a set of custom log files to a database at night. I use logrotate (cron.daily) with a simple prerotate task /var/log/myapplog/*.log { ...
1
vote
1answer
563 views

Logrotate: scp rotated file to different location

I have a log file, which is supposed to rotate after reaching a particular size (say 50MB). After the rotation, it should be compressed and date has to be appended to the rotated file name. Now, the ...
1
vote
2answers
955 views

Logrotate: Log file not being rotated

I am trying to rotate a log file using logrorate. Following is the configuration: /etc/logrotate.conf: /var/log/test.log { size 1M rotate 6 create dateext ...
0
votes
1answer
784 views

Logrotate files with timestamps in the names

Seems like it should work: "/usr/local/tomcat/logs/" { daily compress delaycompress copytruncate rotate 1 prerotate /usr/bin/find /usr/local/tomcat/logs/ -name stupidLogWithTimestamp* -size -10k -...
1
vote
0answers
102 views

Logrotate or scripting to manipulate log file

I want to make sure that a certain log file gets empty when it reaches a specific size. I first used logrotate since the man page says: It will not modify a log multiple times in one day unless ...
1
vote
0answers
98 views

How to set one job to run at precise time with anacron without losing config at next upgrade?

I want logrotate to run at a precise time daily. Currently it is set to run at some random time using anacron and I don't want to change the randomness factor for all the other jobs. I have ...
1
vote
1answer
2k views

Log rotation in Linux

Whenever I execute ls command in /var/log directory, I could find log files, e.g. messages, and their rotated versions, e.g. messages.1.gz. Even though I am not using any utility like logrotate, how ...
1
vote
1answer
8k views

dateformat use in logrotate

cat /etc/logrotate.d/syslog ... /var/log/messages { daily compress dateext dateformat "-%Y%m%d-%s" maxage 90 rotate 90 missingok notifempty size +4096k create ...
0
votes
1answer
265 views

Logrotate doesn't rotate logs

I'm new to Linux, and I want to use logrorate. The logs are written to /var/log/curLog/log.log. As mentioned in the documentation, I create a new file in /etc/logrotate.d/ with name currentLog. The ...