logrotate

Kaushal Shriyan kaushalshriyan at gmail.com
Sat Jun 19 17:05:39 UTC 2010


On Sat, Jun 19, 2010 at 9:25 PM, J <dreadpiratejeff at gmail.com> wrote:

> On Sat, Jun 19, 2010 at 04:32, Kaushal Shriyan <kaushalshriyan at gmail.com>
> wrote:
> > Hi
> > I am calling logrotate using shell script. Below are the details
> > #!/bin/bash
> > /usr/sbin/logrotate
> /usr/local/bin/scripts/logrotate-tomcat1-catalina.conf >
> > /tmp/tomcat1.log 2>&1
> > if [ $? -ne 0 ] ; then
> > echo "Problems." | /usr/bin/mail -s "[CRON] hosttest compress tomcat1
> > catalina.log - problems" kaushal at example.com
> > fi
> > The issue i am facing is that logrotate leads high load due to big log
> size
> > if i make use of ionice utility
> > /usr/bin/ionice -c3 /usr/sbin/logrotate
> > /usr/local/bin/scripts/logrotate-tomcat1-catalina.conf > /tmp/tomcat1.log
> > 2>&1
> > is that correct?
>
> Instead of manually rotating the log, why don't you put your conf file
> in /etc/logrotate.d and add a size limitation?  that keeps your log
> file from getting to be too big.  Look at 'man logrotate' and there's
> an example config that shows how to do it...
>
> IMHO, it's preferrable to keep 20 smaller logfiles than 5 giant
> logfiles... and if you're getting a noticable load just rotating them,
> how big are they anyway?
>
> The file size is around 36GB generated daily which is logrotated at
midnight


> This could be a good use case for having a remote log server, too...
>
>
Please provide me with pointers regarding remote log server, Any open source
based solution

Thanks

Kaushal

> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100619/c0121e4a/attachment.html>


More information about the ubuntu-users mailing list