How to get JVM details on a running Streaming application

How to get JVM details on a running Streaming application

book

Article ID: KB0073347

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.6 and later

Description

How can I get JVM details on a running Streaming engine for troubleshooting/monitoring?

Resolution

First, determine the running engine name by executing the 'epadmin browse services' command. For example..
> epadmin browse services

Browsing services. Interrupt to exit.
Browsed State =  Added
Service Name =  jms.resub
Service Type =  node
Network Address =  dtm-adm://hostname:14338

Browsed State =  Added
Service Name =  hello.lv
Service Type =  node
Network Address =  dtm-adm://hostname:55897

...

Browsed State =  Added
Service Name =  liveview.default-engine-for-com.tibco.ldm.sample.lv_sample_helloliveview.hello.lv
Service Type =  liveview
Network Address =  sb://hostname:10000 lv://hostname:10080

Browsed State =  Added
Service Name =  eventflow.default-engine-for-com.sample.adapter.jms.jms.resub
Service Type =  eventflow
Network Address =  sb://hostname:10001
For each eventflow or liveview Service Type returned, look at the associated Service Name value.  This value has the format:
  • eventflow.<EngineName>.<NodeName>
  • liveview.<EngineName>.<NodeName>
..where <NodeName> is the Service Name associated with the node Service Type. In the above example, the <EngineName> for the eventflow Service Type is 'default-engine-for-com.sample.adapter.jms' (and <NodeName> is 'jms.resub'). Similarly, the <EngineName> for the liveview Service Type is 'default-engine-for-com.tibco.ldm.sample.lv_sample_helloliveview' (and <NodeName> is 'hello.lv').

Next, find the process ID of the running engine using the jcmd utility, which comes standard with your Streaming installation under $STREAMBASE_HOME/jdk/bin/jcmd. Following the above example..

Linux:
jcmd -l | grep "default-engine-for-com.sample.adapter.jms"
1862 default-engine-for-com.sample.adapter.jms
Here, the process ID for the engine 'default-engine-for-com.sample.adapter.jms' is 1862.

Windows:
jcmd -l | findstr /L "default-engine-for-com.sample.adapter.jms"
30156 default-engine-for-com.sample.adapter.jms
Here, the process ID for the engine 'default-engine-for-com.sample.adapter.jms' is 30156.

You may now use the jcmd utility to get additional details about the running engine. For example..
jcmd 1862 GC.heap_info (info on current heap memory usage)
jcmd 1862 Thread.print (takes a thread dump, similar to the jstack utility)
jcmd 1862 VM.command_line (displays all JVM arguments, e.g. -Djava.io.tmpdir)
jcmd 1862 VM.dynlibs (displays the dynamic libraries used by this application)
jcmd 1862 VM.flags (displays all JVM flags, e.g. -XX:+UseG1GC)
jcmd 1862 VM.info (displays a more detailed summary of the VM and the OS. This includes the details from other commands like VM.command_line and VM.system_properties)
jcmd 1862 VM.log output="file=gc.log" output_options="filecount=5,filesize=10m" what="gc=debug" decorators="time,level" (Enables GC logging, which can be disabled later with 'VM.log disable') 
jcmd 1862 VM.system_properties (displays all system properties, e.g. com.tibco.ep.dtm.administration.port)
jcmd 1862 VM.version (displays the full JVM version)
jcmd 1862 VM.uptime (displays the uptime of this JVM in seconds)

 

Issue/Introduction

Discusses how to use jcmd to get additional details on a running Streaming or LiveView application

Additional Information

Oracle Help for jcmd