Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/IT Service Level Management Description, User's Guide, Reference and Operator's Guide


7.2.4 Thread dumps

A thread dump is a file to which information about the threads running in a Java process is output.

This subsection explains the jheapprof command that is used to collect thread dumps.

jheapprof (outputs an extended thread dump with statistics by Hitachi class)

The following explains the function, format, and an example of the jheapprof command.

For the format of command explanations, see Format of command explanations in 9. Commands.

Function

Outputs for Java processes extended thread dumps containing statistics by Hitachi class. From the statistics by Hitachi class, you can obtain the size of all instances under the members of the instances of each class.

Format
jheapprof [-i|-f] [-class class-name] [-explicit|-noexplicit] [-fullgc|-copygc|-nogc] -p process-ID
Execution permission

None

Storage folder
  • For ITSLM - Manager:

    ITSLM-Manager-installation-folder\mgr\system\psb\jdk\jre\bin\

  • For ITSLM - UR:

    ITSLM-UR-installation -folder\ur\system\psb\jdk\jre\bin\

Arguments
  • -i

    Specifies that the user is to be asked whether this command is to be executed on the process with the specified process ID.

    If the -f option is omitted, this option is assumed, even if it is omitted.

  • -f

    Specifies that the user is not be asked whether this command is to be executed on the process with the specified process ID.

  • -class class-name

    Specifies that the structure of the classes that have the class (instance) with the specified class name is to be output to the thread dump as members in list format. You must enclose the package name of the specified class in double quotation marks (").

  • -explicit

    Specifies that an explicit heap is to be included as a target of the instance statistics function. If this option is specified together with the -noexplicit option, the last option specified takes effect. Note that there is no need to specify this option in ITSLM.

  • -noexplicit

    Specifies that an explicit heap is not to be included as a target of instance statistics function. If this option is specified together with the -explicit option, the last option specified takes effect. Note that there is no need to specify this option in ITSLM.

  • -fullgc

    Specifies that a full garbage collection is to be performed before statistics information is output.

    If this option is specified together with the -copygc or -nogc option, the last option specified takes effect.

  • -copygc

    Specifies that a copy garbage collection is to be performed before statistics information is output.

    If this option is specified together with the -fullgc or -nogc option, the last option specified takes effect.

  • -nogc

    Specifies that a garbage collection is not to be performed before statistics information is output.

    If this option is specified together with the -fullgc or -copygc option, the last option specified takes effect.

  • -p process-ID

    Specifies the process ID of the Java program for which statistics by Hitachi class are to be output.

Notes:

This command cannot be executed more than once on the same Java process. If you want to execute this command on the same Java process more than once, wait until the extended thread dump with statistics by Hitachi class has been output by the first execution of the jheapprof command before executing the command again.

When a Java process starts, it uses MailSlot to initialize communication. If initialization fails, the Java process outputs a message and cancels the processing.

This command can be executed by a user who is not the owner of the Java process whose process ID is specified in the argument.

When any of the following messages is output, an extended thread dump with statistics by Hitachi class has not been output.

No.

Error message

Description

1

usage: jheapprof [-f|-i] [-class classname] [-explicit|-noexplicit] [-fullgc|-copygc|-nogc] [-garbage|-nogarbage] [-rootobjectinfo|-norootobjectinfo] [-rootobjectinfost size] -p process-id jheapprof

An invalid argument was specified in the command.

2

jheapprof: illegal option -- option

An invalid option was specified in the jheapprof command.

3

process-ID: Now processing previous request, this request canceled

The process whose process ID was specified in the argument of the jheapprof command is already outputting statistics by Hitachi class.

4

process-ID: Not owner

0 is specified as the process ID in the argument of the jheapprof command.

5

jheapprof: can't create work file at temporary directory , this request canceled

An extended thread dump with statistics by Hitachi class could not be output, because the command does not have view or write permission for the temporary files folder. The request to output an extended thread dump with statistics by Hitachi class has been canceled.

6

jheapprof: can't get temporary directory, this request canceled

An extended thread dump with statistics by Hitachi class could not be output, because the command was not able to fetch data from the temporary files folder. The request to output extended thread dump with statistics by Hitachi class has been canceled.

7

jheapprof: please delete name-of-file-that-could-not-be-deleted in full-path-of-file-that-could-not-be-deleted

When the jheapprof command terminated, the internal file could not be deleted. Delete the indicated file on the indicated full path.

8

jheapprof: unexpected error occurred: <cause-of-error>

An unexpected error occurred during execution of the jheapprof command.

The following information might be displayed as the cause of the error:

malloc systemcall fail (errno=Y): A shortage of work memory occurred.

close systemcall fail (errno=Y): An object close error occurred.

9

jheapprof: can't communicate with process <process-ID>

Communication failed due to an error because there was a problem in the process whose process ID was specified in the argument of the jheapprof command. Or, the process whose process ID was specified in the argument of the jheapprof command was not found.

10

<process-ID>: Timeout occurred. Java process not responding

The process whose process ID was specified in the argument of the jheapprof command did not send a response to termination of the process for output of statistics by Hitachi class within a specific amount of time.

Return value

Return value

Description

0

The command terminated normally.

1

An error occurred in the command.

2

There was no response to termination of the process for output of statistics by Hitachi class within a specific amount of time.

Example

This example obtains an extended thread dump with statistics by Hitachi class of a Java program whose process ID is 8662:

jheapprof -p 8662

When this command executes, the following message is output asking whether an extended thread dump with statistics by Hitachi class is to be output:

Force VM to output HitachiJavaHeapProfile: ? (y/n)

To output an extended thread dump with statistics by Hitachi class, enter Y or y. If any other character is entered, the command terminates without outputting an extended thread dump with statistics by Hitachi class.

Force VM to output HitachiJavaHeapProfile: ? (y/n)y

When an extended thread dump with statistics by Hitachi class is output, the running Java program displays the following message:

Writing Java core to javacore8662.030806215140.txt... OK

This Java program outputs an extended thread dump with the following file name in the current folder and then continues its processing:

javacoreprocess-ID.date-and-time.txt