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.
The commands are shown on multiple lines for readability. You must enter the commands on a single line.
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> |
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 |
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 |
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 |
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 |
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.