Accessing the OSGi console

From BUG Wiki

Jump to: navigation, search

The OSGi framework Concierge runs on the BUG and acts as the host for BUG applications and libraries. The console allows users to interact with the runtime environment, to manage OSGi bundles and find out more information about what's going on. Additionally, bundles can be installed directly from the console.

Contents

Getting to the Console

Accessing the OSGi from within BUG command line

To connect to the console while logged into your BUG, type:

telnet localhost 8090

Accessing the OSGi console on Virtual BUG

To interact with the OSGi console while using the Virtual BUG, simply use the console in Eclipse!

Accessing the OSGi console from the host

To connect to the console from the host machine, simply

telnet 10.10.10.10 8090

Common Commands and Tasks

root@BUG ~ # telnet localhost 8090
Using fallback suid method

(:

Now you can get help:

(: help
Command   Usage____________________________Description__________________________________________________________________
bundles [filter]                         Returns a list of bundles present in current OSGi runtime  environment.       
consumers [(bundle id | bundle name)]... Returns a list of services that each bundle consumes is currently  consuming. 
disconnect                               Disconnect the shell.  
...

You can see all the installed bundles like this:

(: bundles
Id_State____Name___________________Version___________Location___________________________________________
0 active   System Bundle          1.0.0.RC2         System Bundle                                      
1 resolved osgi                   3.0               file:./osgi.jar                                    
2 resolved Service Tracker        1.0.0804101164406 file:./ch.ethz.iks.concierge.tracker.jar           
3 active   BUG OSGi Console       1.0.0804101164406 file:./com.buglabs.osgi.shell.jar                  
4 active   Http Service           1.0.0804101164406 file:./com.buglabs.osgi.http.jar
...