javatrace (trace information collection)

Format

javatrace core-file-name executable-file-name [output-file-name] [-l library-file-name ...]

Function

This command collects stack trace information from a core file. This command is for UNIX only.

When a Java VM terminates abnormally and generates a core file, this command is executed to collect the information that is needed to identify the cause of the abnormal termination. You can use this command for conducting a detailed investigation of the cause of a process failure.

Arguments

core-file-name
Specifies the name of a core file.
executable-file-name
Specifies the name of the executable file that generated the core file.
output-file-name
Specifies a name for the output file.
If omitted, the trace information is output to javatrace.log under the current directory.
-l library-file-name
Specifies the library file to be used.
You do not need to specify this argument if you execute javatrace at the machine on which the core file was generated.

Return values

0:
The command terminated normally.
1:
The command terminated abnormally.

Input example

When a Java VM terminates abnormally and generates a core file, the message shown below is issued. Execute the javatrace command character string within this message.

Note that this message is also output to the error report file (hs_err_pidprocess-id.log), which is generated during abnormal termination.

 :
# You can get further information from javatrace.log file generated
# by using javatrace command.
# usage: javatrace core-file-name loadmodule-name [out-file-name] [-l(library-name)...]
# Please use javatrace command as follows and submit a bug report
# to Hitachi with javatrace.log file:
# [/opt/Cosminexus/jdk/jre/bin/javatrace core /opt/Cosminexus/CC/server/bin/cjstartsv]
#

When the name of the core file is core:

/opt/Cosminexus/jdk/jre/bin/javatrace core /opt/Cosminexus/CC/server/bin/cjstartsv

Depending on the OS, the name of the actual core file that is output may be core.process-id. If this is the case, specify the name of the actual core file that is output in the javatrace command argument.

When the name of the core file is core.process-id:

/opt/Cosminexus/jdk/jre/bin/javatrace core.8326 /opt/Cosminexus/CC/server/bin/cjstartsv

Output messages

If any of the error messages described below or a warning message is issued, the stack trace information was not output.

Table 10-9 Error messages output by the javatrace command

No.Error messageExplanation
1usage : javatrace core-filename loadmodule-name [out-filename] [-l library-name...]An argument specified in the javatrace command is invalid.
2javatrace: Cannot open file-name: No such file or directoryA file (file-name), other than the one specified in output-file-name, could not be found.
3javatrace: Cannot open file-name: Permission deniedLoading of a file (file-name) is not permitted.
4javatrace : Cannot create file-name: Already existThe file (file-name) specified in output-file-name already exists.
5* unknown core type(XXXXXXX) ignored.The file specified in core-file-name is not a core file.
6* ERROR : file-name, unknown magic(0xXXXX)The file specified in executable-file-name is not an executable file.
7WARNING : core file may not match loadmodule (core file from 'loadmodule-name')The file specified in executable-file-name does not match the executable file (loadmodule-name) extracted from the core file specified in core-file-name.
8javatrace : Bad argument : argument-name is directoryA specified file (argument-name) is actually a directory.
9* ERROR : library-name open : No such file or directoryA shared library (library-name) included in the executable file could not be found. If the shared library was included using a relative path, you must use the -l option to explicitly specify it.
10javatrace : illegal option -- xAn invalid option character (x) is specified.
11javatrace : Cannot create file-name: Permission deniedWriting of data into the file (file-name) specified in output-file-name is not permitted.

Notes