Products | Versions |
---|---|
TIBCO BusinessEvents Enterprise Edition | 5.x |
How can BE Profiler statistics be collected from the command line, as opposed to using a GUI tool like Jconsole or JVisual VM?
java -jar jmxterm-1.0.2-uber.jar
From the jmxterm prompt, open a connection to the process ID of the running BE agent:
$> open 12345
..where 12345 is the process id of the BE agent. The process id may be obtained with the jcmd utlitity (which comes with your TIBCO JRE installation under $TIBCO_HOME/tibcojre64/<version>/bin/).
$> domain com.tibco.be
Set the bean to the BE Profiler mbean:
$> bean com.tibco.be:Group=Profiler,dir=Methods
Execute the StartFileBasedProfiler(agent-class-name, output-file-name, level-of-depth, duration-in-seconds) method. For example..
$> run StartFileBasedProfiler "inference-class" "C:/logs/be-profile.log" -1 60
The above command will profile the BE agent class named inference-class, and output the collected statistics to C:/logs/be-profile.log. The level of depth is set to ALL (-1), and statistics will be collected for a period of 60 seconds.
open 12345
domain com.tibco.be
bean com.tibco.be:Group=Profiler,dir=Methods
run StartFileBasedProfiler "inference-class" "C:/logs/be-profile.log" -1 60
close
quit
Then run the script using the command:
java -jar jmxterm-1.0.2-uber.jar -i jmxterm-simple.txt -n
For more details, refer the the jmxterm scripting guidance: