Friday, August 07, 2009

What is SMF and how it works

What is SMF and how it works

Traditionally unix operating systems included set of services, program which listens and respond to request to perform some tasks. For example network,sshd, webserver etc.

Most of unix platforms support rc.d structure to start, stop and to manage it.
But Solaris 10 has implemented new unified feature called Service Management(SMF), still they support rc.d for compatibilty but I think in future they put all services under SMF.

So how SMF is different from traditional rc.d:
SMF is of self healing, it provides automatic recovery from software and hardware failures.
You can get more information about one service, like its dependencies, log locaton etc.
Provides information about misconfiguration so You can identify the reason of failure.

TO manage SMF you can use below commands:

svcs -a -- List of services installed on system
svcs -l -- To get more information
svcadm enable -- To start the service
svcadm disable -- To disable the service
svcs -x -- More information about failure

So when you give command svcs -a, you will realize some weird service names like this


This is called Fault Managed Resource identifier(FMRI), it used to identify system objects.

So if you want to stop or restart this service, you can use

svcadm disable svc:/system/cron:default
svcadm refresh svc:/system/cron:default