![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disabling logrotate | primal | UNIX for Dummies Questions & Answers | 2 | 04-14-2008 10:19 AM |
| Log rotation on HP-UX | untamed | HP-UX | 3 | 10-01-2007 03:10 AM |
| What are tr.pid.rotation files? | zackz | UNIX for Advanced & Expert Users | 3 | 01-23-2007 01:13 PM |
| logrotate.conf | fredao | UNIX for Advanced & Expert Users | 10 | 12-19-2006 05:57 AM |
| Log Rotation Tool/Script | yelalouf | Shell Programming and Scripting | 4 | 12-17-2003 05:27 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
logrotate doesn't do daily rotation....help required
Hi,
I am using logrotate 3.7.4-13 -When i specify both "size" and "daily/weekly/monthly" , the logs are being rotated only based on size and the period is not being considered. -When i just specify "daily/weekly/monthly" (with no size parameter), the logs are being rotated accordingly. Would like to know what the problem is. If its a bug,Was it fixed in the latest rpms? One more question - How does "daily rotation" work? Is the file rotated after 24hrs from its time of creation? or at 00:01 everyday?? Btw, I have a cronjob that runs every minute. My requirement is that, log files are to be rotated based on both size and period which ever comes first. Last edited by dvrmc; 01-31-2008 at 04:23 AM. Reason: incomplete description for someone to suggest a solution |
| Forum Sponsor | ||
|
|
|
|||
|
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. |
|||
| Google The UNIX and Linux Forums |