Log Files

Revision as of 19:52, 5 December 2011 by Thom (talk | contribs)
Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 4.5 Article ZCS 4.5

Depending on what's installed on the server, and how your system is configured, some logs may not be on the server that is experiencing the error.

Installation Logs

These are named with a pid file extension (3-5 digit number) - generally, the most recent one is the one you're looking for
/tmp/install.log - installation of zimbra software packages
/tmp/zmsetup.log - site-specific configuration

Runtime Logs

Most logs are found in /opt/zimbra/log/:

Note: Before ZCS 4.5, mailbox.log was called zimbra.log

mailbox.log - tomcat mail services
audit.log - authentication
clamd.log - antivirus db
convertd.log - attachment conversion 
freshclam.log - clam antivirus updates
logger_myslow.log - slow logger db queries
myslow.log - slow db queries
spamtrain.log - spam/ham training
sync.log - zimbra mobile
zimbrastats.csv - server performance statistics
zmconvertd.log - conversion server monitor
Some additional logs are in /opt/zimbra/tomcat/logs/:
access_log.<date> - traditional http access log for each http "hit"
catalina.out - tomcat application log
stacktrace.<pid> - full thread dump from "kill -3 <tomcat pid>"; generated each time tomcat is stopped
Other log locations:
/var/log/zimbra.log - MTA and system status log; postfix, amavisd
Output of various scripts:
/tmp/gengraphs.out
/tmp/logprocess.out
/tmp/logswatch.out
/tmp/swatch.out
/tmp/zmlogger.out

mailbox.log categories

To increase or decrease the amount of logging in mailbox.log, change the log level of the following categories. The default log level is INFO. Setting the log level to DEBUG increases the amount of logging. TRACE level logging exists for all protocol-level detail. Setting it to WARN decreases logging.

  • zimbra.index - indexing-related events
  • zimbra.index.lucene - logging of low-level lucene operations (debug-level only)
  • zimbra.searchstat - statistics about what kinds of searches are run
  • zimbra.redolog - redolog-releated events
  • zimbra.lmtp - LMTP-related events (as of ZCS 7.x: use TRACE-level logging for most debug information - TRACE provides protocol-level detail as well as DEBUG)
  • zimbra.smtp - SMTP-related events (as of ZCS 7.x: use TRACE-level logging for most debug information - TRACE provides protocol-level detail as well as DEBUG)
  • zimbra.nio - NIO-related events
  • zimbra.imap - IMAP-related events (as of ZCS 7.x: use TRACE-level logging for most debug information - TRACE provides protocol-level detail as well as DEBUG)
  • zimbra.pop - POP-related events (as of ZCS 7.x: use TRACE-level logging for most debug information - TRACE provides protocol-level detail as well as DEBUG)
  • zimbra.mailbox - mailbox-related events
  • zimbra.calendar - calendar-related events
  • zimbra.im - instant messaging-related events
  • zimbra.account - account-related events
  • zimbra.gal - GAL-related events
  • zimbra.ldap - ldap-related events
  • zimbra.security - security-related events
  • zimbra.soap - soap-related events (as of ZCS 7.x: use TRACE-level logging for most debug information - TRACE provides protocol-level detail as well as DEBUG)
  • zimbra.test - testing-related events
  • zimbra.sqltrace - when set to DEBUG, logs SQL statements sent to the database
  • zimbra.dbconn - tracing database connections
  • zimbra.perf - performance statistics
  • zimbra.cache - tracing object cache activity
  • zimbra.filter - filter-related logs
  • zimbra.session - session- and notification-related logs
  • zimbra.backup - backup/restore-related logs
  • zimbra.system - startup/shutdown and other related logs
  • zimbra.sync - sync client interface logs
  • zimbra.synctrace - sync client interface logs
  • zimbra.syncstate - sync client interface logs
  • zimbra.wcbxml - wcbxml client interface logs
  • zimbra.extensions - extension-loading related info
  • zimbra.zimlet - Zimlet related info
  • zimbra.wiki - wiki and document sharing
  • zimbra.op - server operations
  • zimbra.dav - WebDAV operations
  • zimbra.io - file IO operations
  • zimbra.datasource - external POP/IMAP datasource operations
  • zimbra.rmgmt - remote management
  • zimbra.webclient - ZimbraWebClient servlet and jsp operations
  • zimbra.scheduler - scheduled task operations
  • zimbra.store - filesystem (mailstore) storage operations
  • zimbra.fb - free/busy operations
  • zimbra.purge - mailbox purge operations
  • zimbra.mailop - Mailbox operations (e.g. add/delete message, move to folder)
  • zimbra.misc - events that don't have a specific category

To change logging settings for all users, edit /opt/zimbra/conf/log4j.properties.in and add a line like

log4j.logger.zimbra.soap=DEBUG

After saving your changes, either restart the server or run

$ zmmtaconfig mailboxd

and wait for a minute for the server to pick up your change. You can also change log settings for a single user with zmprov:

$ zmprov addAccountLogger user@domain.com zimbra.soap debug

Run zmprov help misc for more details. Note that account-level log settings are reset when the server is restarted. bug 26642 was filed for this issue.

Performance statistics

Many useful Zimbra server performance statistics are logged to /opt/zimbra/zmstat/mailboxd.csv. This file can be opened in Excel or another utility that reads files in CSV format. Here's a summary of the statistics logged. All pairs of timing statistics named xxx_count and xxx_avg specify the number of times an operation was performed and the average execution time. Additional logs after 4.5.7 include cpu.csv and proc.csv.

  • timestamp - timestamp of a given statistic collection period
  • lmtp_rcvd_msgs,lmtp_rcvd_bytes,lmtp_rcvd_rcpt,lmtp_dlvd_msgs,lmtp_dlvd_bytes - number and size of messages received and delivered
  • db_pool_size - database connection pool size
  • db_conn_count,db_conn_ms_avg - timing data for getting a database connection
  • ldap_dc_count,ldap_dc_ms_avg - timing data for getting an LDAP connection
  • mbox_add_msg_count,mbox_add_msg_ms_avg - timing data for adding a message
  • mbox_msg_cache,mbox_item_cache - hit rate for the message body (blob) cache and mail item (database metadata) cache. 0 = 0%, 1 = 100%.
  • soap_count,soap_ms_avg,imap_count,imap_ms_avg,pop_count,pop_ms_avg - timing data for SOAP, IMAP and POP operations
  • idx_wrt_avg - Lucene index writer count
  • java_heap_MB - Amount of memory used by the Java VM
  • mysql_opened_tables,mysql_slow_queries,mysql_threads_connected,innodb_pages_read,innodb_pages_written,innodb_bp_hit_rate - MySQL statistics. See MySQL documentation for more info.
  • pop_conn,pop_ssl_conn,imap_conn,imap_ssl_conn - Number of active POP and IMAP connections

MTA logs

The MTA (postfix) logs via syslog to the mail facility. By default, this goes to /var/log/maillog, but Zimbra sets it to /var/log/zimbra.log

Tomcat (web server) logs

Tomcat logs via syslog to the local0 facility. By default, this goes to /var/log/messages AND /opt/zimbra/log/mailbox.log
Some tomcat information (including thread dumps) will also be in /opt/zimbra/tomcat/logs/catalina.out; stopping (or restarting) tomcat outputs the current thread dump to /opt/zimbra/tomcat/logs/stacktrace.<tomcat pid>

Spell server logs

Swatch

Swatch logs to /tmp/swatch.out


iSync Connector Logs

The iSync Connector logs are in different locations based on the version you are using.

In 4.5.x ~/Library/Application Support/Zimbra/com.zimbra.XXXXXXX.sync. There will be at most 5 log files there, sync.log, sync.log.2, ....

In 5.0.x /Users/<user>/Library/Logs/Zimbra/com.zimbra.XXXXXXXXXX/sync.X.log. You can specify how many log files to keep in the Zimbra preference page.

Jump to: navigation, search