Solved

logrotate is not working please help

Posted on 2013-05-28
4
396 Views
Last Modified: 2013-05-29
Hi All,

I am facing issues with logrotate which is not working after some troubleshooting i am able to run the logrotate but some are working and many are not please help what could be the issue...
 

we tried to run llogrotate forecly logrotate -d -f /etc/logrotate.conf , however no rotation happened
0
Comment
Question by:apunkabollywood
  • 2
  • 2
4 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39200703
Please post /etc/logrotate.conf as well as the included files from /etc/logrotate.d (if any).

Has anything changed? Configuration? OS upgrade? logrotate upgrade?
Target dir(s) for rotated files full/defect (if any)?

What exactly were the "issues" you mentioned anyway?
0
 

Author Comment

by:apunkabollywood
ID: 39200794
/var is getting to be full
logrotate seems to be not working correctly

cat /etc/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



include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
minsize 1M
create 0664 root utmp
rotate 1
}
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 39200823
What do you mean with "/var is getting to be full"?

Is it full/nearly full/a bit full?

You're rotating the wtmp file as soon as it would reach a size of 1 M, but not more frequéntly than once a month. So it might be that wtmp becomes too big during that month to fit into /var.

I can't see any further reason why logrotate should fail.

Did you post the complete logrotate configuration or just a sample?

Try running logrotate with the "-v" flag to get more verbose output.

Or try the "-d" flag for debugging. Use of this flag will inhibit the actual rotation.
0
 

Author Closing Comment

by:apunkabollywood
ID: 39204263
It works some typo errors
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question