Print this page
12721 would like svcadm disable -c
   1 SVCADM(1M)                   Maintenance Commands                   SVCADM(1M)
   2 
   3 
   4 
   5 NAME
   6        svcadm - manipulate service instances
   7 
   8 SYNOPSIS
   9        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] enable [-rst]
  10             [{FMRI | pattern}...]
  11 
  12 
  13        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] disable [-st]
  14             [{FMRI | pattern}...]
  15 
  16 
  17        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] restart [-d]
  18             [{FMRI | pattern}...]
  19 
  20 
  21        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] refresh
  22             [{FMRI | pattern}...]
  23 
  24 
  25        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] clear
  26             [{FMRI | pattern}...]
  27 
  28 
  29        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] mark [-It] instance_state
  30             [{FMRI | pattern}...]
  31 
  32 
  33        /usr/sbin/svcadm [-v] milestone [-d] milestone_FMRI
  34 


  88            the online state. This action requires permission to modify the
  89            "general" property group of the service instance (see
  90            smf_security(5)).
  91 
  92            If the -r option is specified, svcadm enables each service instance
  93            and recursively enables its dependencies.
  94 
  95            If the -s option is specified, svcadm enables each service instance
  96            and then waits for each service instance to enter the online or
  97            degraded state. svcadm will return early if it determines that the
  98            service cannot reach these states without administrator
  99            intervention.
 100 
 101            If the -t option is specified, svcadm temporarily enables each
 102            service instance. Temporary enable only lasts until reboot. This
 103            action requires permission to modify the "restarter_actions"
 104            property group of the service instance (see smf_security(5)). By
 105            default, enable is persistent across reboot.
 106 
 107 
 108        disable [-st] {FMRI | pattern}...
 109 
 110            Disables the service instance specified by the operands. For each
 111            service instance, the assigned restarter will try to bring it to
 112            the disabled state.  This action requires permission to modify the
 113            "general" property group of the service instance (see
 114            smf_security(5)).
 115 
 116            If the -s option is specified, svcadm disables each service
 117            instance and then waits for each service instance to enter the
 118            disabled state.  svcadm will return early if it determines that the
 119            service cannot reach this state without administrator intervention.
 120 
 121            If the -t option is specified, svcadm temporarily disables each
 122            service instance. Temporary disable only lasts until reboot. This
 123            action requires permission to modify the "restarter_actions"
 124            property group of the service instance (see smf_security(5)). By
 125            default, disable is persistent across reboot.
 126 




 127 

 128        restart [-d] {FMRI | pattern}...
 129 
 130            Requests that the service instances specified by the operands be
 131            restarted.  This action requires permission to modify the
 132            "restarter_actions" property group of the service instance (see
 133            smf_security(5)).
 134 
 135            This subcommand can restart only those services that are in the
 136            online or degraded states, as those states are defined in smf(5).
 137 
 138            If the -d option is specified, the restarter sends a SIGABRT to all
 139            members of the contract, which should cause a core dump, before
 140            restarting the service.
 141 
 142 
 143        refresh {FMRI | pattern}...
 144 
 145            For each service instance specified by the operands, requests that
 146            the assigned restarter update the service's running configuration
 147            snapshot with the values from the current configuration. Some of


 276        If an abbreviated FMRI matches more than one service, a warning message
 277        is displayed and that operand is ignored.  If a pattern matches more
 278        than one service or instance, the subcommand is applied to all matches.
 279 
 280 EXAMPLES
 281        Example 1 Restarting a Service Instance
 282 
 283 
 284        The following command restarts the NFS server. The full FMRI for the
 285        default service instance is: svc:/network/nfs/server:default
 286 
 287 
 288 
 289        However, you can abbreviate the full FMRI as follows:
 290 
 291 
 292          # svcadm restart nfs/server
 293 
 294 
 295 
 296        Example 2 Disabling the Standard HTTP Server
 297 
 298 
 299        The following command disables the standard HTTP server, using an
 300        abbreviated FMRI:

 301 
 302 
 303          $ svcadm disable http
 304 
 305 
 306 
 307        Example 3 Enabling an Instance and Its Dependent Instances
 308 
 309 
 310        The following command enables the foo:bar instance, and all instances
 311        on which it depends:
 312 
 313 
 314          $ svcadm enable -r foo:bar
 315 
 316 
 317 
 318        Example 4 Synchronously enabling an instance
 319 
 320 
 321        The following command enables the foo:bar instance. The command will
 322        not return until the instance comes online or svcadm determines it is
 323        not possible for the service to come online.


 395        libscf(3LIB), contract(4), attributes(5), smf(5), smf_security(5),
 396        zones(5)
 397 
 398 NOTES
 399        The amount of time svcadm will spend waiting for services and their
 400        dependencies to change state is implicitly limited by their method
 401        timeouts.  For example, a service using the default restarter whose
 402        start method hangs will be transitioned to the maintenance state when
 403        its timeout expires.  svcadm will then consider it impossible for this
 404        service to come online without administrator intervention.
 405 
 406 
 407        Attempts to synchronously enable a service which depends (directly or
 408        indirectly) on a file may fail with an exit status indicating that
 409        dependencies are unsatisfied if the caller does not have the privileges
 410        necessary to search the directory containing the file. This limitation
 411        may be removed in a future release.
 412 
 413 
 414 
 415                                October 24, 2019                     SVCADM(1M)
   1 SVCADM(1M)                   Maintenance Commands                   SVCADM(1M)
   2 
   3 
   4 
   5 NAME
   6        svcadm - manipulate service instances
   7 
   8 SYNOPSIS
   9        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] enable [-rst]
  10             [{FMRI | pattern}...]
  11 
  12 
  13        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] disable
  14             [-c -comment] [-st] [{FMRI | pattern}...]
  15 
  16 
  17        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] restart [-d]
  18             [{FMRI | pattern}...]
  19 
  20 
  21        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] refresh
  22             [{FMRI | pattern}...]
  23 
  24 
  25        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] clear
  26             [{FMRI | pattern}...]
  27 
  28 
  29        /usr/sbin/svcadm [-S state] [-v] [-Z | -z zone] mark [-It] instance_state
  30             [{FMRI | pattern}...]
  31 
  32 
  33        /usr/sbin/svcadm [-v] milestone [-d] milestone_FMRI
  34 


  88            the online state. This action requires permission to modify the
  89            "general" property group of the service instance (see
  90            smf_security(5)).
  91 
  92            If the -r option is specified, svcadm enables each service instance
  93            and recursively enables its dependencies.
  94 
  95            If the -s option is specified, svcadm enables each service instance
  96            and then waits for each service instance to enter the online or
  97            degraded state. svcadm will return early if it determines that the
  98            service cannot reach these states without administrator
  99            intervention.
 100 
 101            If the -t option is specified, svcadm temporarily enables each
 102            service instance. Temporary enable only lasts until reboot. This
 103            action requires permission to modify the "restarter_actions"
 104            property group of the service instance (see smf_security(5)). By
 105            default, enable is persistent across reboot.
 106 
 107 
 108        disable [-c comment] [-st] {FMRI | pattern}...
 109 
 110            Disables the service instance specified by the operands. For each
 111            service instance, the assigned restarter will try to bring it to
 112            the disabled state.  This action requires permission to modify the
 113            "general" property group of the service instance (see
 114            smf_security(5)).
 115 
 116            If the -s option is specified, svcadm disables each service
 117            instance and then waits for each service instance to enter the
 118            disabled state.  svcadm will return early if it determines that the
 119            service cannot reach this state without administrator intervention.
 120 
 121            If the -t option is specified, svcadm temporarily disables each
 122            service instance. Temporary disable only lasts until reboot. This
 123            action requires permission to modify the "restarter_actions"
 124            property group of the service instance (see smf_security(5)). By
 125            default, disable is persistent across reboot.
 126 
 127            If the -c option is specified, the given free-form comment is
 128            recorded in the (temporary) service configuration under the
 129            general/comment property.  This can serve as an administrator
 130            reason for disabling the service, and is reported by svcs(1).
 131 
 132 
 133        restart [-d] {FMRI | pattern}...
 134 
 135            Requests that the service instances specified by the operands be
 136            restarted.  This action requires permission to modify the
 137            "restarter_actions" property group of the service instance (see
 138            smf_security(5)).
 139 
 140            This subcommand can restart only those services that are in the
 141            online or degraded states, as those states are defined in smf(5).
 142 
 143            If the -d option is specified, the restarter sends a SIGABRT to all
 144            members of the contract, which should cause a core dump, before
 145            restarting the service.
 146 
 147 
 148        refresh {FMRI | pattern}...
 149 
 150            For each service instance specified by the operands, requests that
 151            the assigned restarter update the service's running configuration
 152            snapshot with the values from the current configuration. Some of


 281        If an abbreviated FMRI matches more than one service, a warning message
 282        is displayed and that operand is ignored.  If a pattern matches more
 283        than one service or instance, the subcommand is applied to all matches.
 284 
 285 EXAMPLES
 286        Example 1 Restarting a Service Instance
 287 
 288 
 289        The following command restarts the NFS server. The full FMRI for the
 290        default service instance is: svc:/network/nfs/server:default
 291 
 292 
 293 
 294        However, you can abbreviate the full FMRI as follows:
 295 
 296 
 297          # svcadm restart nfs/server
 298 
 299 
 300 
 301        Example 2 Disabling a service
 302 
 303 
 304        The following command synchronously disables a service, using an
 305        abbreviated FMRI, and recording a ticket ID as the administrative
 306        reason:
 307 
 308 
 309          $ svcadm disable -c "OPS-1000" -s http
 310 
 311 
 312 
 313        Example 3 Enabling an Instance and Its Dependent Instances
 314 
 315 
 316        The following command enables the foo:bar instance, and all instances
 317        on which it depends:
 318 
 319 
 320          $ svcadm enable -r foo:bar
 321 
 322 
 323 
 324        Example 4 Synchronously enabling an instance
 325 
 326 
 327        The following command enables the foo:bar instance. The command will
 328        not return until the instance comes online or svcadm determines it is
 329        not possible for the service to come online.


 401        libscf(3LIB), contract(4), attributes(5), smf(5), smf_security(5),
 402        zones(5)
 403 
 404 NOTES
 405        The amount of time svcadm will spend waiting for services and their
 406        dependencies to change state is implicitly limited by their method
 407        timeouts.  For example, a service using the default restarter whose
 408        start method hangs will be transitioned to the maintenance state when
 409        its timeout expires.  svcadm will then consider it impossible for this
 410        service to come online without administrator intervention.
 411 
 412 
 413        Attempts to synchronously enable a service which depends (directly or
 414        indirectly) on a file may fail with an exit status indicating that
 415        dependencies are unsatisfied if the caller does not have the privileges
 416        necessary to search the directory containing the file. This limitation
 417        may be removed in a future release.
 418 
 419 
 420 
 421                                  May 11, 2020                       SVCADM(1M)