Results 1 to 8 of 8

Thread: Log File Sizes

  1. #1
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    5

    Default Log File Sizes

    Hi,

    Our file system is filling up and it turns out that some of the log files (/opt/zimbra/log) are quite large. For example, the mailbox.log files can reach upwards of a gig and the convertd.log files are 300+ megs.

    Zimbra rotates these files by date, but is there a way to also compress them? I'm not sure if logrotate is an option. Adding an entry for 'mailbox.log' I don't believe will compress the logs that have dates appended to the end of the file names. Using a wild card, such as 'mailbox.log*' will rotate previously rotated files.

    How do you handle this?

    Thanks.

  2. #2
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    Zimbra uses logrotate to handle it's logs, as I think you have seen. So all you need to do is configure logrotate to compress the logs. The configuration for Zimbra's logs is handled in /etc/logrotate.d/zimbra. If the compression is already setup in the general configuration (it generally is) then you just need to add "compress" to each logs options.

  3. #3
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    5

    Default

    Thanks for the response. What's odd is that logrotate runs every night at 4am; however, the Zimbra log files are rotated at midnight. Also, it doesn't seem that logrotate is invovled with appending the date to the end of the rotated file names. I take it there's another component involved?

  4. #4
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    Woops yea, forgot that there is a second logrotate config file located at /opt/zimbra/conf/zmlogrotate

    I had issues as well with the settings being in two different places... took a bit to find that.

  5. #5
    Join Date
    Oct 2009
    Posts
    13
    Rep Power
    5

    Default

    Nice, thanks. I also found that Zimbra is using log4j, which is configured in /opt/zimbra/conf/log4j.properties. By the way, do you know what script is kicking off at midnight that's incorporating /opt/zimbra/conf/zmlogrotate?

    EDIT: I think /opt/zimbra/conf/zmlogrotate isn't being read; instead, it was just copied to /etc/logrotate.d directory and is being called by the regular logrotate cron job. And it's log4j that's running at midnight. Is it just me or is Zimbra convoluted?
    Last edited by That Guy from that Place; 11-18-2009 at 01:17 PM.

  6. #6
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    Not a clue sorry, try looking in the daily cron tasks (/etc/cron.daily) and the zimbra user's crontab (crontab -e u zimbra).

  7. #7
    Join Date
    Feb 2007
    Location
    Portland, OR
    Posts
    1,147
    Rep Power
    10

    Default

    Was poking around for something else today and found a "600.zimbra" file in /opt/zimbra/libexec. Bizarrely enough this file looks to be some sort of log rotater?!

    From the name I thought it might be a remnant from 6.0.0, but I have no idea now... does this return anything for you?
    Code:
    grep Rotating /opt/zimbra/libexec/*

  8. #8
    Join Date
    Jun 2008
    Posts
    594
    Rep Power
    8

    Default

    zmlocalconfig has mailboxd_output_rotate_interval = 86400
    set for 24 hrs.

Similar Threads

  1. Replies: 30
    Last Post: 01-13-2009, 07:00 AM
  2. speed up the net
    By mcesari in forum Administrators
    Replies: 10
    Last Post: 04-25-2008, 11:24 AM
  3. Connector Fails
    By ILLCOMM in forum Zimbra Connector for Outlook
    Replies: 4
    Last Post: 09-28-2007, 12:08 PM
  4. Replies: 5
    Last Post: 03-01-2007, 02:20 AM
  5. Errors in log file
    By layer3guru in forum Administrators
    Replies: 2
    Last Post: 08-11-2006, 04:20 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
  •