CL Command Reference - ANZJVM

CL Command List > ANZJVM Reference

Description:

The Analyze Java Virtual Machine (ANZJVM) command collects information about the Java Virtual Machine (JVM) for a specified job. A set of JVM information is collected immediately when the command is run. This collected JVM data is called a snapshot. A second snapshot is taken a specified amount of time later. By taking a snapshot of the JVM and comparing the data with a snapshot taken at a later time, the data can be analyzed to help find object leaks. The information is dumped using printer file QSYSPRT. The user data for the QSYSPRT file is ¡¯ANZJVM¡¯. The dump includes formatted information about the JVM heap. Details include names of classes, number of active objects per class, and the class loader used to load each class.

Restrictions:

. This command uses the Start Service Job (STRSRVJOB) and Start Debug (STRDBG) commands. The user of this command must be authorized to those commands.

. This command is shipped with public *EXCLUDE authority and the QPGMR, QSYSOPR, QSRV, and QSRVBAS user profiles have private authorities to use the command.

. This command must be run under a user profile that is the same as the job user identity of the JVM job, or that has use (*USE) authority to the job user identity of the JVM job.

. This command is not allowed if the remote service operation has been started for another job and that job is not the same job specified on this command.

. This command is not allowed if the JVM job is held, suspended, or ending.


Examples:

ANZJVM JOB(099246/FRED/QJVACMDSRV) INTERVAL(60)

This command will collect two snapshots of the Java Virtual Machine (JVM), 60 seconds apart, for the job with job name QJVACMDSRV, user name FRED, and job number 099246. The analyzed data from the snapshots is written to a spooled file. The spooled file name will be QSYSPRT and the spooled file user data text will be ANZJVM.