logrotate isn't rotating files any longer


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users logrotate isn't rotating files any longer
# 1  
Old 06-17-2009
logrotate isn't rotating files any longer

I have been using logrotate for quite awhile now. Most logs are rotated daily, using /etc/cron.daily. I noticed that the logs in question have not been rotated since April 6, but daily up to that point.

I have logrotate in /etc/cron.daily. The basic command is:

/usr/sbin/logrotate /etc/logrotate.conf

In /etc/logrotate.conf, I specify to rotate daily and keep 31 log files.

In /etc/logrotate.d, I have the various configuration files for the services for which log files are generated (httpd, ezproxy, etc).

I restarted cron.d, which was already running.

I ran logrotate -d /etc/logrotate.conf and can see that it looks at the various configuration files and gives directions to rotate daily and keep 31.

Can anyone shed light on why I am not getting rotation of these logs?
# 2  
Old 06-17-2009
Reply to my own message about logrotate and cron

I have discovered that cron.daily has not run since April 6. This explains why logrotate is not operating correctly. I have verified that crond is running, there are no scripts in cron.daily that have characters other than AZa-z0-9 and they are executable.

I assume that the system cron /etc/crontab runs automatically at the specified time, which is 4:20 am and it did until April 6.

I did restart crond and can test rotating some logs later, but I am wondering what may have happened to prevent cron.daily from running.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with rotating files

Hello: I have a script that gets the ACLs of the /home directory and its contents with getfacl and writes them to a file. The script is run by a cron job and I don't want it to rewrite or append to an already existing file. The point of backing permissions up is because I may need to restore them.... (2 Replies)
Discussion started by: Cacializ
2 Replies

2. UNIX for Beginners Questions & Answers

Logrotate and Compressing only yesterdays files

Hello, I have a syslog server at home and am currently experiencing an issue where my logs will rotate and compress however it will rotate and compress yesterdays file and the newly created log file for the current day. When it does this however it will also create another new file for today... (9 Replies)
Discussion started by: MyUserName7000
9 Replies

3. AIX

Logrotate - /etc/logrotate.conf does't exist

Hi Admins. I have installed logrotate rpm on Aix 6.1. After the installation of rpm, I don't find /etc/logrotate.conf file and /etc/logrotate.d dir . The config file is located in /opt/freeware/etc/logrotate.conf. When I ran logrotate -v /opt/freeware/etc/logrotate.conf I get below... (2 Replies)
Discussion started by: snchaudhari2
2 Replies

4. Shell Programming and Scripting

Logrotate - I am not able to rotate files using logrotate

I have written script which is working in Home directory perfectly and also compressing log files and rotating correctly. But, when i try to run script for /var/log/ i am able to get compressed log files but not able to get rotation of compressed log files. Please suggest. I am using below command... (5 Replies)
Discussion started by: VSom007
5 Replies

5. Red Hat

Logrotate not removing old files

Hi Guys, Need some help with the logrotate for one of our servers. I had setup a logrotation so that all files that go under old/ folder should be removed after one week. The log files are rotated daily from the main folder to old/ folder. (everything on one server) Below is the sample I am... (0 Replies)
Discussion started by: rockf1bull
0 Replies

6. Linux

Using logrotate to trim files that are created every 15 mins

I have an application (puppet) that generates report files every 15 minutes in the format: /var/lib/puppet/reports/hostname.fqdn/report-201007221515.yaml /var/lib/puppet/reports/hostname.fqdn/report-201007221530.yaml .. I only really need to keep one days worth of these reports and am trying... (0 Replies)
Discussion started by: aussieos
0 Replies

7. Shell Programming and Scripting

Monitoring specific string or keyword in rotating log files.

Hi there, I like to ask how i shall monitor specific string or keyword in rotating log files. e.g. I have at 10 rotating logfiles. I use the command below to grep the string, but eventually become non functional because the logfile rotates and new logfile is active. tail -f <logfile1> |grep... (1 Reply)
Discussion started by: shtobias
1 Replies

8. UNIX for Advanced & Expert Users

how to logrotate log files

Hi, I have written a script that runs every five minutes in cron schedular. The Operating system is Fedora core 9. This script generates 2 log files, these log file size is increasing as some log data is being dumped into these 2 log files every five minutes. I need to logrotate these 2 files.... (1 Reply)
Discussion started by: renuka
1 Replies

9. UNIX for Advanced & Expert Users

logrotate with /etc/logrotate.conf file

Hi there, I want to rotate the logfiles which are located in /var/log/jboss/tomcat* so I have created a file named as 'tomat' in /etc/logrotate.d/tomcat with the following content. # cat /etc/logrotate.d/tomcat /var/log/jboss/tomcat_access_log*.log { daily nocreate ... (2 Replies)
Discussion started by: skmdu
2 Replies

10. Solaris

rotating the syslogd and messages files

Im about to install a sunfreeware program called logrotate which does exactly what it says on the tin....just a quick question ..if its going to rename messages to messages.0 etc do I need to issue a HUP to syslogd after doing this or will the new messages file get created automatically cheers (2 Replies)
Discussion started by: hcclnoodles
2 Replies
Login or Register to Ask a Question