LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2011, 04:43 AM   #1
ankitjainfsl
LQ Newbie
 
Registered: Aug 2011
Posts: 9

Rep: Reputation: Disabled
Logrotate not working


Hi All,

I am using RHEL 5.5.2 Machine.In this logrotation is not happening correctly.I have checked /etc/logrotate.conf file & logrotate.d all files are OK.In cron.daily enytry is also there in place.But what i can see /var/lib/logrotate.status is continously updating.

Any idea what could be the cause. ?

Regards

Ankit
 
Old 09-09-2011, 06:11 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,354
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Quote:
Originally Posted by ankitjainfsl View Post
logrotation is not happening correctly.
Please be specific. Running 'logrotate -df > /path/to/debug.log 2>&1' and posting the output, possibly accompanied with the contents of any related /etc/logrotate.d/* configuration files, may help.
 
Old 09-05-2012, 02:22 AM   #3
ankittrivedi9
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
Hi ,
I am also facing errors with logrotate not getting triggered automatically ,

I ran #logrotate -d -f /etc/logrotate.conf
and got the below error:

reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file acpid
reading config info for /var/log/acpid
reading config file conman
error: error accessing /var/log/conman: No such file or directory
error: conman:5 glob failed for /var/log/conman/*

I created the directory /var/log/conman and /var/log/conman.old and ran the command
#logrotate -d -v /etc/logrotate.conf
It didnt gave any errors.
When I saw the next day the daily logs of psacct service were getting rotated. But in few of the machines, this action didnt trigger the the cron.daily job and I am facing the problem on a few servers still. I am posting the debug mode details of the machine on which this is not working .

The status of pacct in /var/lib/logrotate.status is of 3/9/12 which was manually run by myself.

------------------------------------------------------------

[root@machine account]# cat /var/lib/logrotate.status
logrotate state -- version 2
"/var/log/acpid" 2012-8-30
"/var/log/cups/error_log" 2008-10-28
"/var/log/mgetty.log.tty[^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.]" 2008-10-24
"/var/log/mgetty.log.unknown" 2008-10-24
"/var/log/mgetty.callback" 2008-10-24
"/var/log/ppp/connect-errors" 2008-10-24
"/var/account/pacct" 2012-9-4
"/var/log/rpmpkgs" 2012-8-30
"/var/log/snmpd.log" 2012-9-3
"/var/log/messages" 2012-9-3
"/var/log/secure" 2012-9-3
"/var/log/maillog" 2012-9-3
"/var/log/spooler" 2012-9-3
"/var/log/boot.log" 2012-9-3
"/var/log/cron" 2012-9-3
"/var/log/up2date" 2012-9-3
"/var/log/wtmp" 2012-8-30
"/var/log/xferlog" 2012-9-3
"/var/log/hp-snmp-agents/cma.log" 2012-8-30
[root@machine account]# logrotate -d -v /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file acpid
reading config info for /var/log/acpid
reading config file cups
reading config info for /var/log/cups/*_log
reading config file hp-snmp-agents
reading config info for /var/log/hp-snmp-agents/cma.log
reading config file mgetty
reading config info for /var/log/mgetty.log.tty[^.] /var/log/mgetty.log.tty[^.][^.] /var/log/mgetty.log.tty[^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.unknown /var/log/mgetty.callback
reading config file ppp
reading config info for /var/log/ppp/connect-errors
reading config file psacct
reading config info for /var/account/pacct
reading config file rpm
reading config info for /var/log/rpmpkgs
reading config file snmpd
reading config info for /var/log/snmpd.log
reading config file syslog
reading config info for /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron
reading config file up2date
reading config info for /var/log/up2date
reading config file vsftpd.log
reading config info for /var/log/xferlog
reading config info for /var/log/wtmp

Handling 12 logs

rotating pattern: /var/log/acpid 65536 bytes (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/acpid
log does not need rotating

rotating pattern: /var/log/cups/*_log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cups/error_log
log does not need rotating
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/hp-snmp-agents/cma.log 5242880 bytes (5 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/hp-snmp-agents/cma.log
log does not need rotating

rotating pattern: /var/log/mgetty.log.tty[^.] /var/log/mgetty.log.tty[^.][^.] /var/log/mgetty.log.tty[^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.unknown /var/log/mgetty.callback weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/mgetty.log.tty[^.]
log /var/log/mgetty.log.tty[^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.]
log /var/log/mgetty.log.tty[^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.unknown
log /var/log/mgetty.log.unknown does not exist -- skipping
considering log /var/log/mgetty.callback
log /var/log/mgetty.callback does not exist -- skipping

rotating pattern: /var/log/ppp/connect-errors after 1 days (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/ppp/connect-errors
log /var/log/ppp/connect-errors does not exist -- skipping

rotating pattern: /var/account/pacct after 1 days (31 rotations)
empty log files are not rotated, old logs are removed
considering log /var/account/pacct
log needs rotating
rotating log /var/account/pacct, log->rotateCount is 31
previous log /var/account/pacct.1 does not exist
renaming /var/account/pacct.31.gz to /var/account/pacct.32.gz (rotatecount 31, logstart 1, i 31),
renaming /var/account/pacct.30.gz to /var/account/pacct.31.gz (rotatecount 31, logstart 1, i 30),
renaming /var/account/pacct.29.gz to /var/account/pacct.30.gz (rotatecount 31, logstart 1, i 29),
renaming /var/account/pacct.28.gz to /var/account/pacct.29.gz (rotatecount 31, logstart 1, i 28),
renaming /var/account/pacct.27.gz to /var/account/pacct.28.gz (rotatecount 31, logstart 1, i 27),
renaming /var/account/pacct.26.gz to /var/account/pacct.27.gz (rotatecount 31, logstart 1, i 26),
renaming /var/account/pacct.25.gz to /var/account/pacct.26.gz (rotatecount 31, logstart 1, i 25),
renaming /var/account/pacct.24.gz to /var/account/pacct.25.gz (rotatecount 31, logstart 1, i 24),
renaming /var/account/pacct.23.gz to /var/account/pacct.24.gz (rotatecount 31, logstart 1, i 23),
renaming /var/account/pacct.22.gz to /var/account/pacct.23.gz (rotatecount 31, logstart 1, i 22),
renaming /var/account/pacct.21.gz to /var/account/pacct.22.gz (rotatecount 31, logstart 1, i 21),
renaming /var/account/pacct.20.gz to /var/account/pacct.21.gz (rotatecount 31, logstart 1, i 20),
renaming /var/account/pacct.19.gz to /var/account/pacct.20.gz (rotatecount 31, logstart 1, i 19),
renaming /var/account/pacct.18.gz to /var/account/pacct.19.gz (rotatecount 31, logstart 1, i 18),
renaming /var/account/pacct.17.gz to /var/account/pacct.18.gz (rotatecount 31, logstart 1, i 17),
renaming /var/account/pacct.16.gz to /var/account/pacct.17.gz (rotatecount 31, logstart 1, i 16),
renaming /var/account/pacct.15.gz to /var/account/pacct.16.gz (rotatecount 31, logstart 1, i 15),
renaming /var/account/pacct.14.gz to /var/account/pacct.15.gz (rotatecount 31, logstart 1, i 14),
renaming /var/account/pacct.13.gz to /var/account/pacct.14.gz (rotatecount 31, logstart 1, i 13),
renaming /var/account/pacct.12.gz to /var/account/pacct.13.gz (rotatecount 31, logstart 1, i 12),
renaming /var/account/pacct.11.gz to /var/account/pacct.12.gz (rotatecount 31, logstart 1, i 11),
renaming /var/account/pacct.10.gz to /var/account/pacct.11.gz (rotatecount 31, logstart 1, i 10),
renaming /var/account/pacct.9.gz to /var/account/pacct.10.gz (rotatecount 31, logstart 1, i 9),
renaming /var/account/pacct.8.gz to /var/account/pacct.9.gz (rotatecount 31, logstart 1, i 8),
renaming /var/account/pacct.7.gz to /var/account/pacct.8.gz (rotatecount 31, logstart 1, i 7),
renaming /var/account/pacct.6.gz to /var/account/pacct.7.gz (rotatecount 31, logstart 1, i 6),
renaming /var/account/pacct.5.gz to /var/account/pacct.6.gz (rotatecount 31, logstart 1, i 5),
renaming /var/account/pacct.4.gz to /var/account/pacct.5.gz (rotatecount 31, logstart 1, i 4),
renaming /var/account/pacct.3.gz to /var/account/pacct.4.gz (rotatecount 31, logstart 1, i 3),
renaming /var/account/pacct.2.gz to /var/account/pacct.3.gz (rotatecount 31, logstart 1, i 2),
renaming /var/account/pacct.1.gz to /var/account/pacct.2.gz (rotatecount 31, logstart 1, i 1),
renaming /var/account/pacct.0.gz to /var/account/pacct.1.gz (rotatecount 31, logstart 1, i 0),
running prerotate script
running script with arg /var/account/pacct: "
if [ -f /var/lock/subsys/psacct ]; then
/usr/sbin/accton
fi
"
renaming /var/account/pacct to /var/account/pacct.1
creating new log mode = 0600 uid = 0 gid = 0
running postrotate script
running script with arg /var/account/pacct: "
if [ -f /var/lock/subsys/psacct ]; then
/usr/sbin/accton /var/account/pacct
fi
"
removing old log /var/account/pacct.32.gz

rotating pattern: /var/log/rpmpkgs weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/rpmpkgs
log needs rotating
rotating log /var/log/rpmpkgs, log->rotateCount is 4
renaming /var/log/rpmpkgs.4 to /var/log/rpmpkgs.5 (rotatecount 4, logstart 1, i 4),
renaming /var/log/rpmpkgs.3 to /var/log/rpmpkgs.4 (rotatecount 4, logstart 1, i 3),
renaming /var/log/rpmpkgs.2 to /var/log/rpmpkgs.3 (rotatecount 4, logstart 1, i 2),
renaming /var/log/rpmpkgs.1 to /var/log/rpmpkgs.2 (rotatecount 4, logstart 1, i 1),
renaming /var/log/rpmpkgs.0 to /var/log/rpmpkgs.1 (rotatecount 4, logstart 1, i 0),
renaming /var/log/rpmpkgs to /var/log/rpmpkgs.1
creating new log mode = 0644 uid = 0 gid = 0
removing old log /var/log/rpmpkgs.5

rotating pattern: /var/log/snmpd.log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/snmpd.log
log does not need rotating

rotating pattern: /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/messages
log does not need rotating
considering log /var/log/secure
log does not need rotating
considering log /var/log/maillog
log does not need rotating
considering log /var/log/spooler
log does not need rotating
considering log /var/log/boot.log
log does not need rotating
considering log /var/log/cron
log does not need rotating
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/up2date weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/up2date
log does not need rotating

rotating pattern: /var/log/xferlog weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/xferlog
log does not need rotating

rotating pattern: /var/log/wtmp 1048576 bytes (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/wtmp
log does not need rotating

---------------------------------------------
 
Old 09-10-2012, 02:29 AM   #4
ankittrivedi9
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
Hi Friends,

Any idea of the above problem with the rotation of logs..

Thanks in advance for your help...
 
  


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
logrotate invent Linux - Enterprise 1 08-19-2008 08:45 AM
logrotate Ronin_tekorei Linux - Newbie 2 02-07-2008 05:44 AM
logrotate sidra Red Hat 10 08-01-2006 01:05 AM
Logrotate Help! MaverickApollo Linux - Software 3 02-19-2004 12:09 PM
logrotate dominant Linux - Newbie 1 02-13-2004 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration