JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Managing Services and Faults in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information


1.  Managing Services (Overview)

2.  Managing Services (Tasks)

Monitoring SMF Services

Monitoring Services (Task Map)

How to List the Status of a Service

How to List Customizations of a Service

How to Show Which Services Are Dependent on a Service Instance

How to Show Which Services a Service Is Dependent On

How to Set Up Notification of SMF Transition Events

Managing SMF Services

Managing SMF Services (Task Map)

Using RBAC Rights Profiles With SMF

How to Create an SMF Service

How to Disable a Service Instance

How to Enable a Service Instance

How to Restart a Service

How to Restore a Service That Is in the Maintenance State

How to Create an SMF Profile

How to Manually Create an SMF Profile

How to Apply an SMF Profile

Configuring SMF Services

Configuring SMF Services (Task Map)

How to Modify an SMF Service Property

How to Modify Multiple Properties for One Service

How to Modify a Service That Is Configured by a File

How to Change an Environment Variable for a Service

How to Change a Property for an inetd Controlled Service

How to Delete Customizations for a Service

How to Modify a Command-Line Argument for an inetd Controlled Service

How to Convert inetd.conf Entries

Using Run Control Scripts

Using Run Control Scripts (Task Map)

How to Use a Run Control Script to Stop or Start a Legacy Service

How to Add a Run Control Script

How to Disable a Run Control Script

How to Convert a Run Control Script to an SMF Service

Troubleshooting the Service Management Facility

Troubleshooting SMF (Task Map)

How to Debug a Service That Is Not Starting

How to Repair a Corrupt Repository

How to Boot Without Starting Any Services

How to Boot in Verbose Mode

How to Force an sulogin Prompt If the system/filesystem/local:default Service Fails During Boot

3.  Using the Fault Manager


Troubleshooting the Service Management Facility

The following procedures show how to troubleshoot or fix SMF services. Some of these procedures also show how to change boot parameters to alter the way a system boots.

Troubleshooting SMF (Task Map)

The following task map includes several procedures that can be used to troubleshoot problems on your system. Each row includes a task, a description of when you would want to perform that task, followed by a link to the task.

For Instructions
Debug a service that is not running
Gather information from the SMF service about why a service isn't running.
Repair a corrupt repository
Steps to follow to replace a corrupt repository so that the system will boot completely.
Boot without starting any services
Boot a system without any running services for debugging a system that hangs during the boot process.
Generate more boot messages
Steps to create more messages during the boot process to aid with debugging.
Stop the boot process if local file systems are not available
Steps to get the login service started so that you can investigate the problem, if local file systems are not mounted.

How to Debug a Service That Is Not Starting

In this procedure, the print service is disabled.

  1. Become an administrator or assume a role that includes the Service Management rights profile.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Request information about the service that is not running due to an error.
    # svcs -xv
    svc:/application/print/server:default (LP Print Service)
     State: disabled since Wed 13 Oct 2004 02:20:37 PM PDT
    Reason: Disabled by an administrator.
       See: man -M /usr/share/man -s 1M lpsched
    Impact: 2 services are not running:

    The -x option provides additional information about the service instances that are impacted.

  3. Enable the service.
    # svcadm enable application/print/server

How to Repair a Corrupt Repository

This procedure shows how to replace a corrupt repository with a default copy of the repository. When the repository daemon, svc.configd, is started, it does an integrity check of the configuration repository. This repository is stored in /etc/svc/repository.db. The repository can become corrupted due to one of the following reasons:

If the integrity check fails, the svc.configd daemon writes a message to the console similar to the following:

svc.configd: smf(5) database integrity check of:


  failed.  The database might be damaged or a media error might have
  prevented it from being verified.  Additional information useful to
  your service provider is in:


  The system will not be able to boot until you have restored a working
  database.  svc.startd(1M) will provide a sulogin(1M) prompt for recovery
  purposes.  The command:


  can be run to restore a backup version of your repository. See for more information.

The svc.startd daemon then exits and starts sulogin to enable you to perform maintenance.

  1. Enter the root password at the sulogin prompt.

    The sulogin command enables the root user to enter system maintenance mode to repair the system.

  2. Run the following command:
    # /lib/svc/bin/restore_repository

    Running this command takes you through the necessary steps to restore a non-corrupt backup. SMF automatically takes backups of the repository at key system moments. For more information see SMF Repository Backups.

    When started, the /lib/svc/bin/restore_repository command displays a message similar to the following:

    See for more information on the use of
    this script to restore backup copies of the smf(5) repository.
    If there are any problems which need human intervention, this script will
    give instructions and then exit back to your shell. 

    After the root ( /) file system is mounted with write permissions, or if the system is a local zone, you are prompted to select the repository backup to restore:

    The following backups of /etc/svc/repository.db exists, from
    oldest to newest:
    ... list of backups ...

    Backups are given names, based on type and the time the backup was taken. Backups beginning with boot are completed before the first change is made to the repository after system boot. Backups beginning with manifest_import are completed after svc:/system/manifest-import:default finishes its process. The time of the backup is given in YYYYMMDD_HHMMSS format.

  3. Enter the appropriate response.

    Typically, the most recent backup option is selected.

    Please enter either a specific backup repository from the above list to
    restore it, or one of the following choices:
            CHOICE            ACTION
            ----------------  ----------------------------------------------
            boot              restore the most recent post-boot backup
            manifest_import   restore the most recent manifest_import backup
            -seed-            restore the initial starting repository  (All
                                customizations will be lost, including those
                                made by the install/upgrade process.)
            -quit-            cancel script and quit
    Enter response [boot]:

    If you press Enter without specifying a backup to restore, the default response, enclosed in [] is selected. Selecting -quit- exits the restore_repository script, returning you to your shell prompt.

    Note - Selecting -seed- restores the seed repository. This repository is designed for use during initial installation and upgrades. Using the seed repository for recovery purposes should be a last resort.

    After the backup to restore has been selected, it is validated and its integrity is checked. If there are any problems, the restore_repository command prints error messages and prompts you for another selection. Once a valid backup is selected, the following information is printed, and you are prompted for final confirmation.

    After confirmation, the following steps will be taken:
    svc.startd(1M) and svc.configd(1M) will be quiesced, if running.
        -- renamed --> /etc/svc/repository.db_old_YYYYMMDD_HHMMSS
        -- copied --> /etc/svc/repository.db_old_YYYYMMDD_HHMMSS_errors
        -- copied --> /etc/svc/repository.db
    and the system will be rebooted with reboot(1M).
    Proceed [yes/no]?
  4. Type yes to remedy the fault.

    The system reboots after the restore_repository command executes all of the listed actions.

How to Boot Without Starting Any Services

If problems with starting services occur, sometimes a system will hang during the boot. This procedure shows how to troubleshoot this problem.

  1. Boot without starting any services.

    This command instructs the svc.startd daemon to temporarily disable all services and start sulogin on the console.

    ok boot -m milestone=none
  2. Log in to the system as root.
  3. Enable all services.
    # svcadm milestone all
  4. Determine where the boot process is hanging.

    When the boot process hangs, determine which services are not running by running svcs -a. Look for error messages in the log files in /var/svc/log.

  5. After fixing the problems, verify that all services have started.
    1. Verify that all needed services are online.
      # svcs -x
    2. Verify that the console-login service dependencies are satisfied.

      This command verifies that the login process on the console will run.

      # svcs -l system/console-login:default
  6. Continue the normal booting process.

How to Boot in Verbose Mode

By default, the level of messages that are displayed during a boot is set to the quiet mode, which generates messages when there is an error when a service starts. When troubleshooting a problem that occurs when a system boots, you may want to see more of the messages. This procedures shows you how to boot the system so that all of the error messages are displayed.

Example 2-22 Storing Boot Messages in a Log

Giving the boot command the -m debug option causes all per- service and service startup messages to be logged in the log files.

How to Force an sulogin Prompt If the system/filesystem/local:default Service Fails During Boot

Local file systems that are not required to boot the system are mounted by the svc:/system/filesystem/local:default service. When any of those file systems are unable to be mounted, the service enters a maintenance state. System startup continues, and any services which do not depend on filesystem/local are started. Services which require filesystem/local to be online before starting through dependencies are not started.

To change the configuration of the system so that a sulogin prompt appears immediately after the service fails instead of allowing system startup to continue, follow the procedure below.

  1. Modify the system/console-login service.
    # svccfg -s svc:/system/console-login
    svc:/system/console-login> addpg site,filesystem-local dependency
    svc:/system/console-login> setprop site,filesystem-local/entities = fmri: svc:/system/filesystem/local
    svc:/system/console-login> setprop site,filesystem-local/grouping = astring: require_all
    svc:/system/console-login> setprop site,filesystem-local/restart_on = astring: none
    svc:/system/console-login> setprop site,filesystem-local/type = astring: service
    svc:/system/console-login> end
  2. Refresh the service.
    # svcadm refresh console-login


When a failure occurs with the system/filesystem/local:default service, the svcs -vx command should be used to identify the failure. After the failure has been fixed, the following command clears the error state and allows the system boot to continue: svcadm clear filesystem/local.