Hitachi

Hitachi Application Server V10 Command Reference Guide (For Windows® Systems)


4.2.1 eheapprof

Output of extended thread dump containing the Explicit heap detailed information

Synopsis

eheapprof [-i|-f] [-freeratio] -p process-ID

Storage location

Application Server installation directory\jdk\jre\bin\

Function

This command outputs the extended thread dump containing the Explicit heap detailed information for java processes of the process ID specified in arguments. You can also output the statistical information of an object within the Explicit memory block, and the release ratio information of the Explicit memory block to an extended thread dump.

Execution permission

Execute the command as the same user as the user of the java process specified by the process ID in the arguments.

Arguments

-i

Displays a message confirming the execution of the output processing for an extended thread dump containing the Explicit heap detailed information. You input either y or n. If you input y, the extended thread dump containing the Explicit heap detailed information will output. If you input n, no information will be displayed and the processing will terminate. 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 will become valid.

-freeratio

Enables the output of the object release ratio information of the Explicit memory block and outputs an extended thread dump.

When you execute the eheapprof command by specifying this option, Java VM executes the following process and acquires the object release ratio information.

  • The full garbage collection

  • An Explicit memory block release process

The execution of these processes lead to a risk of stopping the execution of an application for a few seconds and hence we recommend that you output the object release ratio information of the Explicit memory block during system development or when operations are stopped.

-p process-ID

Specifies the process ID of the java program that outputs the extended thread dump containing the Explicit heap detailed information.

Type: Integer

The following values can be specified:

  • 0 to 4294967295

Output format

When the output of the object release ratio information of the Explicit memory block is disabled:

Explicit Heap Status
--------------------
 max EH_MAX, total EH_TOTAL, used EH_USED, garbage EH_GARB (EH_PER1
 used/max, EH_PER2 used/total, EH_PER3 garbage/used), EM_NUMS spaces exist
 
 Explicit Memories(EM_MGR_PTR)

 "EM_NAME" eid=EID(EM_PTR)/EM_TYPE, total EM_TOTAL, used EM_USED,
 garbage EM_GARB (EM_PER1 used/total, EM_PER2 garbage/used, FL_BLOCKS 
 blocks) EM_STAT

    deployed objects 
    ________________Size__Instances__Class________________
                   ISIZE       INUM  CNAME
                    ...
                  AISIZE      AINUM total

When the output of the object release ratio information of the Explicit memory block is enabled:

Explicit Heap Status
--------------------
 max EH_MAX, total EH_TOTAL, used EH_USED, garbage EH_GARB (EH_PER1 
 used/max, EH_PER2 used/total, EH_PER3 garbage/used), EM_NUMS spaces exist

 Explicit Memories(EM_MGR_PTR)

 "EM_NAME" eid=EID(EM_PTR)/EM_TYPE, total EM_TOTAL, used EM_USED,
 garbage EM_GARB (EM_PER1 used/total, EM_PER2 garbage/used, FL_BLOCKS
 blocks) EM_STAT

    deployed objects 
    ________________Size__Instances__FreeRatio__Class________________
                   ISIZE       INUM     FRATIO  CNAME
                    ...
                  AISIZE      AINUM total

The following explains each item in the output formt.

Classification

Item to be Output

Content of the Output

Meaning

Explicit heap information

EH_MAX

<const>K

The maximum Explicit heap size is output in kilobytes.

EH_TOTAL

<const>K

The secured Explicit heap size is output in kilobytes.

EH_USED

<const>K

The used Explicit heap size is output in kilobytes.

EH_GARB

<const>K

The internal status of the Explicit heap is output.

EH_PER1

<decimal>%

The usage rate of the Explicit heap (EH_USED/EH_MAX) is output in percentage.

EH_PER2

<decimal>%

The usage rate of the Explicit heap (EH_USED/EH_TOTAL) is output in percentage.

EH_PER3

<decimal>%

The internal status of the Explicit heap is output.

EM_NUMS

<const>

The number of enabled Explicit memory blocks is output.

EM_MGR_PTR

<ptr>

The memory address of the internal information for Explicit heap control is output. You can use this information in troubleshooting.

Explicit memory block information

EM_NAME

<letters>

The name of the Explicit memory block is output.

If the name of the Explicit memory block contains a multi-byte character, the content of the output is not fixed. (Usually, the character is corrupted in the output.)

If the Explicit memory block information is output almost at the same time of initialization of the Explicit memory block, or if the Explicit memory block was internally generated by Java VM, NULL might be output.

EID

<const>

The ID of the Explicit memory block is output.

EM_PTR

<ptr>

The memory address of the internal structure of the Explicit memory block is output. You can use this information in troubleshooting.

EM_TYPE

R|B|A

The Explicit type is output.

R indicates an Explicit memory block used inside Application Server.

B indicates an Explicit memory block used by an application.

A indicates an Explicit memory block specified by using the automatic placement configuration file.

EM_TOTAL

<const>K

The secured memory size of the Explicit memory block is output in kilobytes.

EM_USED

<const>K

The used memory size of the Explicit memory block is output in kilobytes.

EM_GARB

<const>K

The internal status of the Explicit memory block is output in kilobytes.

EM_PER1

<decimal>%

The usage rate of the Explicit memory block (EM_USED/EM_TOTAL) is output in percentage.

EM_PER2

<decimal>%

The internal status of the Explicit memory block is output.

FL_BLOCKS

<const>

0 is always output.

EM_STAT

Enable|Disable

The sub-status of the Explicit memory block is output.

Object statistics#1

ISIZE

<const>

The size of an object instantiated from a class, in the Explicit memory block, is output.

INUM

<const>

The number of objects instantiated from a class, in the Explicit memory block, is output.

CNAME

<letters>

The complete class name of the class indicated by ISIZE and INUM is output.

AISIZE

<const>

The total size of all objects in the Explicit memory block is output.

AINUM

<const>

The number of all objects in the Explicit memory block is output.

Object release ratio information#2

FRATIO

<decimal>%

The ratio of objects released by the automatic release processing of the Explicit memory block (object release ratio) is output in percentage.

Object release ratio = (number of objects of the class before automatic release processing - number of objects of the class after automatic release processing) / number of objects of the class before automatic release processing x 100

At the output of the object release ratio information, is output for the Explicit memory block that was not targeted by automatic release processing.

(Legends)

<const>: indicates a natural number.

<decimal>: indicates a positive number (to one decimal place).

<ptr>: indicates a pointer value.

<letters>: indicates an arbitrary character or character string.

#1:

The object statistics are output when the eheapprof was executed. In the object statistics, the size and number information about objects more than the actually created objects might be output. In this case, the excess object information is replaced to [I that indicates an integer-type array. This [I indicates an object that is not used in the Explicit memory block. An object not used in the Explicit memory block is convert to an integer-type array by the Java VM internal processing.

#2:

The object release ration information is output when the eheapprof command with the -freeratio option was executed.

Output example

When output of object statistics and the object release ratio information of the Explicit memory block is disabled:

Explicit Heap Status
--------------------
 max 31415926K, total 213971K, used 205369K, garbage 1234K (1.1% used/max,
 96.2% used/total, 0.0% garbage/used), 3 spaces exist

 Explicit Memories(0x12345678)

 "EJBMgrData" eid=1(0x02f25610)/R, total 154272K, used 150176K, garbage 1234K
 (97.0% used/total, 1.2% garbage/used, 0 blocks) Enable

 "VJBStored" eid=3(0x02f25910)/B, total 54272K, used 50176K, garbage 0K (90.9%
 used/total, 0.0% garbage/used, 2 blocks) Enable

 "ExplicitMemory-2" eid=2(0x02f25700)/R, total 5427K, used 5017K, garbage 0K
 (92.1% used/total, 0.0% garbage/used, 0 blocks) Enable

When output of object statistics and the object release ratio information of the Explicit memory block is enabled:

Explicit Heap Status
--------------------
 max 31415926K, total 162816K, used 150528K, garbage 10004K (0.0% used/max,
 91.1% used/total, 6.6% garbage/used), 3 spaces exist
 
 Explicit Memories(0x12345678)

  "EJBMgrData" eid=1(0x02f25610)/R, total 54272K, used 50176K, garbage 0K
 (91.2% used/total, 0.0% garbage/used, 0 blocks) 
    deployed objects 
    ________________Size__Instances__FreeRatio__Class________________
                35234568      10648          - java.util.HashMap
                 5678900      10668          - [Ljava.util.HashMap$Entry;
                 4456788       7436          - java.util.HashMap$Entry
                 4321000        200          - java.util.WeakHashMap
                 1234568        190          - [Ljava.util.WeakHashMap$Entry;
                  454400          4          - java.util.WeakHashMap$Entry
                51380224      29146 total

  "VJBStored" eid=3(0x02f25910)/B, total 54272K, used 50176K, garbage 10004K
 (90.7% used/total, 19.9% garbage/used, 5 blocks) 
    deployed objects 
    ________________Size__Instances__FreeRatio__Class________________
                35234568      10648         49 java.util.HashMap
                 5678900      10668         43 [Ljava.util.HashMap$Entry;
                 4456788       7436         50 java.util.HashMap$Entry
                 4321000        200         32 java.util.WeakHashMap
                 1234568        190         45 [Ljava.util.WeakHashMap$Entry;
                  454400          4         22 java.util.WeakHashMap$Entry
                51380224      29146 total

  "ExplicitMemory-2" eid=2(0x02f25700)/B, total 54272K, used 50176K,  garbage
 0K (91.1% used/total, 0.0% garbage/used, 0 blocks) 
    deployed objects 
    ________________Size__Instances__FreeRatio__Class________________
                35234568      10648          - java.util.HashMap
                 5678900      10668          - [Ljava.util.HashMap$Entry;
                 4456788       7436          - java.util.HashMap$Entry
                 4321000        200          - java.util.WeakHashMap
                 1234568        190          - [Ljava.util.WeakHashMap$Entry;
                  454400          4          - java.util.WeakHashMap$Entry
                51380224      29146 total

Exit Status

Exit Status

Explanation

0

Terminated normally.

1

Terminated abnormally.

2

There is no response indicating that the output processing has terminated within the fixed time for the extended thread dump containing the Explicit heap detailed information.

Output messages

If the following error messages or warning messages are issued, the extended thread dump containing the Explicit heap detailed information is not output:

No.

Error message

Explanation

1

usage: eheapprof [-f|-i] [-freeratio] -p process-id

The argument specified in the eheapprof command is wrong.

2

eheapprof: illegal option -- option

option specified in the eheapprof 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 eheapprof command outputs the current Explicit heap detailed information.

4

process-ID: Not owner

0 is specified in process-ID specified in the argument of the eheapprof command.

5

eheapprof: 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 Explicit heap detailed information cannot be output. The output request for the extended thread dump containing the Explicit heap detailed information is cancelled.

6

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

If the directory for temporary files cannot be acquired, the extended thread dump containing the Explicit heap detailed information cannot be output. The output request for the extended thread dump containing the Explicit heap detailed information is cancelled.

7

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

The internal files could not be deleted when the eheapprof command is terminated. Delete the un-deleted files that exist in the full path of the un-deleted files.

8

eheapprof: unexpected error occurred: error-cause

An unexpected error occurred when executing the eheapprof command.

error-cause might display the followings:

  • When an attempt to secure the memory for an operation fails

    malloc systemcall fail (errno=Y)

  • When an attempt to close the object fails

    close systemcall fail (errno=Y)

9

eheapprof: can't communicate with process process-ID

There is a problem with the process indicated by process-ID specified in the argument of the eheapprof command and an error occurred during the communication, and therefore, the communication cannot be performed. Alternatively, the process indicated by process-ID specified in the argument of the eheapprof command does not exist.

10

process-ID: Timeout occurred. Java process not responding

The process indicated by process-id specified in the argument of the eheapprof command did not return a response indicating that the output processing terminated within the fixed time for the Explicit heap detailed information.

Notes