The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
23 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
30 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: ...
0
votes
0answers
21 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 ...
1
vote
1answer
35 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
33 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
42 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: ...
1
vote
1answer
83 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
37 views

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

How to keep log file size to 1M. Delete old logs in a log file after log file size reached 1M size. Not deleting log file.
0
votes
1answer
349 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
15 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
107 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
106 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
166 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
21 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 ...
0
votes
0answers
68 views

Rsyslog logs retransmitted after log rotation

I have config setup on all my CentOS servers to forward all syslog messages to a Graylog server via rsyslog. In Graylog I have then configured streams to alert on the occurrence of certain message ...
1
vote
1answer
73 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
275 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
242 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 ...
1
vote
1answer
310 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
101 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 ...
0
votes
2answers
309 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
380 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
69 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 ...
0
votes
0answers
44 views

Log rotate - not copying the all file

I'm running a script to monitor the load of my server with the "top" command. t's called monitor I use logrotate to rotate the output file and save it every day. For this I have a crontab configured. ...
1
vote
0answers
37 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
199 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 ...
0
votes
0answers
62 views

How will logrotate delete customly named logs?

If someone would do a: vi /etc/logrotate.d/syslog # to the "/var/log/messages" part: lastaction OLDLOGFILENAME=$(ls -1t /var/log/messages* | grep gz | head -1) NEWLOGFILENAME=$(echo ...
0
votes
1answer
3k 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
0answers
156 views

logrotate not working as intended

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 # ...
0
votes
1answer
113 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 ...
3
votes
1answer
298 views

“tail -f” show old file after file has been rotated [duplicate]

I have a script running continuously, reading tail -f /var/log/daemon.log The problem is, when the file /var/log/daemon.log gets rotated by logrotate, tail still has "file handle" for the old ...
2
votes
0answers
232 views

Logrotate no longer reads symlinked configuration file due to non-root ownership

We are currently upgrading from Ubuntu 12.04 LTS to 14.04 LTS on our ruby on rails application servers, and have noticed that the log files are no longer rotating. On both machines we have a file ...
5
votes
1answer
499 views

Rotating log files while process still running

I have a process running that writes standard output and standard error to a log file /var/log/dragonturtle.log. Is there anyway to rotate the log file, and have the process continuing to write to the ...
2
votes
0answers
392 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 ...
1
vote
0answers
208 views

logrotate error “error: error opening /home/web/logs/dev.log.10: No such file or directory”

In a run, sometimes I get such type of errors for any of the log file. Below is my configuration: /home/web/logs/*.log.* { missingok copytruncate olddir rotate rotate 5000 compress ...
2
votes
1answer
47 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 ...
1
vote
1answer
678 views

logrotate unable to rotate logs

logrotate is unable to rotate my logs. I have checked the file permissions, they are fine. I have even tried by putting "su root root" in the configuration file, still I am facing the same issue. ...
2
votes
1answer
319 views

Logrotate behaving unexpectedly

Find below the logrotate configuration that I'm using /usr/local/nagios/var/nagios.log { copytruncate daily rotate 7 compress missingok size 100M } And I could notice that ...
0
votes
2answers
396 views

logrotate log file with enging date issue

We have following log files, log file with ending with date catalina.out.2014-02-01 catalina.out.2014-02-02 catalina.out.2014-02-03 catalina.out.2014-02-04 catalina.out.2014-02-05 ...
0
votes
0answers
3k views

why daily cron isn't running on CentOS 6?

I have a daily cronjob set up on CentOS 6 OS which should look after the log rotation job. The file is /etc/cron.daily/logrotate and it's contents are #!/bin/sh /usr/sbin/logrotate ...
4
votes
1answer
225 views

Keeping copies of the X log file on Debian

I recently tried to replace my Nvidia driver with the Nouveau driver for my Nvidia card, (see Switching from Nvidia proprietary driver to Nouveau driver for Nvidia card on Debian wheezy). ...
1
vote
2answers
2k 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
793 views

logrotate won't truncate original file

I have this conf for my logrotate: /tmp/snmp.log { daily rotate 12 missingok notifempty copytruncate dateext } but it won't truncate the original file. it logrotates but ...
1
vote
1answer
404 views

Logrotate not picking up or acting on new configuration file

I had a logrotate configuration file set up for a log (let's call it Log1). It is working fine and the log is rotating everyday as expected. Yesterday I cloned this set up and modified it for three ...
3
votes
1answer
6k views

Activity Logging Level in SFTP

I'm using CentOS, i have already figured out how to enable the SFTP Logging. After that when i test it by using FileZilla (from User-end) and tail -f /var/log/sftp.log from the Server, all the ...
1
vote
2answers
2k views

Use logrotate to store 7 daily, 4 weekly and 12 yearly db backups

I've been trying to use logrotate to store a database backup for: last 7 days (daily) last 4 weeks (weekly) last 12 months (monthly) I've done a logrotate script like this, but only the daily ...
10
votes
4answers
24k 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?
3
votes
3answers
4k views

solution to rotate log files

I am running a daemon process that will have to run indefinitely (a 'service' so to speak) and wish to log its output. A simple solution like: ./long-running-process > log.out & ... fails as ...
1
vote
0answers
74 views

Smarter log rotation

I want to reduce the amount of logs in my system, but reduce them smartly. The general idea is, each time you rotate, look for any warning/error/critical level logs, and keep 2 minutes of log context ...
1
vote
1answer
319 views

logrotate custom “rotate” action equivalent for upstart?

In lots of online posts regarding how to rotate your iptables log files, for example here rsyslog config files get reloaded by the postrotate option of logrotate, presumably in order to stop rsyslog ...