Chapter 14. Managing Services (Overview)

Table of Contents

Introduction to SMF
Changes in Behavior When Using SMF
SMF Concepts
SMF Service
Service Identifiers
Service States
SMF Manifests
SMF Profiles
Service Configuration Repository
SMF Repository Backups
SMF Snapshots
SMF Administrative and Programming Interfaces
SMF Command-Line Administrative Utilities
Service Management Configuration Library Interfaces
SMF Components
SMF Master Restarter Daemon
SMF Delegated Restarters
SMF and Booting
SMF Compatibility
Run Levels
Determining a System's Run Level
/etc/inittab File
What Happens When the System Is Brought to Run Level 3
Run Control Scripts
Run Control Script Summaries

Introduction to SMF

SMF provides an infrastructure that augments the traditional UNIX start-up scripts, init run levels, and configuration files. SMF provides the following functions:

  • Automatically restarts failed services in dependency order, whether they failed as the result of administrator error, software bug, or were affected by an uncorrectable hardware error. The dependency order is defined by dependency statements.

  • Makes services objects that can be viewed, with the new svcs command, and managed, with svcadm and svccfg commands. You can also view the relationships between services and processes using svcs p, for both SMF services and legacy init.d scripts.

  • Makes it easy to backup, restore, and undo changes to services by taking automatic snapshots of service configurations.

  • Makes it easy to debug and ask questions about services by providing an explanation of why a service isn't running by using svcs x. Also, this process is eased by individual and persistent log files for each service.

  • Allows for services to be enabled and disabled using svcadm. These changes can persist through upgrades and reboots. If the t option is used, the changes are temporary.

  • Enhances the ability of administrators to securely delegate tasks to non-root users, including the ability to modify properties and enable, disable, or restart services on the system.

  • Boots faster on large systems by starting services in parallel according to the dependencies of the services. The opposite process occurs during shutdown.

  • Allows you to customize the boot console output to either be as quiet as possible, which is the default, or to be verbose by using boot m verbose.

  • Preserves compatibility with existing administrative practices wherever possible. For example, most customer and ISV-supplied rc scripts still work as usual.

Dependency statements define the relationships between services. These relationships can be used to provide precise fault containment by restarting only those services that are directly affected by a fault, rather than restarting all of the services. Another advantage of dependency statements is that the statements allow for scalable and reproducible initialization processes. In addition, by defining all of the dependencies, you can take advantage of modern, highly parallel machines, because all independent services can be started in parallel.

SMF defines a set of actions that can be invoked on a service by an administrator. These actions include enable, disable, refresh, restart, and maintain. Each service is managed by a service restarter which carries out the administrative actions. In general, the restarters carry out actions by executing methods for a service. Methods for each service are defined in the service configuration repository. These methods allow the restarter to move the service from one state to another state.

The service configuration repository provides a per-service snapshot at the time that each service is successfully started so that fallback is possible. In addition, the repository provides a consistent and persistent way to enable or disable a service, as well as a consistent view of service state. This capability helps you debug service configuration problems.