My introduction to SMF | Service Management Facility on Solaris 10
This is my attempt to put down in writing on my initial stints with something crazy that I found on the cool operating system on the planet, Solaris 10.
Solaris-10 introduces new SMF (Service Management Facility) to manage the daemons or services on Unix providing an alternative to the old and traditional SVR4 rc/init scripts. There are several advantages included and the approach to managing the services with SMF has changed quiet a significant, that a service will auto start itself incase the service goes down, providing a self-healing mechanism and a better sleep to system administrators
SMF, by the way, kind of inspiration from the best of Windows services, has introduced the dependencies to the services on Unix. A service can be defined to beĀ dependent on another service, such that it would not start unless the other service is running, making sure the dependency map is satisfied.
Morever, another good point about SMF is that it decreases the overall boot time of a operating system by parallelizing the startup of the services. In the traditional startup SVR4 style init scripts where there are run sequentially, the SMF intelligently manages dependency map of the services and attempts to get the services online parallelly starting with the basic services like multiuser environment and filesystem. So, parallel startup improves the overall system boot time.
Unlike the system runlevels in SVR4/traditional Unix/Linux, SMF introduces milestones. Example milestones are single-user milestone, devices milestone, network milestone, multiuser milestone and there can be more milestones defined too. Interestingly, a milestone can be dependent milestone on another milestone. SMF is unique with more features like configuration repository, like you can revert to the old service state if any of the new changes to a service are not working, from the snapshots of service configuration repository.
SMF has extensive logging, so debugging a troublesome service is made easy with service specific logs generally stored under /var/svc/log directory.
This is just a start of my notes on the interesting technology of SMF, but I will add more as and when I get a chance to, in the coming series of articles and update the links here. Please bookmark!