Managing System Services in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Listing Instances That a Service Depends On

The svcs -d command lists the service instances that a given service depends on.

This example shows the service instances that the system-repository service depends on:

$ svcs -d system-repository
STATE          STIME    FMRI
online         Sep_09   svc:/milestone/network:default
online         Sep_09   svc:/system/filesystem/local:default
online         Sep_09   svc:/system/filesystem/autofs:default

The svcs -l command also lists the services that a given service depends on. In addition to the name and state of the dependency, the -l option output shows the type, or grouping, of the dependency and the value of the restart_on property of the dependency. In this example, two of the dependencies are required and one is optional. See Dependency Groupings for descriptions of how dependencies in these groupings affect the dependent service. See Dependency Groupings for descriptions of how different values of the restart_on property of the dependency affect the dependent service.

$ svcs -l system-repository
fmri         svc:/application/pkg/system-repository:default
name         IPS System Repository
enabled      false
state        disabled
next_state   none
state_time   Mon Sep 09 18:42:28 2013
restarter    svc:/system/svc/restarter:default
manifest     /lib/svc/manifest/application/pkg/pkg-system-repository.xml
dependency   require_all/error svc:/milestone/network:default (online)
dependency   require_all/none svc:/system/filesystem/local:default (online)
dependency   optional_all/error svc:/system/filesystem/autofs:default (online)

You can also use the svcprop command to list these dependencies. This form shows the grouping and restart_on values of the dependency on separate lines, and does not show the state of the dependency.

$ svcprop -g dependency system-repository:default
network/entities fmri svc:/milestone/network:default
network/grouping astring require_all
network/restart_on astring error
network/type astring service
filesystem-local/entities fmri svc:/system/filesystem/local:default
filesystem-local/grouping astring require_all
filesystem-local/restart_on astring none
filesystem-local/type astring service
autofs/entities fmri svc:/system/filesystem/autofs:default
autofs/grouping astring optional_all
autofs/restart_on astring error
autofs/type astring service