QueueMetrics forum
QueueMetrics => Running QueueMetrics => Topic started by: rudio on February 11, 2009, 13:31:09
-
du -sm /usr/local/queuemetrics/tomcat/logs/*
Shows log files of 600mb per day. How do I decrease or turn of these logs for tomcat?
Any ideas welcome.
-
You could simply rotate them daily using a logrotate job like:
/usr/local/queuemetrics/tomcat/logs/*.* {
missingok
rotate 5
daily
compress
create 0640 root root
postrotate
/etc/init.d/queuemetrics restart > /dev/null 2> /dev/null
endscript
}
You can decide how much to keep them for (in the example, 5 days compressed). They should compress very well.
-
I have this problem too. While rotating the logs is ok, it would be better if they weren't so big in the first place. Is there any way to make QueueMetrics less "chatty"?
-
Unfortunately. not at the moment.
It should not be overly chatty anyway - it should just log a couple of lines per transaction.
-
I'm having the same problem. We've been running queuemetrics for about two months and our tomcat logs folder has reached 32G! This is a server that generally has three callers being serviced in a queue at any given time. Is this a normal size? We've been having a lot of issues with asterisk queues acting up (stuck calls, etc). Could there be any indicators in this log file of bigger problems seeing that the size is so huge?
-
No - as long as you have free space on the disk, and unless you see your machine hung on "wait for I/O".
I think you could disable log files at all.
See http://wiki.apache.org/tomcat/FAQ/Logging
-
This was a bit of a hairy one. To those interested in disabling all logging, here are the changes I made:
[root@PBX ~]# diff /usr/local/queuemetrics/tomcat/conf/server.xml.original /usr/local/queuemetrics/tomcat/conf/server.xml
163,165d162
< <Logger className="org.apache.catalina.logger.FileLogger"
< prefix="catalina_log." suffix=".txt"
< timestamp="true"/>
373,376d369
< <Logger className="org.apache.catalina.logger.FileLogger"
< directory="logs" prefix="localhost_log." suffix=".txt"
< timestamp="true"/>
<
[root@PBX ~]# diff /usr/local/queuemetrics/tomcat/bin/catalina.sh.original /usr/local/queuemetrics/tomcat/bin/catalina.sh
206d205
< touch "$CATALINA_BASE"/logs/catalina.out
218c217
< >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
---
> >> /dev/null 2>&1 &
230c229
< >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
---
> >> /dev/null 2>&1 &
-
That's great! If you don't mind, I'd add that to the FAQs.
-
Go right ahead. Hope it helps others!
-
Thanks!