<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: How do I rotate log files?</title> <atom:link href="http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: felipe1982</title><link>http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/#comment-63881</link> <dc:creator>felipe1982</dc:creator> <pubDate>Wed, 26 Oct 2011 05:01:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-rotate-log-files.php#comment-63881</guid> <description>sorry! Change &lt;pre&gt;postrotate&lt;/pre&gt; to &lt;pre&gt;prerotate&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>sorry! Change<pre>postrotate</pre><p> to<pre>prerotate</pre>]]></content:encoded> </item> <item><title>By: felipe1982</title><link>http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/#comment-63880</link> <dc:creator>felipe1982</dc:creator> <pubDate>Wed, 26 Oct 2011 04:50:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-rotate-log-files.php#comment-63880</guid> <description>&lt;blockquote&gt;If I use&lt;/blockquote&gt;
&lt;pre&gt;
sharedscripts
postrotate
do_something
endscript
&lt;/pre&gt;
&lt;blockquote&gt;Isn&#039;t this 100% the same as doing&lt;/blockquote&gt;
&lt;pre&gt;
firstaction
do_something
endscript
&lt;/pre&gt;</description> <content:encoded><![CDATA[<blockquote><p>If I use</p></blockquote><pre>
  sharedscripts
  postrotate
    do_something
   endscript
</pre><blockquote><p>Isn&#8217;t this 100% the same as doing</p></blockquote><pre>
  firstaction
    do_something
  endscript
</pre>]]></content:encoded> </item> <item><title>By: Yogesh</title><link>http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/#comment-48421</link> <dc:creator>Yogesh</dc:creator> <pubDate>Tue, 20 Jul 2010 05:22:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-rotate-log-files.php#comment-48421</guid> <description>Try rotatelogs feature of httpd.conf :-)
http://httpd.apache.org/docs/2.0/programs/rotatelogs.html</description> <content:encoded><![CDATA[<p>Try rotatelogs feature of httpd.conf :-)<br
/> <a
href="http://httpd.apache.org/docs/2.0/programs/rotatelogs.html" rel="nofollow">http://httpd.apache.org/docs/2.0/programs/rotatelogs.html</a></p> ]]></content:encoded> </item> <item><title>By: Anonymous</title><link>http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/#comment-48129</link> <dc:creator>Anonymous</dc:creator> <pubDate>Tue, 29 Jun 2010 17:33:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-rotate-log-files.php#comment-48129</guid> <description>@Ela
Its always a good idea to rotate logs according to size instead of age when the logs are too big or too small. Rotating logs according to age favours for moderate logs only.</description> <content:encoded><![CDATA[<p>@Ela<br
/> Its always a good idea to rotate logs according to size instead of age when the logs are too big or too small. Rotating logs according to age favours for moderate logs only.</p> ]]></content:encoded> </item> <item><title>By: A Mukherjee</title><link>http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/#comment-44514</link> <dc:creator>A Mukherjee</dc:creator> <pubDate>Mon, 09 Nov 2009 03:48:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-rotate-log-files.php#comment-44514</guid> <description>Have you tried to install and run BleachBit?</description> <content:encoded><![CDATA[<p>Have you tried to install and run BleachBit?</p> ]]></content:encoded> </item> <item><title>By: Ela</title><link>http://www.cyberciti.biz/faq/how-do-i-rotate-log-files/#comment-43914</link> <dc:creator>Ela</dc:creator> <pubDate>Thu, 01 Oct 2009 14:58:55 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-rotate-log-files.php#comment-43914</guid> <description>Am getting this problem very biggly
Please help me out
&lt;em&gt;vi /etc/logrotate.conf&lt;/em&gt;
# see &quot;man logrotate&quot; for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs
rotate 4
# create new (empty) log files after rotating old ones
create
# 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 -- we&#039;ll rotate them here
/var/log/wtmp {
monthly
minsize 1M
create 0664 root utmp
rotate 1
}
&lt;em&gt;cat /etc/logrotate.d/httpd&lt;/em&gt;
/var/log/httpd/*log {
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload &gt; /dev/null 2&gt;/dev/null &#124;&#124; true
endscript
}
My server is running nearly 10 sites and all those creating log files under statistics in vhosts.
it wil become more than 30 gb with in week. how to control it. please reply me</description> <content:encoded><![CDATA[<p>Am getting this problem very biggly</p><p>Please help me out</p><p><em>vi /etc/logrotate.conf</em><br
/> # see &#8220;man logrotate&#8221; for details<br
/> # rotate log files weekly<br
/> weekly</p><p># keep 4 weeks worth of backlogs<br
/> rotate 4</p><p># create new (empty) log files after rotating old ones<br
/> create</p><p># uncomment this if you want your log files compressed<br
/> #compress</p><p># RPM packages drop log rotation information into this directory<br
/> include /etc/logrotate.d</p><p># no packages own wtmp &#8212; we&#8217;ll rotate them here<br
/> /var/log/wtmp {<br
/> monthly<br
/> minsize 1M<br
/> create 0664 root utmp<br
/> rotate 1<br
/> }</p><p><em>cat /etc/logrotate.d/httpd</em></p><p>/var/log/httpd/*log {<br
/> missingok<br
/> notifempty<br
/> sharedscripts<br
/> postrotate<br
/> /sbin/service httpd reload &gt; /dev/null 2&gt;/dev/null || true<br
/> endscript<br
/> }</p><p>My server is running nearly 10 sites and all those creating log files under statistics in vhosts.<br
/> it wil become more than 30 gb with in week. how to control it. please reply me</p> ]]></content:encoded> </item> </channel> </rss>
