Hitachi

uCosminexus Application Server Command Reference Guide


cjstopsv (stop J2EE server)

Organization of this page

Format

cjstopsv [server-name]
     [-f|-fd [thread-dump-acquisition-interval 
     thread-dump-acquisition-count]]
     [-wait termination-wait-time]

Function

This command stops a J2EE server. If the server name is omitted, the host name is assumed.

Arguments

server-name

Specifies the name of the J2EE server that is to be stopped. When the server name is omitted, the host name is assumed.

-f

Forcibly stops the J2EE server.

If Management Server starts the J2EE server as a logical server, you cannot execute the cjstopsv command from the console to stop the J2EE server forcibly. To stop such a J2EE server forcibly, you must execute the command from Management Server. For details on stopping logical servers, see the uCosminexus Application Server System Setup and Operation Guide.

-fd

Specifies that failure information for the J2EE server is to be obtained and then the J2EE server is to be stopped forcibly.

thread-dump-acquisition-interval

Specifies the interval (in seconds) for obtaining a thread dump, as an integer in the range 1 to 60. If this item is omitted, the default value of 3 seconds is assumed.

thread-dump-acquisition-count

Specifies the number of times a thread dump is to be obtained, as an integer in the range 1 to 60. If this item is omitted, the default value of 10 times is assumed.

The failure information that is obtained is described below.

  1. OS status

    Output destination for Windows:

    J2EE-server-work-directory\ejb\server-name\cjsysinfo.output-time.txt

    Output destination for UNIX:

    J2EE-server-work-directory/ejb/server-name/cjsysinfo.output-time.txt

    output-time has the format yymmddHHMMSS.

    For details on the output contents, see cjgetsysinfo (get OS status).

  2. JavaVM thread dump

    Thread dumps are obtained in accordance with the interval and count specified by thread-dump-acquisition-interval and thread-dump-acquisition-count. Depending on the status of the J2EE server process, thread dumps might not be output in accordance with the specified interval and count. For details on the output contents, see cjdumpsv (get thread dump of J2EE server).

  3. Crash dump (in Windows) or core file (in UNIX) of the J2EE server

    After the last thread dump acquisition request, a crash dump or the core file is output after the thread dump acquisition interval elapses.

    Crash dump output destination:

    Directory-specified-in-environment-variable-CJMEMDUMP_PATH#\cjmemdump.dmp

    # If the environment variable CJMEMDUMP_PATH is not specified or if the specified directory does not exist, the crash dump is not output. Also, if the crash dump already exists in the specified directory, the crash dump is overwritten.

    Core file output destination:

    J2EE-server-work-directory/ejb/server-name/core#

    #

    In Linux, specify core.process-ID-of-the-J2EE-server-stopped-forcibly

-wait termination-wait-time

Specifies the maximum amount of time (in seconds) to wait for termination, as an unsigned integer in the range 0 to 86400. The default value is 180 seconds.

Specify the cjstopsv termination wait time as the amount of time from when a normal termination request is input to the J2EE server until normal termination of the J2EE server is completed. When 0 is specified, there is no limit on the amount of time to wait for the J2EE server to terminate normally. In such cases, the -f and -fd options are ignored even if they are specified.

If the specified value is invalid, an error is output and the default value (180 seconds) is assumed.

If the J2EE server has not terminated normally when the specified amount of time has elapsed, the command executes processing based on the combination of other arguments, as described in the following table, and then terminates abnormally with termination code 2:

Combination of other arguments

Operation after timeout

-f and -fd are both omitted

The command outputs a message and terminates; in this case, the command does not stop the J2EE server.

-f is specified

The command outputs a message and terminates the J2EE server forcibly.

-fd is specified

The command outputs a message, obtains failure information and a thread dump, and terminates the J2EE server forcibly. cjstopsv processing does not terminate until acquisition of the failure information is completed.

User definition files

Return values

0:

The command terminated normally.

1 or higher:

The command terminated abnormally; for details, see the following table:

Termination code

Explanation

2

This code indicates a normal termination monitoring timeout based on the -wait specification.

Other than 2

This code is output for errors related to invalid parameters or internal errors (for details, see the message that was displayed most recently).

Notes