I had to configure logrotate on a server configured by other system-network administration. First of all I detected that there is no crond, so I had to install sudo yum install vixie-cron
. All other setup seems ok /etc/cron.daily/logrotate
file exists. Next I ran sudo logrotate -d -f logrotate.conf
to check how it will works. At the end of execution I see this:
rotating pattern: /var/log/btmp forced from command line (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/btmp
log needs rotating
rotating log /var/log/btmp, log->rotateCount is 1
dateext suffix '-20131004'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
renaming /var/log/btmp to /var/log/btmp-20131004
creating new /var/log/btmp mode = 0600 uid = 0 gid = 22
But nothing happens with /var/log/btmp
still same size, and /var/log/btmp-20131004
not exists.