Enabling the OSGi Console for an AppNode

One of the most important changes for the architecture using TIBCO BusinessWorks 6 is that is OSGi-based and one of the most important things to know is how to enable the OSGi console.

The OSGi console is a tool which allows you to execute a lot of interesting commands to retrieve diagnostics and information related to the applications deployed on the node. You also could retrieve metrics about the processes or make changes to the logger configuration.

To enable this console you should be inside the bwadmin application. To do that you have to go to the <BW_HOME>/bin and execute the ./bwadmin command.

After that, you have to navigate to the AppSpace that contains the AppNode where you want to enable the OSGi console and type the following command:

bwadmin[admin@NewDomain/TestAppSpace]> enableconsole -n TestAppNode localhost 9060
TIBCO-BW-ADMIN-CLI-300304: Console enabled for AppNode [TestAppNode] in Domain [NewDomain].

After that moment, you only have to use a telnet command to the current host and port you specified (in our case localhost (host) and 9060 (port)) and we are going to be inside the OSGi console, as you can see here:

[root@bw6agent /]# telnet localhost 9060
Trying ::1...
telnet: connect to address ::1: Connection refused
Connected to localhost.
Escape character is '^]'.


And now, you can type any command that you want. You have a full list of the commands allowed on the official documentation (page 98). To show an example, we are going to use the command `lmetrics` to show the metrics for the application deployed on the node:

admin@TestAppNode> lmetrics
--------Application Name: DummyTest.application-
 Total Jobs Created: 71.0
 Total Jobs Faulted: 0
 Total Jobs Scheduled for execution: 0
 Total Jobs Cancelled: 0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s