You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/01/22 12:03:03 UTC

Command to list OSGI services published in Karaf

Hi,

Is there a command equivalent of Apache Felix Inspect under karaf to check
services exposed by Blueprint, Spring-DM, ... ?

To see the services exposed by a bundle, type
$ inspect service capability <bundle-id>
or in brief
$ inspect s c <bundle-id>

To see services used by a bundle, type
$ inspect service requirement <bundle-id>
or in brief
$ inspect s r <bundle-id>

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Re: Command to list OSGI services published in Karaf

Posted by Charles Moulliard <cm...@gmail.com>.
Many thanks

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Fri, Jan 22, 2010 at 12:20 PM, Derek Baum <de...@paremus.com> wrote:

> Simple, just install the felix shell commands:
>
> karaf@root> inspect
> Command not found:  *:inspect
>
> karaf@root> install
> file:../felix-framework-2.0.1/bundle/org.apache.felix.shell-1.4.1.jar
> Bundle ID: 32
>
> karaf@root> (bundle 32) start
>
> karaf@root> inspect
> Too few arguments.
> inspect (package|bundle|fragment|service) (capability|requirement) [<id>
> ...]
>
>
> Derek
>
> 2010/1/22 Charles Moulliard <cm...@gmail.com>
>
> > Hi,
> >
> > Is there a command equivalent of Apache Felix Inspect under karaf to
> check
> > services exposed by Blueprint, Spring-DM, ... ?
> >
> > To see the services exposed by a bundle, type
> > $ inspect service capability <bundle-id>
> > or in brief
> > $ inspect s c <bundle-id>
> >
> > To see services used by a bundle, type
> > $ inspect service requirement <bundle-id>
> > or in brief
> > $ inspect s r <bundle-id>
> >
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> > twitter : http://twitter.com/cmoulliard
> > Linkedlin : http://www.linkedin.com/in/charlesmoulliard
> >
> > Apache Camel Group :
> > http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
> >
>

Re: Command to list OSGI services published in Karaf

Posted by Derek Baum <de...@paremus.com>.
Simple, just install the felix shell commands:

karaf@root> inspect
Command not found:  *:inspect

karaf@root> install
file:../felix-framework-2.0.1/bundle/org.apache.felix.shell-1.4.1.jar
Bundle ID: 32

karaf@root> (bundle 32) start

karaf@root> inspect
Too few arguments.
inspect (package|bundle|fragment|service) (capability|requirement) [<id>
...]


Derek

2010/1/22 Charles Moulliard <cm...@gmail.com>

> Hi,
>
> Is there a command equivalent of Apache Felix Inspect under karaf to check
> services exposed by Blueprint, Spring-DM, ... ?
>
> To see the services exposed by a bundle, type
> $ inspect service capability <bundle-id>
> or in brief
> $ inspect s c <bundle-id>
>
> To see services used by a bundle, type
> $ inspect service requirement <bundle-id>
> or in brief
> $ inspect s r <bundle-id>
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>

Re: Command to list OSGI services published in Karaf

Posted by Chris Custine <ch...@gmail.com>.
We also have a built in Karaf command "ls" which provides similar info.

"ls"  Shows all bundles and the services they provide.
"ls -u"  Shows all bundles and the services they are consuming.
"ls <bundleid> and ls -u <bundleid> likewise provide a bit more detail on an
individual bundle

Chris

--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Felix :: http://felix.apache.org
Apache Directory Server :: http://directory.apache.org


On Fri, Jan 22, 2010 at 4:03 AM, Charles Moulliard <cm...@gmail.com>wrote:

> Hi,
>
> Is there a command equivalent of Apache Felix Inspect under karaf to check
> services exposed by Blueprint, Spring-DM, ... ?
>
> To see the services exposed by a bundle, type
> $ inspect service capability <bundle-id>
> or in brief
> $ inspect s c <bundle-id>
>
> To see services used by a bundle, type
> $ inspect service requirement <bundle-id>
> or in brief
> $ inspect s r <bundle-id>
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>