LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2012, 11:36 AM   #1
Linux_Kidd
Member
 
Registered: Jan 2006
Location: USA
Posts: 737

Rep: Reputation: 78
Logrotate help


suse ent server 11
logrotate-3.7.7-10.22

before i go into crazy details, does "size" in the rotate definition override the default "weekly" statement?
 
Old 03-08-2012, 11:44 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
as I understand it, it is taken into account at the time the rotation period occurs. so that would be "rotate weekly IF the size matches the requirements"
 
Old 03-08-2012, 11:49 AM   #3
mitofik
LQ Newbie
 
Registered: Sep 2008
Posts: 14

Rep: Reputation: 1
Code:
~ man logrotate
press "/"
write "maxsize"
read

gl
 
Old 03-08-2012, 11:57 AM   #4
Linux_Kidd
Member
 
Registered: Jan 2006
Location: USA
Posts: 737

Original Poster
Rep: Reputation: 78
chris,
i think that is "minsize" you speak of.

"size" will match when file is this size when logrotate runs, hence why i am wondering if "size" overrides the default "weekly".

i can get around this by creating a new conf and cron'ing logrotate as a daily, but didnt want to make it more convoluted, etc.


Quote:
Originally Posted by mitofik View Post
Code:
~ man logrotate
press "/"
write "maxsize"
read

gl
there is no "maxsize", but thanks for not checking before you post.

Last edited by Linux_Kidd; 03-08-2012 at 11:58 AM.
 
Old 03-08-2012, 12:07 PM   #5
mitofik
LQ Newbie
 
Registered: Sep 2008
Posts: 14

Rep: Reputation: 1
Let me be immature enough to respond
I wouldn't respond with "look for maxsize" instead of "look for size" if i hadn't checked first. i simply pointed you to the first place in that file with answer to your question.
Quote:
maxsize size
Log files are rotated when they grow bigger than size bytes even before
the additionally specified time interval (daily, weekly, monthly, or
yearly). The related size option is similar except that it is mutually
exclusive with the time interval options, and it causes log files to be
rotated without regard for the last rotation time. When maxsize is
used, both the size and timestamp of a log file are considered.

minsize size
Log files are rotated when they grow bigger than size bytes, but not
before the additionally specified time interval (daily, weekly, monthly,
or yearly). The related size option is similar except that it is mutu‐
ally exclusive with the time interval options, and it causes log files
to be rotated without regard for the last rotation time. When minsize
is used, both the size and timestamp of a log file are considered.

(...)

size size
Log files are rotated only if they grow bigger then size bytes. If size
is followed by k, the size is assumed to be in kilobytes. If the M is
used, the size is in megabytes, and if G is used, the size is in giga‐
bytes. So size 100, size 100k, size 100M and size 100Gare all valid.
i do have newer version of logrotate so yea, could be a bit different on your machine.
 
Old 03-08-2012, 12:22 PM   #6
Linux_Kidd
Member
 
Registered: Jan 2006
Location: USA
Posts: 737

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by mitofik View Post
i do have newer version of logrotate so yea, could be a bit different on your machine.
perhaps so, hence why i (1) gave the version i was specifically referencing, and (2) specifically said "size".

i am gonna go with new conf and cron logrotate, the suse default setup is dumb.

solved.

Last edited by Linux_Kidd; 03-08-2012 at 12:25 PM.
 
Old 03-08-2012, 12:31 PM   #7
mitofik
LQ Newbie
 
Registered: Sep 2008
Posts: 14

Rep: Reputation: 1
ok, i'm sincerely sorry for pointing you toward the manual, since you couldn't find the answer to your question there. does this mean your question is still open?
i'm thankful for pointing out that i should write only "RTFM"

EDIT
solved after all.

gl

Last edited by mitofik; 03-08-2012 at 12:33 PM.
 
Old 03-08-2012, 12:34 PM   #8
Linux_Kidd
Member
 
Registered: Jan 2006
Location: USA
Posts: 737

Original Poster
Rep: Reputation: 78
Quote:
Originally Posted by mitofik View Post
ok, i'm sincerely sorry for pointing you toward the manual, since you couldn't find the answer to your question there. does this mean your question is still open?
i'm thankful for pointing out that i should write only "RTFM"
i had already gone through man 3-4 times. did you notice the big "[SOLVED]" in the title of this thread, and i also wrote "solved" in post #6, this would indicate that it is no longer a open question.

Last edited by Linux_Kidd; 03-08-2012 at 12:35 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Logrotate ckiran04 Linux - Server 1 02-04-2012 12:37 AM
[SOLVED] logrotate or logrotate.conf; problems with sftp slufoot80 Linux - Server 1 11-05-2011 07:50 AM
About logrotate satimis *BSD 1 05-27-2007 01:08 PM
logrotate sidra Red Hat 10 08-01-2006 01:05 AM
Logrotate - did I get it right? Swakoo Linux - General 1 06-20-2006 05:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration