Chapter 3. Controlling and Monitoring JEUS Servers

Table of Contents

3.1. Controlling and Monitoring Servers
3.1.1. Life Cycle of Managed Servers
3.1.2. Starting a Managed Server
3.1.3. Shutting Down a Managed Server
3.1.4. Suspending a Managed Server
3.1.5. Resuming a Managed Server
3.2. Server Engine Configuration
3.2.1. Option to Use an Engine
3.2.2. Engine Initialization Time Configuration
3.3. Controlling and Monitoring Threads
3.3.1. Thread Monitoring
3.3.2. Thread Control
3.4. Memory Monitoring and Control
3.4.1. Memory Monitoring
3.4.2. Memory Usage Control

This chapter describes how to control and monitor JEUS servers. Only managed servers (MSs) are covered in this chapter with the assumption that the Domain Admin Server (DAS), which manages the servers, is under normal operation. The tasks that are described here can also be performed in WebAdmin. The users who are unfamiliar with command lines are recommended to use WebAdmin.

Note

For more information about server startup scripts and jeusadmin console tool, refer to JEUS Reference Book. "Chapter 3. Starting JEUS Server" and JEUS Reference Book. "4.2.2. Local Commands".

This section describes how to control and monitor servers.

The following shows the possible state transitions of an MS. DAS or the user can change the state of an MS.


ItemDescription
SHUTDOWNServer has not been started or has shut down normally.
STARTING

Server has received a start command and is in the process of starting up.

A server can be started by a startup script or the node manager. During startup, the server creates the engines(WEB, EJB, and JMS), starts JEUS services (security and GMS), and deploys registered applications, etc.

STANDBYAfter the required JEUS services have started on the server, if applications that are registered on the server fail to be deployed or distributed, the server goes into the STANDBY state.
RUNNINGA server has started and the registered applications are running normally. If a server that was in the STANDBY state is started by the force option, not all registered applications may be running.
SUSPENDING

A running server is in the process of executing the suspend command.

Except for listeners used for application services, all running services on all applications are stopped in this state.

SUSPENDEDAll applications that are deployed on the server are stopped. No services are running except for the listeners used for application services.
RESUMING

A server in the SUSPENDED state is in the process of executing the resume command.

All stopped applications are restarted and ready to provide services. After the execution of the resume command, the server goes into the RUNNING state.

SHUTTING_DOWN

A server is in the process of shutting down. The deployed applications are undeployed, and all JEUS services that were started at startup are terminated.

When a server is shutting down, a timeout setting is used to allow the currently running services to be processed. This is called a 'graceful shutdown'.

In JEUS 7, by default DAS and MS are started by a launcher. Server startup commands via a script or DAS is used to start the launcher, and the launcher prepares for the server startup and starts the server.

For more information about the launcher, refer to "1.6. Launcher".

For information about how to start a server through DAS by using the console tool or WebAdmin, refer to JEUS Domain Guide. "4.2.2. Starting Managed Servers(MSs)".

Note that this section only describes examples of starting servers by using scripts.

Example

A launcher terminates after starting JVM of a server and confirming that the server has started. In the following example, the launcher log is used to confirm that the server has been started successfully.

JEUS_HOME/bin$ ./startManagedServer -domain domain1 -server server1 
-u administrator -p adminadmin -dasurl 61.77.153.160:9736
***************************************************************
  - JEUS Home         : /home/test/jeus
  - JEUS Base Port    :
  - Added Java Option :
  - Java Vendor       : Sun
***************************************************************
...
[2012.05.12 12:29:24][2] [launcher-1] [SERVER-0201] Successfully connected to 
the Domain Administration Server(61.77.153.160:9736).
[2012.05.12 12:29:24][2] [launcher-1] [Launcher-0058] All local configurations 
are up-to-date.
...
[2012.05.12 12:29:39][2] [server1-1] [SERVER-0248] The JEUS server is STARTING.
[2012.05.12 12:29:39][2] [server1-1] [SERVER-0401] The elapsed time to start: 
10500ms.
[2012.05.12 12:29:39][2] [launcher-10] [Launcher-0034] The server[server1] 
initialization completed successfully[pid : 15432].
[2012.05.12 12:29:39][0] [launcher-1] [Launcher-0040] Successfully started 
the server. The server state is now RUNNING.
JEUS_HOME/bin$ 

Problems may occur when an MS deploys its application files during startup. In such cases, an MS remains in the STANDBY state. The application files that are deployed during startup have been executed successfully one or more times. Hence, if there is a problem, then it is likely that the files have been modified incorrectly.

If the XML tag of the application in .workspace directory, an internal JEUS directory, is modified incorrectly, the server may remain in the STANDBY state as shown in the following screenshot. For more information about deployment of the domain structure, refer to JEUS Applications & Deployment Guide. "Chapter 1. Application Management in a Domain Environment".

Caution

Since applications are generally managed by DAS, the .workspace directory of the MS must not be accessed directly.

JEUS_HOME/bin$ ./startManagedServer -domain domain1 -server server1 -u administrator 
-p adminadmin -dasurl 61.77.153.160:9736
...
[2012.05.12 17:12:48][2] [server1-1] [SERVER-0248] The JEUS server is STARTING.
[2012.05.12 17:12:48][2] [server1-1] [Deploy-0095] Distribute the application[de
ployment_helloear].
[2012.05.12 17:12:48][2] [server1-1] [SERVER-0201] Successfully connected to the
Domain Administration Server(61.77.153.160:9736).
[2012.05.12 17:12:48][0] [server1-1] [STDERR] java.lang.RuntimeException: Unexpe
cted close tag </application>; expected </module>
...
<<__!Exception__>>
[2012.05.12 17:12:48][1] [server1-1] [SERVER-0300] Distributing some registered
applications [deployment_helloear] failed.
[2012.05.12 17:12:48][2] [server1-1] [SERVER-0248] The JEUS server is STANDBY.
[2012.05.12 17:12:48][0] [server1-1] [SERVER-0250] Starting server (server1) fai
led. Staying in STANDBY.
[2012.05.12 17:12:48][2] [server1-1] [SERVER-0401] The elapsed time to start: 9541ms.
[2012.05.12 17:12:48][2] [launcher-10] [Launcher-0034] The server[server1] initi
alization completed successfully[pid : 31068].
[2012.05.12 17:12:48][0] [launcher-1] [Launcher-0042] Comp
leted starting the server but the server state is still STANDBY.
JEUS_HOME/bin$

The server-info command can be used to verify that an MS is in the STANDBY state as shown in the following example.

[DAS]domain1.adminServer>server-info

Information of Domain (domain1)
===============================================================================================
+--------+----------+-----+-------+-----+----------------+--------+-------------+-------------+
| Server |  Status  | Node|  PID  | Clus|  Latest Start  | Need to| Listen Ports| Running     |
|        |          |Name |       | ter |Time / Shutdown |Restart |             | Engines     |
|        |          |     |       |     |     Time       |        |             |             |
+--------+----------+-----+-------+-----+----------------+--------+-------------+-------------+
| adminSe| RUNNING  | N/A | 2553  | N/A | Sat May 12     | false  | base-61.77.1| jms,        | 
|rver(*) |(17175    |     |       |     |12:26:41 KST    |        |53.160:9736  | ejb, web    |
|        |sec)      |     |       |     |2012            |        | http-server-|             |
|        |          |     |       |     |                |        |0.0.0.0:8088 |             |
+--------+----------+-----+-------+-----+----------------+--------+-------------+-------------+
| server1| STANDBY  |node1| 31068 | N/A | Sat May 12     | N/A    | base-61.77.1| jms,        |
|        |(96 sec)  |     |       |     |17:12:39 KST    |        |53.58:19736  | ejb, web    |
|        |          |     |       |     |2012            |        | http-server-|             |
|        |          |     |       |     |                |        |0.0.0.0:18088|             |
|        |          |     |       |     |                |        |jms-internal-|             |
|        |          |     |       |     |                |        |0.0.0.0:19741|             |
+--------+----------+-----+-------+-----+----------------+--------+-------------+-------------+
| server2| SHUTDOWN | N/A | N/A   | N/A | N/A            | N/A    | N/A         | N/A         |
+--------+----------+-----+-------+-----+----------------+--------+-------------+-------------+
===============================================================================================

An MS can be shut down using a jeusadmin command. It can be shut down using a local-shutdown command in jeusadmin that is connected to the MS. It can also be shut down using a DAS command in jeusadmin or the console tool.

For more information about how to shut down an MS, refer to JEUS Domain Guide. "4.3.1. Shutting Down a Managed Server(MS)" .

Note

Since DAS is set to manage an MS, it is recommended to use DAS to stop an MS.

Example

There is a function called graceful shutdown that guarantees the completion of the requests currently being processed before an MS shuts down. New requests are not processed. The server stops accepting requests after it receives the stop command, but the requests that are currently being processed are allowed to finish.

The following is an example of setting the wait time in the timeout option of the MS stop command.

[DAS]domain1.adminServer>stop-server server1 -to 60000
Server [server1] was successfully stopped.

It is also possible to set a wait time when the console tool is used to directly connect to an MS.

domain1.server1>local-shutdown -to 60000
The server [server1] has been shut down successfully.
offline> 

After the server shuts down successfully, the following message is displayed.

...
[2012.05.12 18:03:04][2] [server1-63] [SERVER-0248] The JEUS server is SHUTDOWN.
[2012.05.12 18:03:04][0] [server1-63] [SERVER-0265] The JEUS server has exited.
[2012.05.12 18:03:04][0] [server1-1] [SERVER-0099] The server[server1] has been
shut down.
[2012.05.12 18:03:04][0] [server1-9] [SERVER-0565] The JVM process is shutting down.
[2012.05.12 18:03:04][0] [server1-9] [SERVER-0566] The JVM process will be terminated.

Shutting down an MS involves stopping all application services and shutting down the MS JVM.

A separate function is provided to suspend all applications by applying graceful timeout so that the requests currently being processed can be completed. To suspend applications, use WebAdmin or the suspend-server command in the console tool.

Using WebAdmin

The following are the steps for suspending a server in WebAdmin.

Using the Console Tool

The following is an example of suspending a server using the console tool.

[DAS]domain1.adminServer>suspend-server -servers server1 -to 60000
Successfully suspended server(s).

The server-info command can be used to verify that the server has been suspended.

[DAS]domain1.adminServer>server-info

Information of Domain (domain1)
================================================================================================
+--------+------------+-----+------+-----+----------------+--------+-------------+-------------+
| Server |  Status    | Node|  PID | Clus|  Latest Start  | Need to| Listen Ports| Running     |
|        |            |Name |      | ter |Time / Shutdown |Restart |             | Engines     |
|        |            |     |      |     |     Time       |        |             |             |
+--------+------------+-----+------+-----+----------------+--------+-------------+-------------+
| adminSe| RUNNING    | N/A | 2553 | N/A | Sat May 12     | false  | base-61.77.1| jms,        |
|rver(*) |(21406      |     |      |     |12:26:41 KST    |        |53.160:9736  | ejb, web    |
|        |sec)        |     |      |     |2012            |        | http-server-|             |
|        |            |     |      |     |                |        |0.0.0.0:8088 |             |
+--------+------------+-----+------+-----+----------------+--------+-------------+-------------+
| server1| SUSPENDED  |node1| 658  | N/A | Sat May 12     | N/A    | base-61.77.1| jms,        |
|        |(3 sec)     |     |      |     |18:24:02 KST    |        |53.58:19736  | ejb, web    |
|        |            |     |      |     |2012            |        | http-server-|             |
|        |            |     |      |     |                |        |0.0.0.0:18088|             |
|        |            |     |      |     |                |        |jms-internal-|             |
|        |            |     |      |     |                |        |0.0.0.0:19741|             |
+--------+------------+-----+------+-----+----------------+--------+-------------+-------------+
| server2| SHUTDOWN   | N/A | N/A  | N/A | N/A            | N/A    | N/A         | N/A         |
+--------+------------+-----+------+-----+----------------+--------+-------------+-------------+
================================================================================================

The following message is displayed when a server has been successfully suspended.

[2012.05.12 18:24:51][2] [server1-30] [SERVER-0248] The JEUS server is SUSPENDING.
...
[2012.05.12 18:24:51][2] [server1-30] [EJB-4953] [deployment_helloear#ejb] The EJB 
module stopped.
[2012.05.12 18:24:51][2] [server1-30] [WEB-3485] ServletContext[name=deployment_
helloear#web, path=/hello, ctime=Sat May 12 18:24:15 KST 2012] stopped successfully.
[2012.05.12 18:24:51][2] [server1-30] [SERVER-0248] The JEUS server is SUSPENDED.

Note

Even when a server is not managed by DAS, an MS can be suspended by directly accessing the server through the console tool.

It is possible to resume the applications of the suspended server.

Using WebAdmin

The following are the steps for resuming a server in WebAdmin.

Using the Console Tool

Even when an MS is not managed by DAS, the suspended MS can be resumed by directly accessing the server through the console tool.

The following is an example of resuming a server using the console tool.

[DAS]domain1.adminServer>resume-server -servers server1
Successfully resumed the servers.

The server-info command can be used to check that the server is in the RUNNING state.

[DAS]domain1.adminServer>server-info

Information of Domain (domain1)
==============================================================================================
+--------+----------+-----+------+-----+---------------+---------+-------------+-------------+
| Server |  Status  | Node|  PID | Clus|  Latest Start | Need to | Listen Ports| Running     |
|        |          |Name |      | ter |Time / Shutdown| Restart |             | Engines     |
|        |          |     |      |     |     Time      |         |             |             |
+--------+----------+-----+------+-----+---------------+---------+-------------+-------------+
| adminSe| RUNNING  | N/A | 2553 | N/A | Sat May 12    | false   | base-61.77.1| jms,        |
|rver(*) |(21420    |     |      |     |12:26:41 KST   |         |53.160:9736  | ejb, web    |
|        |sec)      |     |      |     |2012           |         | http-server-|             |
|        |          |     |      |     |               |         |0.0.0.0:8088 |             |
+--------+----------+-----+------+-----+---------------+---------+-------------+-------------+
| server1| RUNNING |node1| 658  | N/A | Sat May 12    | false   | base-61.77.1| jms,        |
|        |(1 sec)   |     |      |     |18:24:02 KST   |         |53.58:19736  | ejb, web    |
|        |          |     |      |     |2012           |         | http-server-|             |
|        |          |     |      |     |               |         |0.0.0.0:18088|             |
|        |          |     |      |     |               |         |jms-internal-|             |
|        |          |     |      |     |               |         |0.0.0.0:19741|             |
+--------+----------+-----+------+-----+---------------+---------+-------------+-------------+
| server2| SHUTDOWN | N/A | N/A  | N/A | N/A           | N/A     | N/A         | N/A         |
+--------+----------+-----+------+-----+---------------+---------+-------------+-------------+
==============================================================================================

The following message is displayed when the application services of the server have been resumed successfully.

[2012.05.12 18:25:07][2] [server1-30] [SERVER-0248] The JEUS server is RESUMING.
[2012.05.12 18:25:07][2] [server1-30] [Deploy-0098] Starting the application
[deployment_helloear].
[2012.05.12 18:25:07][2] [server1-30] [EJB-4952] [deployment_helloear#ejb] 
The EJB module started.
[2012.05.12 18:25:07][2] [server1-30] [WEB-3484] ServletContext[name=deployment_
helloear#web, path=/hello, ctime=Sat May 12 18:24:15 KST 2012] started 
successfully.
[2012.05.12 18:25:07][2] [server1-30] [Deploy-0099] Successfully started the 
application[deployment_helloear].
[2012.05.12 18:25:07][2] [server1-30] [SERVER-0248] The JEUS server is RUNNING.

Internally, JEUS has engines that run applications. There are separate engines for web application services, EJB application services, and JMS services. Option to use each engine can be configured during initialization, but the server must be restarted in order to apply the configuration.

The option to use each engine can be configured on the JEUS server. When an engine is configured for use, it is initialized either when the server boots or when the first application that needs the engine is deployed. If an engine is not configured for use, it does not get initialized even after the server starts, and application deployment to the engine will fail.

Warning

Previously deployed applications will fail to be deployed if the server is restarted after setting the engine for non-use. The server state also changes to STANDBY instead of RUNNING. The administrator must manually change the engine and the application states.

Option to use an engine can be configured by using WebAdmin or the console tool.

Using WebAdmin

Select a server from [Servers] in the left menu of WebAdmin to display the server configuration. Option to use each engine appears in the middle of the screen.


After clicking [Lock & Edit], configure the engine and click [OK]. Click [Apply Changes] to apply the changes and restart the server.


Using the Console Tool

The following example shows how to configure each engine on the server by using the console tool.

[DAS]domain1.adminServer>disable-engines adminServer -all
All engine(s) was(were) successfully disabled.
The configuration was changed.
================================================================================
+------------------------------------------------------------------------------+
|                                    Result                                    |
+------------------------------------------------------------------------------+
| Successfully changed only the XML.                                           |
| Restart the server to apply the changes.                                     |
+------------------------------------------------------------------------------+
================================================================================
...
[DAS]domain1.adminServer>disable-engines adminServer -web -ejb
Web EJB engine(s) was(were) successfully disabled.
The configuration was changed.
================================================================================
+------------------------------------------------------------------------------+
|                                    Result                                    |
+------------------------------------------------------------------------------+
| Successfully changed only the XML.                                           |
| Restart the server to apply the changes.                                     |
+------------------------------------------------------------------------------+
================================================================================
...

[DAS]domain1.adminServer>disable-engines adminServer -all
All engine(s) was(were) successfully enabled.
The configuration was changed.
================================================================================
+------------------------------------------------------------------------------+
|                                    Result                                    |
+------------------------------------------------------------------------------+
| Successfully applied part of the changes.                                    |
| Restart the server to apply the remaining changes.                           |
+------------------------------------------------------------------------------+
================================================================================
...
[DAS]domain1.adminServer>disable-engines adminServer -web -ejb
Web EJB engine(s) was(were) successfully enabled.
The configuration was changed.
================================================================================
+------------------------------------------------------------------------------+
|                                    Result                                    |
+------------------------------------------------------------------------------+
| Successfully applied part of the changes.                                    |
| Restart the server to apply the remaining changes.                           |
+------------------------------------------------------------------------------+
================================================================================

Each engine of JEUS can be configured for use. When an engine is configured for use, it is initialized either when the server boots or when the first application that needs the engine is deployed. If an engine is not configured for use, it does not get initialized even after the server starts, and application deployment to the engine will fail.

Option to initialize an engine can be configured by using WebAdmin or the console tool.

Using WebAdmin

Select a server from [Servers] in the left menu of WebAdmin to display the server configuration. Option to initialize each engine appears in the middle of the screen.

After clicking [Lock & Edit], configure the engine and click [OK]. Click [Apply Changes] to apply the changes, and restart the server. The screen is the same as that for configuring the option to use an engine. Refer to the previous screen.

Using the Console Tool

The following example shows how to initialize each engine on the server by using the console tool.

[DAS]domain1.adminServer>disable-engine-init-on-boot adminServer,server1
EngineInitOnBoot was successfully enabled.
The configuration was changed.
================================================================================
+------------------------------------------------------------------------------+
|                                    Result                                    |
+------------------------------------------------------------------------------+
| Successfully changed only the XML.                                           |
| Restart the server to apply the changes.                                     |
+------------------------------------------------------------------------------+
================================================================================

[DAS]domain1.adminServer>enable-engine-init-on-boot adminServer
EngineInitOnBoot was successfully enabled.
The configuration was changed.
================================================================================
+------------------------------------------------------------------------------+
|                                    Result                                    |
+------------------------------------------------------------------------------+
| Successfully applied part of the changes.                                    |
| Restart the server to apply the remaining changes.                           |
+------------------------------------------------------------------------------+
================================================================================

JEUS provides functions to monitor servlet and EJB remote threads, and system pools. JEUS also provides a function that checks thread stacks as well as sends interrupt signals to specific threads.

JEUS provides a function to monitor threads including servlet request threads, EJB remote request threads, and system thread pools.

By using the function to monitor servlet threads or EJB remote request threads, it is possible to check the thread ID, thread name, thread status, and processing time. Using the thread pool monitoring function makes it possible to know the core size, max size, and keep alive time of the system thread pool as well as the information about the threads in the system thread pool.

Note

Note that only the servlet threads and EJB remote request threads can be monitored in the console tool.

Thread Information Check

Thread information can be checked by using WebAdmin or the console tool.

Checking the Stack Trace of a Thread

It is possible to check the stack trace of a certain thread by using WebAdmin or the console tool.

Note

1. For more information about the ti and strace commands of the JEUS console tool, refer to JEUS Reference Book. "4.2.2. Local Commands".

2. Information about servlet threads, EJB remote request threads, and stack trace can be checked in [Monitoring] > [Threads] of WebAdmin. Information about the system thread pool and its threads can also be checked.

For more information, refer to"JEUS WebAdmin User Guide" and online help.

JEUS provides a function that sends an InterruptSignal to a specific thread to trigger an exception to stop the thread execution.

Caution

This function is provided experimentally. If a thread is interrupted, the thread will not be stopped right away. Instead, it checks the interrupt status and throws an exception to stop any further processing. The exception must be handled in the user application, and the user assumes responsibility for issues that occur from unhandled exceptions.

Thread Interrupt

Interrupting a thread means sending a signal to induce an exception to stop further processing of the thread. It is usually used when a request is blocked or delayed longer than expected.

When a thread is interrupted, the thread is neither forcibly stopped nor stopped immediately.

JEUS supports a function that can send the InterruptSignal to a servlet thread, EJB remote request thread, and running thread in the system thread pool. A thread can be interrupted if it is processing a JNDI remote connection, EJB, JDBC, or IO operation.

  • EJB Remote Request Thread

    An EJB issues a javax.ejb.EJBException by checking the interrupt status in the following cases.

    • When an EJBHome method like 'create' is called in the EJB 2.x way (in EJB 3.0, create is processed internally in the EJB container when the user looks up an EJB).

    • When calling an EJB business method

    The exception must be handled in the user application. If the interrupt signal is issued after the EJB business method is called, an exception may not occur. However, the thread may be interrupted when the method calls another EJB or uses a JDBC or JNDI operation.

  • JDBC

    For JDBC operations, if an interrupt signal is received while executing the following operations, a java.sql.SQLException will occur. The user application must handle the exception.

    • When getting a connection from the connection pool via DataSource#getConnection().

    • When using the java.sql.Connection from the connection pool.

    • When using the executeQuery operation after setting the use-sql-trace or stmt-caching-size option for the JDBC connection pool. (For more information about the options, refer to "6.4.2. Connection Pool Configuration")

  • JNDI

    A JNDI operation can sometimes be interrupted. If the interrupt signal is issued while executing the following JNDI operations, a javax.naming.NamingException will occur. The user application must handle the exception.

    • When connecting to a remote JNDI (when a javax.naming.InitialContext is created).

    • When a remote message is sent while executing a JNDI operation.

      The operation can be interrupted during JNDI operations such as looking up, binding, rebinding, and renaming, but not when accessing a local registry or cache.

  • IO Operation

    The IO operation can sometimes be interrupted depending on the situation.

    • java.nio.channels.SocketChannel

      An operation can be interrupted while using the java.nio.channels.SocketChannel. Connecting via the java.nio.channels.SocketChannel is performed in three steps.

      In the begin step, check whether the interrupt status of the thread is set, and close the channel if it is set. During the actual connection step, if the Interrupt Status is set, the connect() method is not called. During the end step, a java.nio.channels.ClosedByInterruptedException occurs if the Interrupt Status is set (Interrupt Status gets cleared afterwards).

    • java.nio.channels.SocketChannel#read()/java.nio.channels.SocketChannel#write()

      The java.nio.channels.SocketChannel#read() or java.nio.channels.SocketChannel#write() is performed in three steps.

      In the begin step, check whether the interrupt status of the thread is set, and close the channel if it is set. In the second step, if the interrupt status is set, read or write operation is not executed. During the end step, a java.nio.channels.ClosedByInterruptedException occurs if the Interrupt Status is set (Interrupt Status gets cleared afterwards).

      After the java.nio.channels.ClosedByInterruptedException has been thrown, if a read or write is attempted by using the previously created channel a java.nio.channels.ClosedChannelException is thrown.

    • Using java.net.Socket

      When using the java.net.Socket, the Socket IO operation can be interrupted depending on the JVM compile options in HP-UX and Solaris.

      A read or write operation that uses a socket stream can be interrupted and a java.net.SocketException is thrown. (Interrupt Status gets cleared afterwards). This does not immediately close the socket, but it stops any subsequent operations.

      A thread that is executing a socket IO operation is not interrupted in Windows, IBM AIX, and LINUX.

  • Object#wait() / Thread#sleep() /Thread#join()

    When a thread that is executing Object#wait(), Thread#sleep(), or Thread#join() can be interrupted by throwing a java.lang.InterruptedException. (Interrupt Status gets cleared afterwards).

Note

Refer to the Javadoc API of each class.

Sending the Interrupt Signal

JEUS provides a command to send an interrupt signal to a thread by using the console tool or WebAdmin.

  • Using WebAdmin

    The interrupt signal can be sent to a desired thread by clicking [interrupt] from the thread monitoring screen.

JEUS monitors the memory usage and controls the server when it exceeds the specified free memory.

Memory information can be checked in WebAdmin or the console tool.

Using WebAdmin

The following describes how to check the memory information in WebAdmin.

Note

To check memory information in WebAdmin, use the [Web] menu under the [Monitoring] menu, or use the [System Information] menu. Besides the memory information, the CPU, process, and JVM information can also be checked in the [System Information] menu. This section uses the [System Information] menu as an example.

Using the Console Tool

Memory information can also be checked by using the memory-info command in the console tool. For more information about the memory-info command, refer to JEUS Reference Book. "4.2.3. Server Management Commands".

[DAS]domain1.adminServer>memory-info -servers adminServer
Domain [domain1] Memory Information
Memory Information
================================================================================
+-------------+---------------------------+------------------------------------+
|    Server   |   Total Amount of Memory  |    The Current Amount of Memory    |
+-------------+---------------------------+------------------------------------+
| adminServer |                 177274880 |                          101567168 |
+-------------+---------------------------+------------------------------------+
================================================================================

Since this function is not commonly used in JEUS, memory related operations can only be controlled through the current system properties.

Note

1. When a memory overflow occurs, a heap dump is executed only once (created in the 'SERVER_HOME/logs' directory).

2. For IBM JDK, a heap dump is created in the directory where Java is running. In order to configure a different path, use the '-Xdump:heap:file' option. For information about other IBM heap dump options, refer to the relevant website.

The following are the properties related to memory usage control.

PropertyDescription
jeus.server.memorymonitor.enabled

Configures whether to use MemoryMoniterService. If the configuration is not enabled, then the rest of the properties do not have any meaning.

(Default value: false)

jeus.server.memorymonitor.ratioConfigures the memory overflow standard. If 0.8 is configured, then if 80% of memory is used (based on the max memory), then it shall be considered as overflow.
jeus.server.memorymonitor.interval

Configures the cycle which measures memory usage.

(Default Value: 2000, unit: ms)

jeus.server.memorymonitor.duration

Configures the time which determines memory overflow. (Default value: 60000, Unit: ms)

For example, if jeus.server.memorymonitor.ratio is 0.8 and jeus.server.memorymonitor.duration is 1 minute, then in MemoryMonitorService, when over 80% of memory is continued for over 1 minute, then it is considered as memory overflow.

jeus.server.enable.restart.in.memory.shortageWhen determined as memory overflow, then determines whether the server will be automatically restarted. (Default value: true).