Module Expr Str ImportFrom alias Assign NameStore Dict Str Str Assign NameStore Str FunctionDef arguments args defaults body Expr Str If CompareIn Str SubscriptLoad NameLoad Index Str body If CompareEq SubscriptLoad NameLoad Index Str Str body Return TupleLoad NameLoad Str Return NameLoad Return TupleLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults Str body Expr Str Assign NameStore Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Continue If CompareEq SubscriptLoad NameLoad Index Num NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Index Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Continue If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Continue If BoolOpAnd CompareNotIn Str NameLoad CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad Return CompareIn NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad Return CompareNotIn NameLoad Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Continue Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad If UnaryOpNot NameLoad body Return NameLoad If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad Return UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Return UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad If UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad body Return Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad If UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad body Return Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad If CompareEq NameLoad Str body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Return UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Return UnaryOpNot Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call AttributeLoad Call SubscriptLoad NameLoad Index Str NameLoad keyword NameLoad attr If CompareEq SubscriptLoad NameLoad Index Num Str body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return UnaryOpNot Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call NameLoad Str decorator_list FunctionDef arguments args defaults body Expr Str Return Call NameLoad Str decorator_list
N/A N/A 
Service support for Solaris 10 and 11, should work with other systems
that use SMF also. (e.g. SmartOS)

.. important::
    If you feel that Salt should be using this module to manage services on a
    minion, and it is using a different module (or gives an error similar to
    *'service.start' is not available*), see :ref:`here
    <module-provider-override>`.
 __future__ absolute_import N/A __func_alias__ N/A reload_ reload N/A __virtualname__ service __virtual__ N/A N/A N/A N/A N/A 
    Only work on systems which default to SMF
     N/A N/A Solaris N/A __grains__ N/A os_family N/A N/A N/A N/A __grains__ N/A kernelrelease 5.9 N/A N/A N/A False The smf execution module failed to load: SMF not available on Solaris 9. N/A __virtualname__ N/A N/A False The smf execution module failed to load: only available on Solaris. N/A _get_enabled_disabled N/A N/A enabled_prop N/A true N/A N/A 
    DRY: Get all service FMRIs and their enabled property
     N/A ret N/A set N/A cmd /usr/bin/svcprop -c -p general/enabled "*" N/A lines N/A N/A N/A N/A __salt__ N/A cmd.run_stdout cmd python_shell False splitlines N/A line lines N/A N/A comps N/A N/A line split N/A N/A comps N/A N/A N/A N/A N/A comps N/A 2 enabled_prop N/A N/A N/A N/A ret add N/A N/A N/A N/A comps N/A 0 split /:properties N/A 0 N/A N/A sorted ret N/A get_running N/A N/A N/A N/A N/A 
    Return the running services

    CLI Example:

    .. code-block:: bash

        salt '*' service.get_running
     N/A ret N/A set N/A cmd /usr/bin/svcs -H -o FMRI,STATE -s FMRI N/A lines N/A N/A N/A N/A __salt__ N/A cmd.run cmd python_shell False splitlines N/A line lines N/A N/A comps N/A N/A line split N/A N/A comps N/A N/A N/A N/A online line N/A N/A N/A N/A ret add N/A comps N/A 0 N/A N/A sorted ret N/A get_stopped N/A N/A N/A N/A N/A 
    Return the stopped services

    CLI Example:

    .. code-block:: bash

        salt '*' service.get_stopped
     N/A ret N/A set N/A cmd /usr/bin/svcs -aH -o FMRI,STATE -s FMRI N/A lines N/A N/A N/A N/A __salt__ N/A cmd.run cmd python_shell False splitlines N/A line lines N/A N/A comps N/A N/A line split N/A N/A comps N/A N/A N/A N/A N/A online line N/A legacy_run line N/A N/A N/A N/A ret add N/A comps N/A 0 N/A N/A sorted ret N/A available N/A N/A name N/A N/A N/A 
    Returns ``True`` if the specified service is available, otherwise returns
    ``False``.

    We look up the name with the svcs command to get back the FMRI
    This allows users to use simpler service names

    CLI Example:

    .. code-block:: bash

        salt '*' service.available net-snmp
     N/A cmd N/A N/A /usr/bin/svcs -H -o FMRI {0} format name N/A name N/A N/A __salt__ N/A cmd.run cmd python_shell False N/A N/A name N/A get_all N/A missing N/A N/A name N/A N/A N/A 
    The inverse of service.available.
    Returns ``True`` if the specified service is not available, otherwise returns
    ``False``.

    CLI Example:

    .. code-block:: bash

        salt '*' service.missing net-snmp
     N/A cmd N/A N/A /usr/bin/svcs -H -o FMRI {0} format name N/A name N/A N/A __salt__ N/A cmd.run cmd python_shell False N/A N/A name N/A get_all N/A get_all N/A N/A N/A N/A N/A 
    Return all installed services

    CLI Example:

    .. code-block:: bash

        salt '*' service.get_all
     N/A ret N/A set N/A cmd /usr/bin/svcs -aH -o FMRI,STATE -s FMRI N/A lines N/A N/A N/A N/A __salt__ N/A cmd.run cmd splitlines N/A line lines N/A N/A comps N/A N/A line split N/A N/A comps N/A N/A N/A N/A N/A ret add N/A comps N/A 0 N/A N/A sorted ret N/A start N/A N/A name N/A N/A N/A 
    Start the specified service

    CLI Example:

    .. code-block:: bash

        salt '*' service.start <service name>
     N/A cmd N/A N/A /usr/sbin/svcadm enable -s -t {0} format name N/A retcode N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A N/A retcode N/A N/A True N/A N/A retcode 3 N/A N/A clear_cmd N/A N/A /usr/sbin/svcadm clear {0} format name N/A N/A N/A __salt__ N/A cmd.retcode clear_cmd python_shell False N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A False N/A stop N/A N/A name N/A N/A N/A 
    Stop the specified service

    CLI Example:

    .. code-block:: bash

        salt '*' service.stop <service name>
     N/A cmd N/A N/A /usr/sbin/svcadm disable -s -t {0} format name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A restart N/A N/A name N/A N/A N/A 
    Restart the named service

    CLI Example:

    .. code-block:: bash

        salt '*' service.restart <service name>
     N/A cmd N/A N/A /usr/sbin/svcadm restart {0} format name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A N/A N/A start name N/A False N/A reload_ N/A N/A name N/A N/A N/A 
    Reload the named service

    CLI Example:

    .. code-block:: bash

        salt '*' service.reload <service name>
     N/A cmd N/A N/A /usr/sbin/svcadm refresh {0} format name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A N/A N/A start name N/A False N/A status N/A N/A name sig N/A None N/A N/A 
    Return the status for a service, returns a bool whether the service is
    running.

    CLI Example:

    .. code-block:: bash

        salt '*' service.status <service name>
     N/A cmd N/A N/A /usr/bin/svcs -H -o STATE {0} format name N/A line N/A N/A __salt__ N/A cmd.run cmd python_shell False N/A N/A line online N/A N/A True N/A N/A False N/A enable N/A N/A name N/A kwargs N/A N/A 
    Enable the named service to start at boot

    CLI Example:

    .. code-block:: bash

        salt '*' service.enable <service name>
     N/A cmd N/A N/A /usr/sbin/svcadm enable {0} format name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A disable N/A N/A name N/A kwargs N/A N/A 
    Disable the named service to start at boot

    CLI Example:

    .. code-block:: bash

        salt '*' service.disable <service name>
     N/A cmd N/A N/A /usr/sbin/svcadm disable {0} format name N/A N/A N/A N/A __salt__ N/A cmd.retcode cmd python_shell False N/A enabled N/A N/A name N/A kwargs N/A N/A 
    Check to see if the named service is enabled to start on boot

    CLI Example:

    .. code-block:: bash

        salt '*' service.enabled <service name>
     N/A fmri_cmd N/A N/A /usr/bin/svcs -H -o FMRI {0} format name N/A fmri N/A N/A __salt__ N/A cmd.run fmri_cmd python_shell False N/A cmd N/A N/A /usr/sbin/svccfg -s {0} listprop general/enabled format fmri N/A comps N/A N/A N/A N/A __salt__ N/A cmd.run cmd python_shell False split N/A N/A N/A comps N/A 2 true N/A N/A True N/A N/A False N/A disabled N/A N/A name N/A N/A N/A 
    Check to see if the named service is disabled to start on boot

    CLI Example:

    .. code-block:: bash

        salt '*' service.disabled <service name>
     N/A N/A N/A enabled name N/A get_enabled N/A N/A N/A N/A N/A 
    Return the enabled services

    CLI Example:

    .. code-block:: bash

        salt '*' service.get_enabled
     N/A N/A _get_enabled_disabled true N/A get_disabled N/A N/A N/A N/A N/A 
    Return the disabled services

    CLI Example:

    .. code-block:: bash

        salt '*' service.get_disabled
     N/A N/A _get_enabled_disabled false N/A