Solved

logrotate is not working please help

Posted on 2013-05-28
4
402 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

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…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

820 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