Results 1 to 4 of 4

Thread: [SOLVED] Cleaning directories.... (logger, log)

  1. #1
    Join Date
    Sep 2008
    Posts
    23
    Rep Power
    7

    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.-

  2. #2
    Join Date
    Oct 2005
    Location
    USA, Canada and India
    Posts
    777
    Rep Power
    11

    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

  3. #3
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    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.

  4. #4
    Join Date
    Sep 2008
    Posts
    23
    Rep Power
    7

    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..

Similar Threads

  1. Errors installing Outlook Connector
    By Tim G in forum Zimbra Connector for Outlook
    Replies: 57
    Last Post: 05-05-2011, 03:27 PM
  2. Replies: 7
    Last Post: 02-27-2008, 05:17 PM
  3. Error Installing Outlook Connector
    By DanO in forum Zimbra Connector for Outlook
    Replies: 17
    Last Post: 08-28-2007, 10:35 AM
  4. Why JDK?
    By paladine in forum Installation
    Replies: 3
    Last Post: 11-15-2006, 02:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •