named logs are not rotated upon logroate configuration in Red Hat Enterprise Linux 6
Issue
- DNS queries are captured in a file /var/log/query.log.
- I planned to create a logrotate for 75MB and upto 2 backup files due to a limitation of storage size.
- I moved logrotate cron job into cron.hourly.
- DNS server's log rotate works, but it didn't happen hourly. It happened in smaller period like 20 minutes.
# ll -h /var/log/query.log*
-rw-r--r-- 1 named named 114M Mar 30 14:24 /var/log/query.log
-rw-r--r-- 1 named named 201M Mar 30 14:13 /var/log/query.log.0
-rw-r--r-- 1 named named 201M Mar 30 13:53 /var/log/query.log.1
-rw-r--r-- 1 named named 201M Mar 30 13:33 /var/log/query.log.2
- Why is it rotated upon the defined logrotate configuration?
Environment
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.