LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux 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
  Search this Thread
Old 04-19-2003, 09:25 PM   #1
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Rep: Reputation: 15
slackware logrotate help needed


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.
 
Old 04-19-2003, 09:57 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
We will probably need to see your logrotate configuration file...
 
Old 04-19-2003, 10:35 PM   #3
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Original Poster
Rep: Reputation: 15
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
}
 
Old 07-10-2003, 07:56 AM   #4
tf4
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 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
 
Old 07-11-2003, 08:56 AM   #5
Manuel-H
Member
 
Registered: Apr 2003
Location: Singapore
Distribution: Slackware32/64, Ubuntu, Fedora, RHEL
Posts: 138

Original Poster
Rep: Reputation: 15
add 'monthly' in /etc/logrotate.d/syslog file
 
  


Reply



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 On
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 05:59 PM
Slackware 10 needed in Arad, Romania Rajahuroman Slackware 3 07-12-2004 06:59 AM
help needed from Slackware users hasan Slackware 9 12-10-2003 06:38 PM
Slackware - Advice Needed Rjf90 Slackware 7 12-15-2002 09:06 PM
Slackware 8.0 Help Needed!!! Fast!!! Eits0 Linux - General 3 06-19-2002 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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