uCosminexus Application Server, Maintenance and Migration Guide

[Contents][Glossary][Index][Back][Next]

4.7.2 When using separate commands

The method to output a thread dump differs depending on the JavaVM start option in which the specified J2EE server is running.

Organization of this subsection
(1) Acquiring J2EE server thread dump
(2) Acquiring the CORBA naming service thread dump
(3) Acquiring a thread dump of EJB client applications

(1) Acquiring J2EE server thread dump

If the J2EE server process (cjstartsv) exists, the J2EE server thread dump is acquired by executing the cjdumpsv command. An example of executing the cjdumpsv command is described below. As the transition status of each thread is to be confirmed over a period of time, execute the cjdumpsv command multiple times. Execute about 10 times every 3 seconds.

When you execute the cjdumpsv command, the JavaVM thread dump is output to the following files:

The default output destination of the server standard output log is ejb.server.log.directory\CC\maintenance\cjstdout.log (in Windows) or ejb.server.log.directory/CC/maintenance/cjstdout.log (in UNIX). For details about changing the output destination, see 4.3 Application Server log (Systems for executing J2EE applications) or see 4.4 Application Server log (Systems for executing batch applications). Note that the default directory path of the working directory is Cosminexus-installation-directory\CC\server\public (in Windows) or /opt/Cosminexus/CC/server/public (in UNIX).

Furthermore, the output destination of the javacore process-number.command-execution-date-and-time.txt file can be changed with the environmental variable JAVACOREDIR. However, when writing to a specified directory fails, javacore process-number.command-execution-date-and-time.txt file is output to the default output destination. When it is not possible to output even to this directory, it is output only to the standard error output.

For details about the cjdumpsv command, see cjdumpsv (acquiring thread dump of a J2EE server) in the uCosminexus Application Server Command Reference Guide.

Reference note
When a thread dump is output, the following message is output to the standard output and the execution of the java program is continued. This message is output irrespective of the -XX:+HitachiThreadDumpToStdout settings.
 
Writing Java core to full-file-path-name...OK

(2) Acquiring the CORBA naming service thread dump

In Windows, when the CORBA naming service process (nameserv) exists, press the Ctrl+Break key on the command prompt from where the CORBA naming service is started. As the transition status of each thread is to be confirmed over a period of time, execute it multiple times. Execute about 10 times every 3 seconds. Note that you cannot acquire a thread dump if the CORBA naming service is monitored from the Management Server.

In UNIX, if the CORBA naming service process (java) exists, execute the kill command, and acquire a thread dump of the CORBA naming service. Note that you cannot acquire a thread dump if the CORBA naming service is monitored from the Management Server.

To acquire a thread dump of the CORBA naming service in UNIX:

  1. Acquire the process ID of the CORBA naming service.
    The method of acquiring the process ID of the CORBA naming service differs depending on the following cases:
    When no other java process is started
     
    ps -ef | grep java
    When multiple java processes are started
    If the shell script for starting the CORBA naming service is used, you can output the process ID of the CORBA naming service in the namesv_pid file generated in the current working directory.
    An example of the shell script for starting the CORBA naming service is as follows:
     
    #!/bin/sh
    export VBROKER_ADM=/opt/Cosminexus/TPB/adm
    export SHLIB_PATH="${SHLIB_PATH}:/opt/Cosminexus/TPB/lib"
     
    # start name server process
    exec /opt/Cosminexus/TPB/bin/nameserv \
    -J-Dvbroker.agent.enableLocator=false \
    -J-Djava.security.policy==/opt/Cosminexus/CC/server/sysconf/cli.policy \
    -J-Dvbroker.se.iiop_tp.scm.iiop_tp.listener.port=900 &
     
    # save background java process pid
    echo $! > ./namesv_pid
  2. Specify the acquired process ID, and execute the kill command.
     
    kill -3 `cat namesv_pid`

(3) Acquiring a thread dump of EJB client applications

Acquire a thread dump of EJB client applications by executing the cjcldumpap command.

When the cjcldumpap command is executed, a thread dump of the EJB client application started by executing the cjclstartap command is output. Moreover, it is also possible to output a thread dump for a specific process. For details about the cjcldumpap command, see cjcldumpap (acquiring thread dump of Java applications) in the uCosminexus Application Server Command Reference Guide.

The execution format, execution example, and thread dump output destination of the cjcldumpap command are as follows:

Execution format
To output a thread dump of an EJB client application started with the cjclstartap command
cjcldumpap
To output a thread dump for a specific process
cjcldumpap process-ID

Execution example
To output a thread dump of an EJB client application started with the cjclstartap command
cjcldumpap
To output a thread dump for a specific process
cjcldumpap 3264

Output destination
Current directory from where the cjclstartap command is executed