Logrotate.conf

Hey Admins,

I have installed logrotate on AIX server. I want to configure it for

  1. /var/log/messages � keep 90 days, i.e., weekly rotate 13
  2. Syslog � keep 90 days i.e., weekly rotate 13
  3. Wtmp � keep 90 days i.e., weekly rotate 13
  4. Sulog � keep 90 days i.e., weekly rotate 13

What changes/modifications I need to in default logrotate.conf file?

# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

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

# use date as a suffix of the rotated file
dateext

# 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 and btmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
        minsize 1M
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0600 root utmp
    rotate 1
}

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

Well, I've only had experience of AIX up to 6.1.8.2 (from 3.2 onwards :o) and so far, they have all used the same syslogd daemon rather than what I now have on Linux, the rsyslogd daemon, so I'm a bit confused. :confused:

If you are using syslogd, can you post the content of /etc/syslog.conf as the configuration for size/rotation is controlled within there.

If you have AIX 7, then perhaps that has changed to the daft rsyslogd which requires this (usually) cron based log rotator.

Can you confirm which is running?

Thanks, :cool:
Robin
Liverpool/Blackburn
UK