LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-24-2005, 07:44 AM   #1
tflavell
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Rep: Reputation: 0
problem with logrotate


Hi

Very new newbie here so be gentle with me !

I have run logrotate from the desktop and got the following message

error: etc/logrotate.conf:25 duplicate log entry for /var/log/wtmp and the log files were not rotated.
When I commented out the wtmp rotation script from the logrotate.conf file and tried again, the logrotate seemed to work ok.

Any ideas what may be causing this and how to rectify it ?

Thanks, Tony
 
Old 06-25-2005, 07:57 AM   #2
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Post /etc/logrotate.conf
The wtmp part should look something like:
Code:
/var/log/wtmp {
    missingok
    monthly
    create 0660 root utmp
    rotate 1
}
 
Old 06-27-2005, 04:17 AM   #3
tflavell
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
I tried setting up the WTMP script exactly as you suggested but I'm still getting the same message. Any ideas ?
 
Old 06-27-2005, 12:59 PM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Do you have an entry for wtmp in /etc/logrotate.d/ ?
Post logrotate.conf or have a look if you have /var/log/* there.
 
Old 07-01-2005, 02:47 PM   #5
tflavell
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Hi

Here is the wtmp entry in /etc/logrotate.d

/var/log/wtmp {
compress
dateext
maxage 365
rotate 99
size=+400k
notifempty
missingok
copytruncate
}


and here is my logrotate.conf

# see "man logrotate" for details
# rotate log weekly
#weekly

# rotate log daily
weekly

# keep 2 weeks worth of backlogs
rotate 2

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
compress

# uncomment these to switch compression to bzip2
#compresscmd /usr/bin/bzip2
#uncompresscmd /usr/bin/bunzip2

# 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
# create 0664 root utmp
# rotate 1

#}
# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0660 root utmp
rotate 1

}
# system-specific logs may be also be configured here.
 
Old 07-01-2005, 04:22 PM   #6
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Well, you rotate wtmp from both the entry in /etc/logrotate.d and from logrotate.conf, hence duplicate entries. Just comment out the part in logrotate.conf.
 
Old 07-04-2005, 04:32 AM   #7
tflavell
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Smile

That's done it. Many thanks for all 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
problem with logrotate pippet Linux - General 2 09-07-2004 02:23 AM
Logrotate Help! MaverickApollo Linux - Software 3 02-19-2004 01:09 PM
logrotate dominant Linux - Newbie 1 02-13-2004 10:28 AM
logrotate Rig24 Linux - Newbie 2 07-11-2003 06:08 AM
logrotate MrJoshua Linux - General 2 09-25-2002 10:55 AM

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

All times are GMT -5. The time now is 12:32 PM.

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