LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-31-2010, 10:09 PM   #1
Arty Ziff
Member
 
Registered: May 2008
Location: Tacoma, WA
Distribution: CentOS and RHEL
Posts: 124

Rep: Reputation: 15
Logs not rotating


The log files in /var/log/httpd are not rotating. What should I check? Is there a was to run the rotation manually?

Here's what's in /etc/logrotate.conf
Code:
# 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

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
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
}

# system-specific logs may be also be configured here.

Last edited by Arty Ziff; 12-31-2010 at 10:30 PM.
 
Old 01-01-2011, 12:25 AM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
You need to post the contents of the /etc/logrotate.d directory.
 
Old 01-01-2011, 01:55 AM   #3
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
You certainly can run the rotate manually, using the -f option to logrotate if I remember right. Check the compare for full details, but if it's just the httpd logs then as above I would be looking at the httpd config in logrotate.d, if it even exists.
 
Old 01-01-2011, 03:53 PM   #4
Arty Ziff
Member
 
Registered: May 2008
Location: Tacoma, WA
Distribution: CentOS and RHEL
Posts: 124

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by andrewthomas View Post
You need to post the contents of the /etc/logrotate.d directory.
This:
Quote:
acpid conman cups httpd mgetty named ppp proftpd psacct quagga rpm samba setroubleshoot squid syslog tux vsftpd.log wpa_supplicant yum
And the file httpd:
Code:
/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    postrotate
        /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}
 
Old 01-01-2011, 04:31 PM   #5
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
So run logrotate manually, and see what the verbose output says about the config files as they are written. Are other files bring successfully rotated?
 
Old 01-04-2011, 01:51 AM   #6
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
logrotate use cron to rotate. If you don't install cron packages, log will not rotated.
/etc/cron.daily/logrotate

Make sure below packages are installed
crontabs.noarch
vixie-cron.i386
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Rotating logs in squid 2.7 stable9 arunabh_biswas Linux - Server 3 08-16-2010 02:18 AM
Problem rotating Postfix logs keyF Linux - Software 3 08-30-2006 07:56 AM
Samba logs rotating like crazy josephswagner Linux - Software 1 07-07-2004 09:55 AM
problems rotating logs uros678 Linux - Software 0 12-15-2003 02:55 AM
Squid and rotating logs using crond 80s Linux - Software 0 02-21-2003 03:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:37 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