Monitoring Java EE Components

Monitoring Application Servers and Collaborations (Command Line)

You can monitor application servers and Collaborations by using the runtime service of the Enterprise Manager command-line client.

Before you begin, ensure that the Enterprise Manager server is running.

Set the -s argument to RuntimeService51x. Set the -m argument to the desired method. For each parameter, set the -P argument to the name and value.


Note –

The commands are shown on multiple lines for readability. You must enter the commands on a single line.


Listing the Available Methods For the Runtime Service

You can display a list of the available methods for the runtime service by using the -n argument. For example:


em-cmdline-client -l entmgrhost -p 15000 -u Administrator -w STC
-s RuntimeService51x -n

 Note: the order of the parameters is important.
 Available methods and parameters:

-m getState -Pcomponent=<component> -PcomponentType=<componentType>
-m startComponent -Pcomponent=<component> -PcomponentType=<componentType>
-m getComponentsList
-m stopComponent -Pcomponent=<component> -PcomponentType=<componentType>
-m getStatus -Pcomponent=<component> -PcomponentType=<componentType>

Displaying the List of Components

The methods of the runtime service require you to specify the component path and component type. The getComponentsList method enables you to obtain this information. For example:


em-cmdline-client -l entmgrhost -p 15000 -u Administrator -w STC
-s RuntimeService51x
-m getComponentsList

e51x|Servers|myserver:4848
is51x

e51x|Servers|myserver:4848|IQ_Manager_18007
stcms

e51x|Servers|myserver:4848|Sun_JMQ_7676
jmq

e51x|Servers|myserver:4848|Project1|Deployment1|CMap1|Service1
jce.JavaCollaborationDefinition

e51x|Servers|myserver:4848|Project1|Deployment1|CMap1|Service2
jce.JavaCollaborationDefinition

e51x|Servers|myserver:4848|Project1|Deployment1|CMap1|Topic1
messageService.Topic

Displaying the Current State

The getState method enables you to display the current state of an application server or Collaboration, as well as a JMS IQ Manager. You must specify the following parameters: the component path and the component type. For example:


em-cmdline-client -l entmgrhost -p 15000 -u Administrator -w STC
-s RuntimeService51x
-m getState
-Pcomponent="e51x|Servers|myserver:4848"
-PcomponentType=is51x

Up

Viewing Basic Information

The getStatus method enables you to view basic information for an application server or Collaboration. You must specify the following parameters: the component path and the component type. For example:


em-cmdline-client -l entmgrhost -p 15000 -u Administrator -w STC
-s RuntimeService51x
-m getStatus
-Pcomponent="e51x|Servers|myserver:4848"
-PcomponentType=is51x

HostAndPort = myserver:4848
Component = e51x|Servers|myserver:4848
System = e51x
RestartRequired = true

Starting and Stopping Collaborations

The startComponent method enables you to start a Collaboration. You must specify the following parameters: the component path and the component type. For example:


em-cmdline-client -l entmgrhost -p 15000 -u Administrator -w STC
-s RuntimeService51x
-m startComponent
-Pcomponent="e51x|Servers|myserver:4848|Project1|Deployment1|CMap1|Service1"
-PcomponentType=jce.JavaCollaborationDefinition

The stopComponent method enables you to stop an application server domain, an application server instance, or a Collaboration. You must specify the following parameters: the component path and the component type. For example:


em-cmdline-client -l entmgrhost -p 15000 -u Administrator -w STC
-s RuntimeService51x
-m stopComponent
-Pcomponent="e51x|Servers|myserver:4848|Project1|Deployment1|CMap1|Service1"
-PcomponentType=jce.JavaCollaborationDefinition

Note –

You cannot stop a message server with the stopComponent method.


The command line does not provide feedback to indicate that the method succeeded. However, you can verify whether the component is up or down by using the getState method.