Contained WithinFind More DocumentationFeatured Support Resources | Descargar este libro en PDF (7229 KB)
svcprop(1)Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Attributes | See Also Name
Synopsis
svcprop [-fqtv] [-C | -c | -s snapshot] [-p [name/]name]...
{FMRI | pattern}...
svcprop -w [-fqtv] [-p [name/]name] {FMRI | pattern}
DescriptionThe svcprop utility prints values of properties in the service configuration repository. Properties are selected by -p options and the operands. Without the -C, -c, or -s options, svcprop accesses effective properties. The effective properties of a service are its directly attached properties. The effective properties of a service instance are the union of properties in the composed view of its running snapshot and the properties in nonpersistent property groups in the composed view of the instance's directly attached properties. See smf(5) for an explanation of property composition. If the running snapshot does not exist then the instance's directly attached properties are used instead. Output FormatBy default, when a single property is selected, the values for each are printed on separate lines. Empty ASCII string values are represented by a pair of double quotes (“”). Bourne shell metacharacters (';', '&', '(', ')', '|', '^', '<', '>', newline, space, tab, backslash, '"', single-quote, '`') in ASCII string values are quoted by backslashes (\). When multiple properties are selected, a single line is printed for each. Each line comprises a property designator, a property type, and the values (as described above), separated by spaces. By default, if a single FMRI operand has been supplied, the property designator consists of the property group name and the property name joined by a slash (/). If multiple FMRI operands are supplied, the designator is the canonical FMRI for the property. If access controls prohibit reading the value of a property, and no property or property group is specified explicitly by a -p option, the property is displayed as if it had no values. If one or more property or property group names is specified by a -p option, and any property value cannot be read due to access controls, an error results. Error messages are printed to the standard error stream. Options
The following options are supported: Operands
The following operands are supported: ExamplesExample 1 Displaying the Value of a Single PropertyThe following example displays the value of the state property in the restarter property group of instance default of service system/cron.
Example 2 Retrieving Whether a Service is EnabledWhether a service is enabled is determined by its -general/enabled property. This property takes immediate effect, so the -c option must be used:
Example 3 Displaying All Properties in a Property GroupOn a default installation of Solaris, the following example displays all properties in the general property group of each instance of the network/ntp service:
Example 4 Testing the Existance of a PropertyThe following example tests the existence of the general/enabled property for all instances of service identity:
Example 5 Waiting for Property ChangeThe following example waits for the sendmail instance to change state.
Example 6 Retrieving the Value of a Boolean Property in a ScriptThe following example retrieves the value of a boolean property in a script:
Example 7 Using svcprop in a Script
Exit Status
The following exit values are returned: AttributesSee attributes(5) for descriptions of the following attributes:
See Alsosvcs(1), inetd(1M), svcadm(1M), svccfg(1M), svc.startd(1M), service_bundle(4), attributes(5), fnmatch(5), smf(5), smf_method(5), smf_security(5) Name | Synopsis | Description | Options | Operands | Examples | Exit Status | Attributes | See Also |
||||||||||||||