Print this page
12071 clarify implementation of single_instance in SMF services
Reviewed by: Robert Mustacchi <rm@fingolfin.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/svcprop.1
          +++ new/usr/src/man/man1/svcprop.1
   1    1  '\" te
   2    2  .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
        3 +.\" Copyright 2019 Joyent, Inc.
   3    4  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4    5  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5    6  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6      -.TH SVCPROP 1 "April 9, 2016"
        7 +.TH SVCPROP 1 "Dec 11, 2019"
   7    8  .SH NAME
   8    9  svcprop \- retrieve values of service configuration properties
   9   10  .SH SYNOPSIS
  10      -.LP
  11   11  .nf
  12   12  \fBsvcprop\fR [\fB-fqtv\fR] [\fB-C\fR | \fB-c\fR | \fB-s\fR \fIsnapshot\fR]
  13   13       [\fB-z\fR \fIzone\fR] [\fB-p\fR [\fIname\fR/]\fIname\fR]...
  14   14       {\fIFMRI\fR | \fIpattern\fR}...
  15   15  .fi
  16   16  
  17   17  .LP
  18   18  .nf
  19   19  \fBsvcprop\fR \fB-w\fR [\fB-fqtv\fR] [\fB-z\fR \fIzone\fR] [\fB-p\fR [\fIname\fR/]\fIname\fR] {\fIFMRI\fR | \fIpattern\fR}
  20   20  .fi
  21   21  
  22   22  .SH DESCRIPTION
  23      -.LP
  24   23  The \fBsvcprop\fR utility prints values of properties in the service
  25   24  configuration repository. Properties are selected by \fB-p\fR options and the
  26   25  operands.
  27   26  .sp
  28   27  .LP
  29   28  Without the \fB-C\fR, \fB-c\fR, or \fB-s\fR options, \fBsvcprop\fR accesses
  30   29  effective properties. The effective properties of a service are its directly
  31   30  attached properties. The effective properties of a service instance are the
  32   31  union of properties in the composed view of its \fBrunning\fR snapshot and the
  33   32  properties in nonpersistent property groups in the composed view of the
  34   33  instance's directly attached properties. See \fBsmf\fR(5) for an explanation of
  35   34  property composition. If the \fBrunning\fR snapshot does not exist then the
  36   35  instance's directly attached properties are used instead.
  37   36  .SS "Output Format"
  38      -.LP
  39   37  By default, when a single property is selected, the values for each are printed
  40   38  on separate lines. Empty \fBASCII\fR string values are represented by a pair of
  41   39  double quotes (\fB""\fR). Bourne shell metacharacters ('\fB;\fR', '\fB&\fR\&',
  42   40  \&'\fB(\fR', '\fB)\fR', '\fB|\fR', '\fB^\fR', '\fB<\fR\&', '\fB>\fR', newline,
  43   41  space, tab, backslash, '\fB"\fR', single-quote, '\fB`\fR') in \fBASCII\fR
  44   42  string values are quoted by backslashes (\fB\e\fR).
  45   43  .sp
  46   44  .LP
  47   45  When multiple properties are selected, a single line is printed for each. Each
  48   46  line comprises a property designator, a property type, and the values (as
↓ open down ↓ 6 lines elided ↑ open up ↑
  55   53  .LP
  56   54  If access controls prohibit reading the value of a property, and no property or
  57   55  property group is specified explicitly by a \fB-p\fR option, the property is
  58   56  displayed as if it had no values. If one or more property or property group
  59   57  names is specified by  a \fB-p\fR option, and any property value cannot be read
  60   58  due to access controls, an error results.
  61   59  .sp
  62   60  .LP
  63   61  Error messages are printed to the standard error stream.
  64   62  .SH OPTIONS
  65      -.LP
  66   63  The following options are supported:
  67   64  .sp
  68   65  .ne 2
  69   66  .na
  70   67  \fB\fB-C\fR\fR
  71   68  .ad
  72   69  .RS 14n
  73   70  Uses the directly attached properties, without composition.
  74   71  .RE
  75   72  
↓ open down ↓ 91 lines elided ↑ open up ↑
 167  164  .sp
 168  165  .ne 2
 169  166  .na
 170  167  \fB-z\fR \fIzone\fR
 171  168  .ad
 172  169  .RS 14n
 173  170  Uses properties from the service or instance in the specified \fIzone\fR.
 174  171  This option is only applicable from the global zone, see \fBzones\fR(5).
 175  172  
 176  173  .SH OPERANDS
 177      -.LP
 178  174  The following operands are supported:
 179  175  .sp
 180  176  .ne 2
 181  177  .na
 182  178  \fB\fIFMRI\fR\fR
 183  179  .ad
 184  180  .RS 11n
 185  181  The FMRI of a service, a service instance, a property group, or a property.
 186  182  .sp
 187  183  Instances and services can be abbreviated by specifying the instance name, or
↓ open down ↓ 41 lines elided ↑ open up ↑
 229  225  .na
 230  226  \fBpattern\fR
 231  227  .ad
 232  228  .RS 11n
 233  229  A glob pattern which is matched against the FMRIs of services and instances in
 234  230  the repository. See \fBfnmatch\fR(5). If a pattern matches multiple services or
 235  231  instances, \fBsvcprop\fR acts on each service or instance.
 236  232  .RE
 237  233  
 238  234  .SH EXAMPLES
 239      -.LP
 240  235  \fBExample 1 \fRDisplaying the Value of a Single Property
 241  236  .sp
 242  237  .LP
 243  238  The following example displays the value of the state property in the restarter
 244  239  property group of instance \fBdefault\fR of service \fBsystem/cron\fR.
 245  240  
 246  241  .sp
 247  242  .in +2
 248  243  .nf
 249  244  example%  svcprop -p restarter/state system/cron:default
↓ open down ↓ 27 lines elided ↑ open up ↑
 277  272  properties in the \fBgeneral\fR property group of each instance of the
 278  273  \fBnetwork/ntp\fR service:
 279  274  
 280  275  .sp
 281  276  .in +2
 282  277  .nf
 283  278  example% svcprop -p general ntp
 284  279  general/package astring SUNWntpr
 285  280  general/enabled boolean true
 286  281  general/entity_stability astring Unstable
 287      -general/single_instance boolean true
 288  282  .fi
 289  283  .in -2
 290  284  .sp
 291  285  
 292  286  .LP
 293  287  \fBExample 4 \fRTesting the Existence of a Property
 294  288  .sp
 295  289  .LP
 296  290  The following example tests the existence of the \fBgeneral/enabled\fR property
 297  291  for all instances of service identity:
↓ open down ↓ 62 lines elided ↑ open up ↑
 360  354  svcprop -p $1 $2 | (
 361  355           read value v2
 362  356           if [ -n "$v2" ]; then echo "Multiple values!"; exit; fi
 363  357           echo $value
 364  358         )
 365  359  .fi
 366  360  .in -2
 367  361  .sp
 368  362  
 369  363  .SH EXIT STATUS
 370      -.LP
 371  364  The following exit values are returned:
 372  365  .sp
 373  366  .ne 2
 374  367  .na
 375  368  \fB\fB0\fR\fR
 376  369  .ad
 377  370  .RS 5n
 378  371  Successful completion.
 379  372  .RE
 380  373  
↓ open down ↓ 9 lines elided ↑ open up ↑
 390  383  .sp
 391  384  .ne 2
 392  385  .na
 393  386  \fB\fB2\fR\fR
 394  387  .ad
 395  388  .RS 5n
 396  389  Invalid command line options were specified.
 397  390  .RE
 398  391  
 399  392  .SH SEE ALSO
 400      -.LP
 401  393  \fBsvcs\fR(1), \fBinetd\fR(1M), \fBsvcadm\fR(1M), \fBsvccfg\fR(1M),
 402  394  \fBsvc.startd\fR(1M), \fBservice_bundle\fR(4), \fBattributes\fR(5),
 403  395  \fBfnmatch\fR(5), \fBsmf\fR(5), \fBsmf_method\fR(5), \fBsmf_security\fR(5),
 404  396  \fBzones\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX