Zmdiaglog: Difference between revisions

(New page)
 
No edit summary
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== zmdiaglog ==
{{BC|Certified}}
 
__FORCETOC__
<div class="col-md-12 ibox-content">
=Zmdiaglog=
{{KB|{{ZC}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}}
{{WIP}}
=== Path ===
=== Path ===


Line 23: Line 27:
=== Description ===
=== Description ===


zmdiaglog is the standard tool that Zimbra provides for collecting performance or troubleshooting data. Zimbra has standardized this tool in order to capture the full set of data during an event - data that Zimbra Support and Engineering regularly requires and determines essential in investigating all sides of the event. Included in the zmdiaglog is the following:
zmdiaglog is the standard tool that Zimbra provides for collecting performance or troubleshooting data. Zimbra has standardized this tool in order to capture the full set of data during an event - data that Zimbra Support and Engineering regularly requires and determines essential in investigating all sides of the event. '''It is imperative that zmdiaglog is run during the trouble event, and prior to the restart of any processes.'''
 
Included in the zmdiaglog is the following:


* [[zmstats]]
* [[zmstats]]
Line 49: Line 55:
</pre>
</pre>


* Execution with heap dump:
* Standard execution, without heap dump, output zipped:
 
<pre>
# /opt/zimbra/libexec/zmdiaglog -z
</pre>
 
* Execution with heap dump and output zipped:
 
<pre>
# /opt/zimbra/libexec/zmdiaglog -a -z
</pre>
 
* Execution with heap dump, zmjavawatch output, and output zipped:
 
<pre>
# /opt/zimbra/libexec/zmdiaglog -a -j -z
</pre>
 
* Execution with zmjavawatch output, and output zipped. Heap dumps can take longer (see below), so this is probably the most common usage:
 
<pre>
# /opt/zimbra/libexec/zmdiaglog -j -z
</pre>
 
'''As a general rule, plan to run this last command ''/opt/zimbra/libexec/zmdiaglog -a -j -z'' anytime the server is behaving poorly - this will be sure to take a snapshot of the server profile at the time of the event.'''


A "zmdiaglog -a" also provides a heap dump, but should only be run in this manner on ZCS 6.0 or later. Running "zmdiaglog -a" on a 5.0.x server is not valuable, as JVM 1.5 does not provide consistent or worthwhile heap dumps, and also this process is invasive on JVM 1.5 and will cause the mailboxd server to pause for the duration of the heap dump. Once on ZCS 6.0.x or later, which uses Java JVM6, the heap dump can be taken non-invasively and can be valuable under conditions of memory events or OOMEs.
A "zmdiaglog -a" also provides a heap dump, but should only be run in this manner on ZCS 6.0 or later. Running "zmdiaglog -a" on a 5.0.x server is not valuable, as JVM 1.5 does not provide consistent or worthwhile heap dumps, and also this process is invasive on JVM 1.5 and will cause the mailboxd server to pause for the duration of the heap dump. Once on ZCS 6.0.x or later, which uses Java JVM6, the heap dump can be taken non-invasively and can be valuable under conditions of memory events or OOMEs.
Line 58: Line 88:


As soon as the zmdiaglog completes its JVM functions (thread dumps, procstats, and optionally heap dump), a "zmmailboxdctl restart" can be run to restart a non-functioning JVM process if necessary.
As soon as the zmdiaglog completes its JVM functions (thread dumps, procstats, and optionally heap dump), a "zmmailboxdctl restart" can be run to restart a non-functioning JVM process if necessary.
{{Article Footer|Zimbra Collaboration Suite 8.0, 7.0|08/4/2014}}

Revision as of 02:34, 11 July 2015

Zmdiaglog

   KB 3844        Last updated on 2015-07-11  




0.00
(0 votes)

Path

/opt/zimbra/libexec/zmdiaglog

Options

# /opt/zimbra/libexec/zmdiaglog -h
Usage: zmdiaglog [-dthazj]

    -a    - Do everything: also gather JVM heapdump/coredump
    -d    - Log destination (Default /opt/zimbra/data/tmp/zmdiaglog.PID)
    -t    - Timeout in seconds for hanging commands (Default 120)
    -j    - Also include the output of /opt/zimbra/libexec/zmjavawatch
    -z    - Zip output
    -h    - This help message

Description

zmdiaglog is the standard tool that Zimbra provides for collecting performance or troubleshooting data. Zimbra has standardized this tool in order to capture the full set of data during an event - data that Zimbra Support and Engineering regularly requires and determines essential in investigating all sides of the event. It is imperative that zmdiaglog is run during the trouble event, and prior to the restart of any processes.

Included in the zmdiaglog is the following:

  • zmstats
  • zmthrdump threaddumps at 10 second intervals for 100 seconds
  • zmmailboxd.out
  • top
  • netstat
  • procstats
  • lsof
  • dmesg & /var/log/messages
  • ld.so.conf
  • zmdumpenv
  • all logs
  • all config files
  • heap dump and heap histogram (when -a flag is used)

Execution

zmdiaglog is executed as root as:

  • Standard execution, without heap dump:
# /opt/zimbra/libexec/zmdiaglog
  • Standard execution, without heap dump, output zipped:
# /opt/zimbra/libexec/zmdiaglog -z
  • Execution with heap dump and output zipped:
# /opt/zimbra/libexec/zmdiaglog -a -z
  • Execution with heap dump, zmjavawatch output, and output zipped:
# /opt/zimbra/libexec/zmdiaglog -a -j -z
  • Execution with zmjavawatch output, and output zipped. Heap dumps can take longer (see below), so this is probably the most common usage:
# /opt/zimbra/libexec/zmdiaglog -j -z

As a general rule, plan to run this last command /opt/zimbra/libexec/zmdiaglog -a -j -z anytime the server is behaving poorly - this will be sure to take a snapshot of the server profile at the time of the event.

A "zmdiaglog -a" also provides a heap dump, but should only be run in this manner on ZCS 6.0 or later. Running "zmdiaglog -a" on a 5.0.x server is not valuable, as JVM 1.5 does not provide consistent or worthwhile heap dumps, and also this process is invasive on JVM 1.5 and will cause the mailboxd server to pause for the duration of the heap dump. Once on ZCS 6.0.x or later, which uses Java JVM6, the heap dump can be taken non-invasively and can be valuable under conditions of memory events or OOMEs.

The entire standard zmdiaglog should take about 100-200 seconds, and builds a .gz file at /opt/zimbra/data/tmp (/tmp on ZCS 5.0.x) that can be uploaded to Zimbra Support, and without the -a flag is non-invasive (other than the additional gzip load on the server). The "zmdiaglog -a" will take longer to write a 4-6GB heap file to disk, but again will not affect the running process once on JVM6.

Given the length of a common event, it is very rare that one cannot be taken successfully, and the value of doing so is great when compared to allowing an event to happen and not capturing the data. The time invested in running the zmdiaglog once will hopefully allow identification of the root cause, and prevent future outages.

As soon as the zmdiaglog completes its JVM functions (thread dumps, procstats, and optionally heap dump), a "zmmailboxdctl restart" can be run to restart a non-functioning JVM process if necessary.

Verified Against: Zimbra Collaboration Suite 8.0, 7.0 Date Created: 08/4/2014
Article ID: https://wiki.zimbra.com/index.php?title=Zmdiaglog Date Modified: 2015-07-11



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search