<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic logrotate question/problem in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813392#M23984</link>
    <description>I rotate my logs daily, but am having a problem with my maillog growing too large.  It does not seem to be adhering to the parameters set in /etc/logrotate.conf.  Here is what I have in /etc/logrotate.conf.  I expect to keep 4 versions of any log and don't expect the log to grow greater than 100M at any time.  Below is my /etc/logrotate.conf.  Shouldn't "size 100M" do what I expect. i.e. rotate the logs  when it hits 100M.  /var/log/maillog is defined in /etc/logrotate.d/syslog.  What am I missing?    &lt;BR /&gt;&lt;BR /&gt;# see "man logrotate" for details&lt;BR /&gt;# rotate log files weekly&lt;BR /&gt;#weekly&lt;BR /&gt;&lt;BR /&gt;# commented out weekly and changed to size due to e-mail errors&lt;BR /&gt;size 100M&lt;BR /&gt;&lt;BR /&gt;# keep 4 weeks worth of backlogs&lt;BR /&gt;rotate 4&lt;BR /&gt;&lt;BR /&gt;# create new (empty) log files after rotating old ones&lt;BR /&gt;create&lt;BR /&gt;&lt;BR /&gt;# uncomment this if you want your log files compressed&lt;BR /&gt;#compress&lt;BR /&gt;&lt;BR /&gt;# RPM packages drop log rotation information into this directory&lt;BR /&gt;include /etc/logrotate.d&lt;BR /&gt;&lt;BR /&gt;# no packages own wtmp -- we'll rotate them here&lt;BR /&gt;/var/log/wtmp {&lt;BR /&gt;  monthly&lt;BR /&gt;    create 0664 root utmp&lt;BR /&gt;    rotate 1&lt;BR /&gt;}&lt;BR /&gt;</description>
    <pubDate>Tue, 27 Jun 2006 11:48:29 GMT</pubDate>
    <dc:creator>joseph wholey</dc:creator>
    <dc:date>2006-06-27T11:48:29Z</dc:date>
    <item>
      <title>logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813392#M23984</link>
      <description>I rotate my logs daily, but am having a problem with my maillog growing too large.  It does not seem to be adhering to the parameters set in /etc/logrotate.conf.  Here is what I have in /etc/logrotate.conf.  I expect to keep 4 versions of any log and don't expect the log to grow greater than 100M at any time.  Below is my /etc/logrotate.conf.  Shouldn't "size 100M" do what I expect. i.e. rotate the logs  when it hits 100M.  /var/log/maillog is defined in /etc/logrotate.d/syslog.  What am I missing?    &lt;BR /&gt;&lt;BR /&gt;# see "man logrotate" for details&lt;BR /&gt;# rotate log files weekly&lt;BR /&gt;#weekly&lt;BR /&gt;&lt;BR /&gt;# commented out weekly and changed to size due to e-mail errors&lt;BR /&gt;size 100M&lt;BR /&gt;&lt;BR /&gt;# keep 4 weeks worth of backlogs&lt;BR /&gt;rotate 4&lt;BR /&gt;&lt;BR /&gt;# create new (empty) log files after rotating old ones&lt;BR /&gt;create&lt;BR /&gt;&lt;BR /&gt;# uncomment this if you want your log files compressed&lt;BR /&gt;#compress&lt;BR /&gt;&lt;BR /&gt;# RPM packages drop log rotation information into this directory&lt;BR /&gt;include /etc/logrotate.d&lt;BR /&gt;&lt;BR /&gt;# no packages own wtmp -- we'll rotate them here&lt;BR /&gt;/var/log/wtmp {&lt;BR /&gt;  monthly&lt;BR /&gt;    create 0664 root utmp&lt;BR /&gt;    rotate 1&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jun 2006 11:48:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813392#M23984</guid>
      <dc:creator>joseph wholey</dc:creator>
      <dc:date>2006-06-27T11:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813393#M23985</link>
      <description>Place the "size 100M" statement in the stanza specific to maillog in the '/etc/logrotate.d'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jun 2006 12:47:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813393#M23985</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2006-06-27T12:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813394#M23986</link>
      <description>Rick,&lt;BR /&gt;I don't have a specific file/stanza for mail in my /etc/logrotate.d directory.  /var/log/maillog is included in /etc/logrotate.d/syslog.  Shouldn't that be enough?  &lt;BR /&gt;I can't seem to find any documentation on how logs specified in the /etc/logrotate.d/syslog are treated.  thx.  -joe-</description>
      <pubDate>Tue, 27 Jun 2006 12:57:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813394#M23986</guid>
      <dc:creator>joseph wholey</dc:creator>
      <dc:date>2006-06-27T12:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813395#M23987</link>
      <description>Are you sure is rotating in daily basis? Because I don't see the "daily" option in your configuration file.</description>
      <pubDate>Tue, 27 Jun 2006 14:12:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813395#M23987</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-06-27T14:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813396#M23988</link>
      <description>&lt;BR /&gt;Ivan, &lt;BR /&gt;&lt;BR /&gt;Correct me if I'm wrong... and I very well could be...  but I thought it went as follows: &lt;BR /&gt;&lt;BR /&gt;1.  start crond &lt;BR /&gt;2.  crond searches /etc/crontab and /etc/cron.d for programs to run.&lt;BR /&gt;3.  run-parts in root's crontab executes cron.daily/hourly/weekly etc...  &lt;BR /&gt;4.  logrotate runs out of /etc/cron.daily&lt;BR /&gt;5.  /etc/logrotate.conf is read by /etc/cron.daily/logrotate&lt;BR /&gt;6.  /etc/logrotate.conf includes files that are in /etc/logrotate.d directory&lt;BR /&gt;7.  /etc/logrotate.d/syslog specifies /var/log/maillog    &lt;BR /&gt;&lt;BR /&gt;...so I'm pretty sure it is running? + this is from my /var/lib/rotate.status.&lt;BR /&gt;&lt;BR /&gt;"/var/log/maillog" 2006-6-26&lt;BR /&gt;&lt;BR /&gt;thx.  joe&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jun 2006 14:48:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813396#M23988</guid>
      <dc:creator>joseph wholey</dc:creator>
      <dc:date>2006-06-27T14:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813397#M23989</link>
      <description>I think that the exact process will be: &lt;BR /&gt;&lt;BR /&gt;1. start crond&lt;BR /&gt;2. crond searches /etc/crontab and /etc/cron.d for programs to run.&lt;BR /&gt;3. run-parts in root's crontab executes cron.daily/hourly/weekly etc...&lt;BR /&gt;4. logrotate runs out of /etc/cron.daily&lt;BR /&gt;5. /etc/logrotate.conf is read by /etc/cron.daily/logrotate&lt;BR /&gt;6. /etc/logrotate.conf includes files that are in /etc/logrotate.d directory&lt;BR /&gt;7. /etc/logrotate.d/syslog specifies /var/log/maillog&lt;BR /&gt;***8. If the logrotate.conf is configured to be executed in daily basis with the daily parameter, or if there are some log files configured to be rotated daily, then continues, if not, waits until the next run.&lt;BR /&gt;&lt;BR /&gt;Anyway, you can use logrotate -f to "force" and test the rotation of the log files. Also, consider that the files may grow beyond the 100 MB because logrotate runs only once at the day, and won't monitor the file so when exactly 100 MB is reached will be rotated.</description>
      <pubDate>Tue, 27 Jun 2006 15:02:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813397#M23989</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-06-27T15:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813398#M23990</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Based on a thorough reading of the thread, I'd suggest changing the cron schedule for logrotate. &lt;BR /&gt;&lt;BR /&gt;If 100 MB is important to you than run logrotate more often. All its going to do is nothing if the parameters are not met.&lt;BR /&gt;&lt;BR /&gt;We like to run it on a fixed schedule so we know the time span of log contents. Its not like its from Mount Sinai or anything, you can do what you want.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 27 Jun 2006 17:49:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813398#M23990</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-06-27T17:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813399#M23991</link>
      <description>We rotate our mail log every hour (outside of logrotate though, as it doesn't like hourly), and keep about a months worth.&lt;BR /&gt;&lt;BR /&gt;I agreep with SEP though.&lt;BR /&gt;&lt;BR /&gt;If the 100MB is important, then run logrotate more regularly than once-a-day.  'logrotate' will handle the logs correctly, as it keeps it's own records as to when it's rotated something.</description>
      <pubDate>Tue, 27 Jun 2006 19:02:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813399#M23991</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-06-27T19:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813400#M23992</link>
      <description>Ok... still haven't received a satisfactory explanation as to why the 100MB is not being honored... but, I'm putting logrotate into /etc/cron.hourly to circumvent.</description>
      <pubDate>Thu, 29 Jun 2006 10:17:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813400#M23992</guid>
      <dc:creator>joseph wholey</dc:creator>
      <dc:date>2006-06-29T10:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: logrotate question/problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813401#M23993</link>
      <description>Remember to use the -f option or logrotate wont run two times the same day.</description>
      <pubDate>Thu, 29 Jun 2006 11:22:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/logrotate-question-problem/m-p/3813401#M23993</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-06-29T11:22:20Z</dc:date>
    </item>
  </channel>
</rss>

