The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 02-01-2008
dvrmc dvrmc is offline
Registered User
 

Join Date: Jan 2008
Posts: 2
Hi,
Thanks for the reply.My file looks something like this

/var/log/sm/* {
olddir /var/log/stdir/sm
size 10k
daily
/* some scripts in postrotate */
}
/var/log/abs/* {
olddir /var/log/stdir/abs
size 1M
weeekly
/* some scripts in postrotate */
}

I put this file inside /etc/logrotate.d/
I have a cronjob running logrotate every minute.

-The problem is that when both size and daily/weekly/monthly/yearly are specified for a particular log, rotation takes place only according to the second parameter from the top in-order.

Ex:
CASE 1:
/var/log/sm/* {
olddir /var/log/stdir/sm
size 10k
daily
/* some scripts in postrotate */
}

In this case, logs are rotated only based on time....ie daily ...rotation based on size isn't working.

CASE 2:
/var/log/sm/* {
olddir /var/log/stdir/sm
daily
size 10k
/* some scripts in postrotate */
}
In this case, logs are rotated only based on size....ie 10k ...daily rotation isn't working.

CASE 3:
If only either size or daily/weekly/monthly/yearly is present, the logs are rotated accordingly.The problem arises only when both are used in conjunction.

I have tried rpms 3.7.4-13 and 3.7.4-14 for fc6 . Its the same with both of them. Is this a bug yet to be solved?If its solved, plz let me know the updated rpm for fc6.

Regards,
Chowdary.
Reply With Quote