javatrace (trace information collection)
- Organization of this page
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/bin/javatrace core /opt/Cosminexus/CC/server/bin/cjstartsv] #
- When the name of the core file is core:
/opt/Cosminexus/jdk/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/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.
No. |
Error message |
Explanation |
---|---|---|
1 |
usage : javatrace core-filename loadmodule-name [out-filename] [-l library-name...] |
An argument specified in the javatrace command is invalid. |
2 |
javatrace: Cannot open file-name: No such file or directory |
A file (file-name), other than the one specified in output-file-name, could not be found. |
3 |
javatrace: Cannot open file-name: Permission denied |
Loading of a file (file-name) is not permitted. |
4 |
javatrace : Cannot create file-name: Already exist |
The 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. |
7 |
WARNING : 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. |
8 |
javatrace : Bad argument : argument-name is directory |
A specified file (argument-name) is actually a directory. |
9 |
* ERROR : library-name open : No such file or directory |
A 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. |
10 |
javatrace : illegal option -- x |
An invalid option character (x) is specified. |
11 |
javatrace : Cannot create file-name: Permission denied |
Writing of data into the file (file-name) specified in output-file-name is not permitted. |
Notes
-
You execute the javatrace command on a machine on which the core file is generated.
-
In the message output to the standard output and the error report file, when JavaVM terminates abnormally, the second argument of the javatrace command is not always the load module name of the absolute path, as given below:
# # 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/bin/javatrace /users/Java/core ../java] #
In such cases, first convert the load module name specified in the second argument of the javatrace command to the absolute path, and then execute the command.