UsMan's WoRkSpAce

Monday, June 28, 2010

Solaris 10 new features: SMF

* Service Management facility stores service information in a configuration repository. Replaces rc scripts. SMF can restart failed services, define and apply service dependencies. Dependency works by not running a service until the service on which it depends on is also started. SMF can start services in parallel reducing boot time. Each system and application service under SMF control is an object which can be controlled by SMF commands. SMF has better debugging and logging features than rc scripts.

* Service state can be uninitialized, disabled, offline, online, degraded, maintenance, legacy_run.

* init process is still the first process that Solaris 10 kernel starts at boot

Terms and files:
* SMF master restarter daemon (svc.startd)
* SMF configuration daemon (svc.configd) manages access to SMF repository. Repository database resides in /etc/svc/repository.db.
* Service instance: Allows multiple instances of the same service, such as multiple web services running on separate ports but sharing a common configuration
* SMF manifest: XML file that contains a complete set of properties associated with a service or service instance. Manifest files are stored in /var/svc/manifest directory. Service configuration properties are imported from the manifest to SMF repository using svccfg import command.
* Service methods: Used by restarter to interact with the service. Typically reside in /lib/svc/method directory. Methods are often shell scripts similar to traditional rc scripts. There can be a start method, stop method and optionally a refresh method.
* Service log file: Stored in /var/svc/log directory.
* Fault Management Resource Identifier (FMRI): Used by SMF administrative commands to specify the service instance to be acted upon. Contains three parts separated by colons. svc:/network/login:rlogin
* Repository: Stores service configuration information in local memory and local files. Enables persistent view of service state, enables or disables service and provides a unified interface to get or set set properties.
* Delegated restarter, when svc.startd delegates its restart capability to another restarter such as inetd for a particular service or service instance
* Milestone is a special type of SMF service that merges several service dependencies. It declares a specific state of system readiness on which other services can depend. Boot command allows to boot the system directly to one of the milestone.

Commands:
svcs -a (lists all enabled and disabled services)
svcs -x (for troubleshooting a service)
svcadm (enables, disables, restarts and refresh a service, can clear a service from maintenance mode to enable it to restart)
svccfg (displays and manipulates SMF repository)
svcprop (retrieves property values from SMF repository)
inetadm (Allows observation and configuration of network services by inetd)
svcadm -t ssh (temporarily stop ssh service until the next reboot)

0 Comments:

Post a Comment

<< Home