Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-2008, 06:36 AM
Intermediate Member
 
Posts: 23
Default [SOLVED] Cleaning directories.... (logger, log)

Hi...

My system is growing too much is this directories under /opt/zimbra

log
logger
jetty-6.1.5 (log direcvtory)

My system: CentOS release 5 (Final), Zimbra 5.0.6

So my questions are:

1.- My directory /opt/zimbra/logger/db/data is growing too much... is now 5.1 GB. so how can I clean that directory without break my setup?

I found this:

****************
su - zimbra
stop logger db (mysql processes)
rm -rf /opt/zimbra/logger/db/data
/opt/zimbra/libexec/zmloggerinit
*****************
But i not sure if is this the best solution.


2.- Is there a way to keep less files for log (mailbox.log and jetty logs)?

Now i have: 10 files for Jetty logs and each file with a size of around: 400 MB

For the logs under /opt/zimbra/log i have 10 files, and each with a size of around 200 MB.

Thanks a lot for any answer.

Michael.-
Reply With Quote
  #2 (permalink)  
Old 11-06-2008, 11:15 AM
raj raj is offline
Moderator
 
Posts: 768
Default

-------------------------------------------------------
To clean up logger and re-init it
-------------------------------------------------------

su - zimbra
logmysql.server stop
logout
rm -rf /opt/zimbra/logger/db/data/*
chown zimbra:zimbra /opt/zimbra/db/data
chmod 775 /opt/zimbra/db/data
cd /opt/zimbra/libexec
./zmloggerinit
./zmfixperms
su - zimbra
zmlogswatchctl start
zmcontrol status
__________________
i2k2 Networks
Dedicated & Shared Zimbra Hosting Provider
Reply With Quote
  #3 (permalink)  
Old 11-06-2008, 01:05 PM
Moderator
 
Posts: 6,237
Default

Some things you could do:

su - zimbra
zmprov mcf zimbraLogRawLifetime Xd (31d by default)
zmprov mcf zimbraLogSummaryLifetime Xd (730d by default)
If you're curious how this process works examine /opt/zimbra/libexec/zmlogprocess (which is fired off every 10 min from crontab against the zimbra_logger DB). It's used in things like zmmstgrace.

Decrease the rotate numbers/amount retained at the below locations:
/etc/logrotate.d/zimbra
crontab -e (as the zimbra user)
/opt/zimbra/conf/zmlogrotate

Change log levels /opt/zimbra/conf/log4j.properties.in
For instance FATAL, ERROR, and WARN levels are going to produce less content than INFO or DEBUG.

(Then zmcontrol stop/start to get everything to apply.)

Lots of other attributes/configs for log levels, but that should cover a decent ammount. Should upgrade to 5.0.10 sometime as well.
Reply With Quote
  #4 (permalink)  
Old 11-07-2008, 04:27 AM
Intermediate Member
 
Posts: 23
Default

Hi, thanks for the answers..

In the file: /opt/zimbra/conf/log4j.properties.in I only have for "mailbox.log" the following entry....

%%uncomment VAR:!zimbraLogToSyslog%%log4j.rootLogger=INFO,LOGF ILE
%%uncomment VAR:zimbraLogToSyslog%%log4j.rootLogger=INFO,LOGFI LE,SYSLOG

# Appender LOGFILE writes to the file "/opt/zimbra/log/mailbox.log".
#log4j.appender.LOGFILE=org.apache.log4j.FileAppen der
log4j.appender.LOGFILE=org.apache.log4j.DailyRolli ngFileAppender
log4j.appender.LOGFILE.File=/opt/zimbra/log/mailbox.log
log4j.appender.LOGFILE.DatePattern='.'yyyy-MM-dd
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=com.zimbra.common.ut il.ZimbraPatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d %-5p [%t] [%z] %c{1} - %m%n


So if I change the line:

%%uncomment VAR:!zimbraLogToSyslog%%log4j.rootLogger=INFO,LOGF ILE

By:

%%uncomment VAR:!zimbraLogToSyslog%%log4j.rootLogger=WARN,LOGF ILE

That line will affect only maillog.log or I need to change the other one too (the one that says SYSLOG).?

And about the Jetty logs, I have DEBUG level in these files:

/opt/zimbra/jetty/etc/zimbraAdmin.web.xml.in
/opt/zimbra/jetty/etc/zimbra.web.xml.in

If I have to change to WARN level in both of them?

Thanks!!!

Michael..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.