Hitachi

uCosminexus Application Server Command Reference Guide


javacore (Acquiring the core file and thread dump/in UNIX)

Organization of this page

Format

javacore [-i|-f] [-force] -p process-ID

Function

This command collects a core file and a thread dump simultaneously during execution. This command is for UNIX only.

Arguments

-i

Displays the messages for checking the execution of the core file and the thread dump output process. Enter y or n for the displayed messages. In such cases, when you enter y, the thread dump is output and when you enter n, the process ends without performing any operation. When omitted, this option is valid as long as the -f option is not specified.

-f

Invalidates the -i option. If omitted, the -i option is enabled.

-force

Outputs core for the java process with the process ID specified in the -p option without confirming the existence of the /tmp/hsperfdata_user-name/process-ID file created with the java process.

-p process-ID

Specifies the process ID of the Java program from which the core file and thread dump are to be collected.

Return values

0:

The command terminated normally.

1:

The command terminated abnormally.

2:

The core generation process did not return a response within the specified timeout time.

Input example

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

    javacore -p 8326
  2. A message for confirming the execution of the core file and the thread dump output process is displayed:

    send SIGQUIT to 8326:?(y/n)
  3. Enter y to collect the core file and thread dump (otherwise enter n):

    send SIGQUIT to 8326:?(y/n)y
  4. When the core file and thread dump are collected, the Java program being executed outputs the following message:

    Now generating core file (javacore8662.030806215140.core)...
    done
     
    (thread-dump-output)
     
    Writing Java core to javacore8662.030806215140.txt... OK
  5. The Java program being executed creates the following files under the current directory and continues the program:

    Core file

    javacoreprocess-id.time.core

    Thread dump

    javacoreprocess-id.time.txt

Output messages

If any of the error messages described below or a warning message is issued, the core file and thread dump have not been collected.

Table 10‒6: Error messages output by the javacore command

No.

Error message

Explanation

1

usage: javacore [-f|-i] [-force] -p process-id

A command argument is invalid.

2

javacore: can't create work file at /tmp, this request canceled

The user does not have permission to reference or write data into /tmp.

3

javacore: illegal option --option

The indicated option specified in the command arguments is invalid.

4

javacore: unexpected error occurred: error-cause

An unexpected error occurred during command execution.

5

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

When the command terminated, a file created by the internal process of the javacore command could not be deleted. Delete the non-deleted file in the full-path-of-the-non-deleted-file.

6

process-id: No such process

No process is found that matches the process indicated by process-id specified in the argument of the javacore command or the process indicated by process-id specified in the javacore command is not the java process.

7

process-id: Not owner

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

8

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

The process indicated by process-id specified in the command is currently generating a core.

9

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

The process indicated by process-id specified in the argument of the command does not return a response indicating that the core output processing terminated within the fixed time.

Notes