collect-diagnostics

Collects data used for the diagnostics and troubleshooting of Payara Server incidents.

Synopsis

asadmin [asadmin-options] collect-diagnostics [--help]
[--domainDir=directory]
[--nodeDir=directory]
[--target=target]
[--dir=<file-path>]
[--serverLog={false|true}]
[--accessLog={false|true}]
[--notificationLog={false|true}]
[--domainXml={false|true}]
[--threadDump={false|true}]
[--heapDump={false|true}]
[--jvmReport={false|true}]
[--obfuscate={true|false}]
[domainName]

Description

This command will collect useful information for diagnosing incidents within a Payara Server domain.

Among the data collected is the following information:

  • domain.xml configuration file

  • Server logs

  • Access logs

  • Notification logs

  • A JVM thread dump.

  • A JVM Heap Dump

  • JVM Report

The data collected is stored in a ZIP file in your user home directory, the output directory by default.

Options

asadmin-options

Options for the asadmin utility. For information about these options, see the asadmin help page.

--help
-?

Displays the help text for the subcommand.

--target

This option helps specify the target on which data is collected. Valid values are:

deployment_group_name

Applies to every server instance in the specified deployment group.

cluster_name

Applies to every server instance in the specified cluster.

instance_name

Applies to a specific sever instance.

--domainDir

The path to the directory containing the target domain.

Defaults to as-install/glassfish/domains

--nodeDir

The path to the directory containing the target node.

Defaults to as-install/glassfish/nodes

--dir

The directory path where the ZIP file will be stored. Defaults to $+{user.home}+

--domainXml

Whether to collect the domain.xml configuration file. Defaults to true.

--serverLog

Whether to collect server logs. Defaults to true

--accessLog

Whether to collect access logs. Defaults to true

--notificationLog

Whether to collect notification logs. Defaults to true

--heapDump

Whether to collect a heap dump. Defaults to true

--threadDump

Whether to collect a thread dump. Defaults to true

--jvmReport

Whether to collect the JVM report. Defaults to true

--obfuscate

Whether to obfuscate data in domain.xml. Defaults to true

Operands

domainName

The name of the domain that will be scanned.

Defaults to domain1.

Examples

Example 1 Collect Diagnostics

The following example shows how to collect the data of all instances that belong to the deploymentGroup1 deployment group in the mydomain domain:

asadmin collect-diagnostics --target deploymentGroup1 mydomain

Directory selected /home/user/payara/diagnostics/mydomain-2024-04-15T11-42-36Z
Collecting domain.xml from instance2
Attempting to create missing path at /home/user/payara/diagnostics/mydomain-2024-04-15T11-42-36Z/deploymentGroup1/instance1
Collecting logs from instance2
Collecting jvm report from instance2
Collecting thread dump from instance2
Collecting Heap Dump from instance2
This version of Payara does not support heap dump generation.
Collecting domain.xml from instance1
Attempting to create missing path at /home/user/payara/diagnostics/mydomain-2024-04-15T11-42-36Z/deploymentGroup1/instance1
Collecting logs from instance1
Collecting jvm report from instance1
Collecting thread dump from instance1
Collecting Heap Dump from instance1

Command collect-diagnostics executed successfully.

Example 2 Collect only a Heap Dump

The following example shows how to just collect a Heap dump of all instances in the mydomain domain:

asadmin collect-diagnostics --target deploymentGroup1 --threadDump=false --domainXml=false --jvmReport=false --serverLog=false mydomain

Directory selected /home/user/payara/diagnostics/mydomain-2024-04-15T11-42-36Z
Collecting domain.xml from instance2
Attempting to create missing path at /home/user/payara/diagnostics/mydomain-2024-04-15T11-42-36Z/deploymentGroup1/instance1
Collecting Heap Dump from instance2
This version of Payara does not support heap dump generation.
Collecting domain.xml from instance1
Attempting to create missing path at /home/user/payara/diagnostics/mydomain-2024-04-15T11-42-36Z/deploymentGroup1/instance1
Collecting Heap Dump from instance1

Command collect-diagnostics executed successfully.

Exit Status

0

subcommand executed successfully

1

error in executing the subcommand

See Also