Hitachi

uCosminexus Application Server Command Reference Guide


jheapprof (Output of extended thread dump containing Hitachi class-wise statistical information)

Organization of this page

Format

jheapprof [-i|-f] [-class class-name] [-staticroot|-nostaticroot]
          [-explicit|-noexplicit] [-fullgc|-copygc|-nogc]
          [-garbage|-nogarbage] [-rootobjectinfo|-norootobjectinfo]
          [-rootobjectinfost value ] [-force] -p process-ID

Function

This command outputs an extended thread dump that contains the Hitachi class-wise statistical information for the java process indicated by the process ID specified in the argument.

Arguments

-i

Displays the message confirming the execution of the output processing for an extended thread dump containing the Hitachi class-wise statistical information. You input either y or n. If you input y, the extended thread dump containing the Hitachi class-wise statistical information is output. If you input n, no information is output and the processing terminates. Even if you omit this option, the option is valid as long as the -f option is not specified.

-f

Disables the -i option. If you omit this option, the -i option becomes valid.

-class class-name

Creates a list of the classes that include the specified class as a member, and outputs the list within the thread dump.

-staticroot

Enables the reference related information output functionality that is based on the static field and outputs the reference related information based on the static field. The functionality is enabled even if this option is omitted, unless the -nostaticroot option is specified.

The specification of the -class option is a prerequisite for this option. When you do not specify the -class option, this option is disabled.

If this option is concurrently specified with the nostaticroot option, the option specified at the end is enabled.

-nostaticroot

Disables the reference related information output functionality based on the static field. If this option is omitted, the -staticroot option takes effect.

If this option is concurrently specified with the -staticroot option, the option specified at the end is enabled.

-explicit

The Explicit heap is included in the statistics of the instance statistics function. If omitted, this option is enabled unless the -noexplicit option is specified.

Note that if this option and the -noexplicit option are specified concurrently, the option specified last is enabled.

-noexplicit

The Explicit heap is not included in the statistics of the instance statistics function. If it is omitted , this option is enabled as long as -copygc and -nogc option are not specified. If omitted, the -explicit option is enabled. Note that if this option and the -explicit option are specified concurrently, the option specified last is enabled.

-fullgc

If this option is specified, the command performs Full GC before compiling statistics. If omitted, this option is enabled unless the -copygc option and -nogc option is specified.

Note that if you concurrently specify this option with the -copygc option or the -nogc option, the option that is specified last is applied.

-copygc

If this option is specified, the command performs Copy GC before compiling statistics. If this option and the -nogc option are omitted, the -fullgc option is enabled.

Note that if you concurrently specify this option with the -fullgc option or the -nogc option, the option that is specified last is applied.

-nogc

If this option is specified, the command does not perform GC before compiling statistics. If this option and the -copygc option are omitted, the-fullgc option is enabled. Note that if you concurrently specify this option with the -fullgc option or the -copygc option, the option that is specified last is applied.

-garbage

Enables the unused object statistic function in the Tenured area and outputs the Hitachi class-wise statistical information for the statistic information of the unused objects to the Tenured area. The instance statistic function and the STATIC member statistic function are disabled. If omitted, the -nogarbage option is enabled. For selection of the type of GC to be performed before compiling statistics, the -fullgc and -copygc options are disabled, and the -nogc option is enabled. Therefore, the command does not perform GC before compiling statistics. Note that if you specify this option concurrently with the-nogarbage option, the option that is specified last will be applied.

-nogarbage

The unused object statistic function in the Tenured area is disabled. Therefore, the Hitachi class-wise statistical information is not output for the statistic information of the unused objects to the Tenured area. If omitted, this option is enabled unless you specify the -garbage option. Note that if you specify this option concurrently with the -garbage option, the option that is specified last will be applied.

-rootobjectinfo

The output functionality of the base object list for increasing the Tenured area is enabled and outputs the base object for increasing the Tenured area.

For this option, you must enable the -garbage option. Also, when you enable the -nogarbage option, this option is disabled. If omitted, this option is enabled unless you specify the -norootobjectinfo option. Note that if you specify this option concurrently with the -norootobjectinfo option, the option specified last will be applied.

-norootobjectinfo

The base object list output functionality for increasing the Tenured area is disabled. Therefore, the base object list for increasing the Tenured area is not output. If you omit the output of the base object list, the -rootobjectinfo option is enabled. Note that if you specify this option concurrently with the -rootobjectinfo option, the option specified last will be applied.

-rootobjectinfost value

Controls the volume of the information of the basic object list for increasing the Tenured area.

The class information, with the total instance size greater than the specified value, is output to the basic object list for increasing the tenured area. If you omit this value, 0 is specified.

For this option, you must enable the -rootobjectinfo option. Therefore, when you enable the -norootobjectinfo option, this option is disabled. You can specify a whole number in value. When you specify any number other than a whole number or a character string, the process ends with an error message indicating that there is an error in specifying the argument.

-force

Requests the output of the extended thread dump for the java process indicated by the process ID specified in the -p option, without confirming the existence of the /tmp/hsperfdata_user-name/process-ID file created in the java process.

Note that this option is for UNIX.

-p process-ID

Specifies the process ID of the Java program for which the Hitachi class wise statistical information is to be output.

Return values

0:

The command terminated normally.

1:

The command terminated abnormally.

2:

There is no response indicating that the output processing has terminated within the fixed time for the Hitachi class-wise statistical information.

Input example

  1. Execution of the jheapprof command, with the -f option omitted:

    % jheapprof -p 2463
  2. In Windows, a message confirming the output of the extended thread dump containing the Hitachi class-wise statistical information is displayed. In UNIX, the process ID confirmation message is displayed:

    • In Windows:

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

    • In UNIX:

      send SIGQUIT to 2463: ? (y/n)

  3. In Windows, input y to output the extended thread dump containing the Hitachi class-wise statistical information (Alternatively, you input n). In UNIX, enter y to send the SIGQUIT signal or enter n to not send the signal:

    • In Windows:

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

    • In UNIX:

      send SIGQUIT to 2463: ? (y/n)y

  4. When the extended thread dump containing the Hitachi class-wise statistical information is output, the running java program issues the following message:

    Writing Java core to javacore2463.030806215140.txt... OK
  5. The running java program creates an extended thread dump containing the Hitachi class-wise statistical information (javacoreprocess-id.date.txt) in the current directory and continues.

Output format

For the output format of the Hitachi class-wise statistical information, see 9.10 Class-wise statistical information analysis functionality in the uCosminexus Application Server Maintenance and Migration Guide.

Output messages

If the following error messages or warning messages are issued, the extended thread dump containing the Hitachi class-wise statistical information is not output:

Table 10‒11: Error messages output by the jheapprof command (in Windows)

No.

Error message

Explanation

1

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

An argument specified for the jheapprof command is invalid.

2

jheapprof: illegal option --option

The indicated option (option) specified in the jheapprof command is invalid.

3

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

The process indicated by process-id specified in the argument of the jheapprof command is currently engaged in the output of the class-wise statistical information.

4

process-id: Not owner

0 is specified in process-id specified in the argument of the jheapprof command.

5

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

If the user does not have permission to reference or write data into the directory for temporary files, the extended thread dump containing the Hitachi class-wise statistical information cannot be output. The output request for the extended thread dump containing the Hitachi class-wise statistical information is cancelled.

6

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

If directory for temporary files cannot be acquired, the extended thread dump containing the Hitachi class-wise statistical information cannot be output. The output request for the extended thread dump containing the Hitachi class-wise statistical information is cancelled.

7

jheapprof: please delete name-of-undeleted-file in full-path-of-undeleted-file

When the jheapprof command terminated, it could not delete an internal file. Delete the indicated file on the indicated full path.

8

jheapprof: unexpected error occurred: error-cause

An unexpected error occurred during jheapprof command execution.

The following are examples of causes that may be displayed in error-cause:

  • When work memory could not be allocated:

    malloc systemcall fail (errno=Y)

  • When an object could not be closed:

    close systemcall fail (errno=Y)

9

jheapprof: can't communicate with process process-id

Communication with the process indicated by process-id specified in the jheapprof command was not possible because the process has a problem or an error occurred in communication.

10

process-id: Timeout occurred. Java process not responding.

The process indicated by process-id specified in the jheapprof command did not return a response indicating that the process for output of Hitachi class wise statistics was completed within the specified amount of time. Or, the indicated process (process-id) is not a Java process.

Table 10‒12: Error messages output by the jheapprof command (in UNIX)

No.

Error message

Explanation

1

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

An argument specified for the jheapprof command is invalid.

2

jheapprof: illegal option --option

The indicated option (option) specified in the jheapprof command is invalid.

3

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

The process indicated by process-id specified in the argument of the jheapprof command is currently engaged in the output of the class-wise statistical information.

4

process-id: No such process

The process indicated by process-id specified in the argument of the jheapprof command is not found or the process indicated by process-id specified in the jheapprof command is not the java process.

5

process-id: Not owner

The user is not the owner of the process indicated by process-id specified in the argument of the jheapprof command.

6

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

If the user does not have permission to reference or write data into the directory for temporary files, the extended thread dump containing the Hitachi class-wise statistical information cannot be output. The output request for the extended thread dump containing the Hitachi class-wise statistical information is cancelled.

7

jheapprof: please delete name-of-undeleted-file in full-path-of-undeleted-file

When the jheapprof command terminated, it could not delete an internal file. Delete the indicated file on the indicated full path.

8

jheapprof: unexpected error occurred: error-cause

An unexpected error occurred during jheapprof command execution.

The following are examples of causes that may be displayed in error-cause:

  • When work memory could not be allocated:

    malloc systemcall fail (errno=Y)

  • When an object could not be closed:

    close systemcall fail (errno=Y)

9

process-id: Timeout occurred. Java process not responding.

The process indicated by process-id specified in the argument of the jheapprof command did not return a response indicating that the output processing terminated within the fixed time for the Hitachi class-wise statistical information.

Notes