Using the dump viewer in batch mode

For long running or routine jobs, jdmpview can be used in batch mode.

You can run a single command without specifying a command file by appending the command to the end of the jdmpview command line. For example:
jdmpview -core mycore.dmp info class
When specifying jdmpview commands that accept a wildcard parameter, you must replace the wildcard symbol with ALL to prevent the shell interpreting the wildcard symbol. For example, in interactive mode, the command info thread * must be specified as:
jdmpview -core mycore.dmp info thread ALL
Batch mode is controlled with the following command line options:
-cmdfile <path to command file>
A file that contains a series of jdmpview commands. These commands are read and run sequentially.
Start of changes for service refresh 2The command file can have empty lines that contain spaces, or comment lines that start with // or #. These lines are ignored by jdmpview. End of changes for service refresh 2
-charset <character set name>
The character set for the commands specified in -cmdfile.
The character set name must be a supported charset as defined in java.nio.charset.Charset. For example, US-ASCII.
-outfile <path to output file>
The file to record any output generated by commands.
-overwrite
If the file specified in -outfile exists, this option overwrites the file.
Start of changes for service refresh 3-appendEnd of changes for service refresh 3
Start of changes for service refresh 3If the file specified in -outfile exists, new output messages are appended to the end of that file. The -append and -overwrite options cannot be used at the same time.End of changes for service refresh 3
Consider a command file, commands.txt with the following entries:
info system
info proc
The jdmpview command can be run in the following way:
jdmpview -outfile out.txt [-overwrite|-append] -cmdfile commands.txt -core <path to core file>
When the output file exists, you need to specify either the -overwrite option or the -append option. If you do not, then an error message is shown.
Output similar to the following is shown in the console and in the output file, out.txt:
DTFJView version 4.29.5, using DTFJ version 1.12.29003 
Loading image from DTFJ...

For a list of commands, type "help"; for how to use "help", type "help help"
Available contexts (* = currently selected context) :

Source : file:/home/test/core.20120228.113859.14043.0001.dmp
        *0 : PID: 14073 : 

JRE 1.8.0 Linux ppc64-64 build 20121121_128976 (pxp6480-20121121_01)
> info system

Machine OS:     Linux
Machine name:   madras
Machine IP address(es):
                9.20.88.155
System memory:  8269398016

Java version :



JRE 1.8.0 Linux ppc64-64 build 20121121_128976 (pxp6480-20121121_01)

> info proc

         Native thread IDs:
          14044 14073

         Command line arguments
          sdk/jre/bin/java -Xdump:system:events=vmstop -version

         JIT was enabled for this runtime
          AOT enabled, FSD enabled, HCR disabled, JIT enabled

         Environment variables:
          LESSKEY=/etc/lesskey.bin
          LESS_ADVANCED_PREPROCESSOR=no
          HOSTTYPE=ppc64
          CSHEDIT=emacs
          G_BROKEN_FILENAMES=1
          LESSOPEN=lessopen.sh %s
          MINICOM=-c on
          PATH=/home/test/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
          INFODIR=/usr/local/info:/usr/share/info:/usr/info