LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Thread Tools
Old 04-19-2003, 10:25 PM   #1
Manuel-H
Member
 
Registered: Apr 2003
Distribution: Slackware
Posts: 94
Thanked: 0
slackware logrotate help needed


[Log in to get rid of this advertisement]
I would like to keep my maillog for one month before rotating it.

I did add monthly on the /etc/logrotate.d/syslog file but it has not effect.
Currently the maillog file is rotated every Sunday.

I do not wish to change the default for all other logs which is defaulted to weekly in the /etc/logrotate.conf file.

Any suggestions and help will be greatly appreciated.
Manuel-H is offline     Reply With Quote
Old 04-19-2003, 10:57 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,732
Blog Entries: 4
Thanked: 0
We will probably need to see your logrotate configuration file...
bulliver is offline     Reply With Quote
Old 04-19-2003, 11:35 PM   #3
Manuel-H
Member
 
Registered: Apr 2003
Distribution: Slackware
Posts: 94
Thanked: 0

Original Poster
my conf files (rather long)

My three files
/etc/cron.daily/logrotate
/etc/logrotate.conf
/etc/logrotate.d/syslog

Take a look at maillog - I have added "monthly" to it.
Another way around it is to remark it out and do it manually.
But I think it can be done using logrotate.

/etc/cron.daily/logrotate
********************************************
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf

/etc/logrotate.conf
*****************************************
# 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

# some packages install log rotation information in this directory:
include /etc/logrotate.d

# Rotate /var/log/wtmp:
/var/log/wtmp {
monthly
create 0664 root root
rotate 1
}


/etc/logrotate.d/syslog
****************************************************
/var/log/cron {
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
endscript
}

/var/log/debug {
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
endscript
}

/var/log/maillog {
monthly
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

/var/log/messages {
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

/var/log/secure {
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

/var/log/spooler {
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

/var/log/syslog {
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
Manuel-H is offline     Reply With Quote
Old 07-10-2003, 08:56 AM   #4
tf4
LQ Newbie
 
Registered: Jul 2003
Posts: 1
Thanked: 0
I would really like to see this

I am having the same issue, did you find an answer? I would like to rotate certain log files daily and then keep them for 30 days but I don't want the system log files rotated daily, just too much mess :P
tf4 is offline     Reply With Quote
Old 07-11-2003, 09:56 AM   #5
Manuel-H
Member
 
Registered: Apr 2003
Distribution: Slackware
Posts: 94
Thanked: 0

Original Poster
add 'monthly' in /etc/logrotate.d/syslog file
Manuel-H is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
help needed...reg. slackware arunsri Linux - Laptop and Netbook 1 03-14-2005 06:59 PM
Slackware 10 needed in Arad, Romania Rajahuroman Slackware 3 07-12-2004 07:59 AM
help needed from Slackware users hasan Slackware 9 12-10-2003 07:38 PM
Slackware - Advice Needed Rjf90 Slackware 7 12-15-2002 10:06 PM
Slackware 8.0 Help Needed!!! Fast!!! Eits0 Linux - General 3 06-19-2002 06:04 PM


All times are GMT -5. The time now is 11:50 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration