Identifying Which Package Delivers a Specified SMF Service

To show which packages provide a particular SMF service, search for the name of the service as the value of the org.opensolaris.smf.fmri attribute.

$ pkg search -o pkg.name,search.match org.opensolaris.smf.fmri:\*network/http\*
PKG.NAME                  SEARCH.MATCH
web/proxy/privoxy         svc:/network/http
web/proxy/squid           svc:/network/http
web/server/lighttpd-14    svc:/network/http
web/java-servlet/tomcat-8 svc:/network/http
web/server/apache-24      svc:/network/http
web/server/apache-24      svc:/network/http:apache24
web/server/lighttpd-14    svc:/network/http:lighttpd14
web/proxy/privoxy         svc:/network/http:privoxy
web/proxy/squid           svc:/network/http:squid
web/java-servlet/tomcat-8 svc:/network/http:tomcat8

In this case, each attribute has two values: the service name with and without the service instance name specified. The following example shows how this attribute is specified in the package manifest:

set name=org.opensolaris.smf.fmri value=svc:/network/http:apache24 value=svc:/network/http

The following example shows this same information with each package listed only once. The -p option cannot be used when requesting action-level output such as search.match. Escape the colon character so that it is interpreted as part of the token and not as another search query field.

$ pkg search -o pkg.name,search.match 'org.opensolaris.smf.fmri:*network/http\:*'
PKG.NAME                  SEARCH.MATCH
web/server/apache-24      svc:/network/http:apache24
web/server/lighttpd-14    svc:/network/http:lighttpd14
web/proxy/privoxy         svc:/network/http:privoxy
web/proxy/squid           svc:/network/http:squid
web/java-servlet/tomcat-8 svc:/network/http:tomcat8