<br><br><div class="gmail_quote">On Sat, Jun 19, 2010 at 9:25 PM, J <span dir="ltr"><<a href="mailto:dreadpiratejeff@gmail.com">dreadpiratejeff@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">On Sat, Jun 19, 2010 at 04:32, Kaushal Shriyan <<a href="mailto:kaushalshriyan@gmail.com">kaushalshriyan@gmail.com</a>> wrote:<br>
> Hi<br>
> I am calling logrotate using shell script. Below are the details<br>
> #!/bin/bash<br>
> /usr/sbin/logrotate /usr/local/bin/scripts/logrotate-tomcat1-catalina.conf ><br>
> /tmp/tomcat1.log 2>&1<br>
> if [ $? -ne 0 ] ; then<br>
> echo "Problems." | /usr/bin/mail -s "[CRON] hosttest compress tomcat1<br>
> catalina.log - problems" <a href="mailto:kaushal@example.com">kaushal@example.com</a><br>
> fi<br>
> The issue i am facing is that logrotate leads high load due to big log size<br>
> if i make use of ionice utility<br>
> /usr/bin/ionice -c3 /usr/sbin/logrotate<br>
> /usr/local/bin/scripts/logrotate-tomcat1-catalina.conf > /tmp/tomcat1.log<br>
> 2>&1<br>
> is that correct?<br>
<br>
</div></div>Instead of manually rotating the log, why don't you put your conf file<br>
in /etc/logrotate.d and add a size limitation?  that keeps your log<br>
file from getting to be too big.  Look at 'man logrotate' and there's<br>
an example config that shows how to do it...<br>
<br>
IMHO, it's preferrable to keep 20 smaller logfiles than 5 giant<br>
logfiles... and if you're getting a noticable load just rotating them,<br>
how big are they anyway?<br>
<br></blockquote><div>The file size is around 36GB generated daily which is logrotated at midnight</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
This could be a good use case for having a remote log server, too...<br>
<font color="#888888"><br></font></blockquote><div><br></div><div>Please provide me with pointers regarding remote log server, Any open source based solution</div><div><br></div><div>Thanks</div><div><br></div><div>Kaushal </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888">
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</font></blockquote></div><br>