The examples in this section describe how to view service and instance properties and property groups in different views, layers, and snapshots.Example 2-6 Listing Instance and Inherited Properties Currently in Use
By default, the svcprop command shows the values assigned to properties in the running snapshot, which are the values currently being used. By default, the svcprop command shows properties in the composed view of the running snapshot, which means that both instance-specific properties and inherited properties are shown. If the value of an inherited property is customized in the instance, the value set in the instance is shown. The output lists one line for each property, showing the property group and property name separated by a forward slash character, the data type of the property value, and the property value. If no property or group name is specified, all property values in the running snapshot are shown.
If the FMRI or pattern operand does not specify an instance, properties set only on the service are shown. Properties set only on an instance are not shown. The following command shows properties such as service dependencies, the type of the service, and the paths of the profile and manifest files.
$ svcprop svc:/system/identity
When you specify an instance, you see the composed view of properties customized for that instance and properties inherited from the parent service. The following command lists all the properties in the running snapshot for the specified instance, including properties inherited from the parent service and properties specific to this instance. For inherited properties whose value is customized for this instance, the customized value is shown. This example shows properties such as additional dependencies, the path to the executable that starts this instance, the path to the log file for this instance, and information about the state of this instance.
$ svcprop svc:/system/identity:domainExample 2-7 Listing Specified Properties or Property Groups Currently in Use
Use the -p option to show specific properties or all properties in a specific property group.
$ svcprop -p pkg/port pkg/server svc:/application/pkg/server:oss:properties/pkg/port count 82 svc:/application/pkg/server:s11:properties/pkg/port count 81 svc:/application/pkg/server:default:properties/pkg/port count 80 $ svcprop -p pkg pkg/server:s11 pkg/inst_root astring /export/ipsrepos/Solaris11 pkg/port count 81 ... pkg/ssl_cert_file astring "" pkg/ssl_key_file astring "" ...Example 2-8 Listing Service and Instance Values in the Editing View
With options, the svcprop command can show the editing view instead of the running snapshot. The editing view shows the most recent changes. The changes in the editing view might or might not have been committed into the running snapshot by refreshing or restarting the instance. The following commands illustrate the difference between the running snapshot and the editing view. The oss and s11 instances have just been created and property values have been changed, but the instances have not yet been refreshed. The first command shows the composed view of the running snapshot. Because these instances have not been refreshed since they were customized, the values shown are values from the pkg/server service. The -c option shows the composed view of the editing values. The -C option shows the editing values without composition. Because this is not a composed view, no value is found for the instance that has not been customized.
$ svcprop -p pkg/port pkg/server svc:/application/pkg/server:oss/:properties/pkg/port count 80 svc:/application/pkg/server:s11/:properties/pkg/port count 80 svc:/application/pkg/server:default/:properties/pkg/port count 80 $ svcprop -c -p pkg/port pkg/server svc:/application/pkg/server:oss/:properties/pkg/port count 82 svc:/application/pkg/server:s11/:properties/pkg/port count 81 svc:/application/pkg/server/:properties/pkg/port count 80 $ svcprop -C -p pkg/port pkg/server svc:/application/pkg/server:oss/:properties/pkg/port count 82 svc:/application/pkg/server:s11/:properties/pkg/port count 81 svcprop: Couldn't find property 'pkg/port' for instance 'svc:/application/pkg/server:default'.
The svccfg command displays the editing property values by default, not the values in the running snapshot. You can force svccfg to display values in the running snapshot by using the selectsnap subcommand as shown in Showing Values in a Specified Snapshot.
The svccfg command only shows values for the parent service when you specify a parent service and only shows values for an instance when you specify an instance. If you receive no output from the svccfg listprop command, the property you specified might not be set on the parent service or the instance that you specified. If the property was deleted, use listcust -M to view the masked value, as shown in Showing Configuration Customizations.
The following command lists all editing property values for the specified service because no property group or property name is specified. In addition to the output shown by the svcprop svc:/system/identity command, this output includes property group names and types and template data.
$ svccfg -s svc:/system/identity listprop
The following command lists all editing property values for the specified service instance. Because this command does not show the composed view, this output does not show the paths to the profile and manifest files, for example.
$ svccfg -s svc:/system/identity:domain listpropExample 2-9 Listing Specified Properties or Property Groups in the Editing View
The following command lists all editing property values in the specified property group for the specified service instance. The -o option enables you to select the columns to display. See the svccfg (1M) man page for the list of valid column names.
$ svccfg -s pkg/server:s11 listprop pkg pkg application pkg/inst_root astring /export/ipsrepos/Solaris11 pkg/port count 81 $ svccfg -s pkg/server:s11 listprop -o propname,value pkg inst_root /export/ipsrepos/Solaris11 port 81