Getting started Community Training Tutorials Documentation APIs, AI & Tools
➜ mule-enterprise-standalone-4.6.34 ./tools/diag help
Mule Troubleshooting Tool
=========================
Usage: ./diag [options] [command] [command-options]
Commands:
diaf Generate a complete Mule diagnostic dump (default)
help Show this help message
<operation-name> Execute a specific troubleshooting operation
Global Options:
--stdout Output the diagnostic dump to standard output
--output <path> Specify custom output directory or file path
--extended Enable extended mode (heap dump + file artifacts: conf, logs, server-plugins, apps, domains, policies)
--logsmaxage <days> Maximum age in days for logs collected with --extended (default 7, 0 disables)
--logsmaxtotalsize <mb> Maximum total size in MB for logs collected with --extended (default 100, 0 disables)
--debug Enable debug mode with remote debugging on port 5005
Watch Mode (generate dumps automatically when a condition is met):
--watch Poll runtime metrics and fire a diagnostic dump when a --trigger condition is met
--trigger <condition> Trigger condition (repeatable; a dump fires when any one matches). Forms:
cpu>N / cpu<N CPU load percentage above/below N
heap>N / heap<N heap usage percentage above/below N
thread>N / thread<N live thread count above/below N
time=N every N seconds
cron=<expression> on a Quartz cron schedule (e.g. cron=0 0/5 * * * ?)
script=<path> when <path> exits with a non-zero status
--occurrences <n> Number of dumps to fire before stopping (default 1; 0 or negative = unlimited)
--checkperiod <seconds> How often to check the triggers, in seconds (default 30; a lower time=N trigger takes precedence)
Examples:
./diag # Generate diagnostic dump to logs directory
./diag --stdout # Output diagnostic dump to stdout
./diag --extended # Include heap dump and file artifacts in diagnostic
./diag --output /tmp/mule # Save to specific file (see Archive Format below)
./diag --output /tmp/ # Save to specific directory
./diag <operation-name> # Execute specific operation
./diag --watch --trigger heap>90 # Dump once when heap usage exceeds 90%
./diag --watch --trigger cpu>80 --trigger time=300 --occurrences 0 --checkperiod 10
# Dump every time CPU exceeds 80% or every 300s, checking every 10s, forever
./diag --watch --trigger 'cron=0 0/5 * * * ?' --extended
# Extended dump every 5 minutes on a cron schedule
Output:
The tool creates an archive file containing:
- mule_dump_<timestamp>.diaf # Diagnostic information
- thread_dump_<timestamp>.txt # Thread dump
- heap_dump_<timestamp>.hprof # Heap dump
- tls_support/ # TLS introspection results (if available)
If --extended is used, the following are also included:
- conf/, logs/, server-plugins/, apps/, domains/, policies/
# logs/ capped at 100MB / 7 days by default
# configurable via --logsmaxtotalsize / --logsmaxage
Archive Format:
- Uses ZIP format when 'zip' command is available
- Falls back to TAR.GZ format when only 'tar' is available



