[Cialug] logrotation help for RHEL 6
Daniel A. Ramaley
daniel.ramaley at drake.edu
Tue Jan 27 13:25:05 CST 2015
I've never set up log rotation specifying both a period ("daily") and a
size ("size 512M"). Normally one specifies either a period (such as
daily) or a maximum size, but not both.
>From the logrotate.conf(8) on an RHEL6 box: "Log files are rotated only
if they grow bigger then size bytes." So i think if you specify a size
that the logs won't rotate until they grow large enough.
On 2015-01-27 at 15:51:24 Kelly Slaugh wrote:
> Hello Everyone,
>
> I've been working on troubleshooting why a particular config file will
> not rotate daily as I've set the config file to do. Here is my
> config file details minus actual path.
>
> /path/to/directory/logs/*log {
> daily
> missingok
> rotate 32
> notifempty
> size 512M
> compress
> delaycompress
> create 644 apache apache
> sharedscripts
> postrotate
> /sbin/service httpd reload > /dev/null 2>/dev/null ||
> true /sbin/service nginx reload > /dev/null 2>/dev/null || true
> endscript
> }
>
> I'm having to reload nginx as well has apache because the logs that
> are stored are apache and nginx logs. And as we know apache and
> nginx will not start using the logs unless they are reloaded. The
> config file is stored in the /etc/logrotate.d/ directory. Everything
> works on the weekly rotation set up in the /etc/logrotate.conf file.
> However, from my research and knowledge isn't logrotate supposed to
> rotate the files based off the config file settings?
>
> Any help or ideas would be greatly appreciated.
>
> Thank you
>
> Kelly S.
>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
__
Daniel A. Ramaley | Network Engineer 2
Drake Technology Services (DTS) | Drake University
T: +1 515 271-4540
F: +1 515 271-1938
E: daniel.ramaley at drake.edu
More information about the Cialug
mailing list