Home / Solaris 10 / SMF-Service Management facility:Service information

SMF-Service Management facility:Service information

As we all know that from Solaris 10 on-wards legacy method of starting and stopping service has been replaced by SMF (Service management facility) service management. Here we are not going in depth of SMF history and theory.Here we will see how to get the list of SMF service installed in server,how to see the dependencies and dependents services,Service tree map and complete information about the services.And also we will the reason for the service fault using svcs -xv command.

Service listing and Dependencies check

Important command of SMF service listing:
table.tableizer-table { border: 1px solid #CCC; font-family: ; font-size: 12px; } .tableizer-table td { padding: 4px; margin: 3px; border: 1px solid #ccc; } .tableizer-table th { background-color: #104E8B; color: #FFF; font-weight: bold; }

SMF Service Information
svcs -a Lists all installed services
svcs -d FMRI Lists all dependencies for FMRI
svcs -d FMRI Lists all dependents for FMRI
svcs -p FMRI Show the service dependencies tree map
svcs -l FMRI Provides a complete information about FMRI
svcs -x Show reason for the service fault
svcs -xv Verbose mode debugging information

1.How to list the configured services from SMF ? 
# svcs -a 
This output will give list of legacy services,online services,disabled services and offline services.

bash-3.00# svcs -a |head
legacy_run May_17 lrc:/etc/rcS_d/S50sk98sol
legacy_run May_17 lrc:/etc/rc2_d/S05vmware-tools
legacy_run May_17 lrc:/etc/rc2_d/S10lu
legacy_run May_17 lrc:/etc/rc2_d/S20sysetup
legacy_run May_17 lrc:/etc/rc2_d/S40llc2
legacy_run May_17 lrc:/etc/rc2_d/S42ncakmod
legacy_run May_17 lrc:/etc/rc2_d/S47pppd
legacy_run May_17 lrc:/etc/rc2_d/S70uucp
legacy_run May_17 lrc:/etc/rc2_d/S72autoinstall
bash-3.00# svcs -a |tail
online May_17 svc:/system/basicreg:default
online May_17 svc:/system/zones:default
online May_17 svc:/application/cde-printinfo:default
online May_17 svc:/application/graphical-login/cde-login:default
online May_17 svc:/system/vxdbd:default
online May_17 svc:/system/xprtld:default
online May_17 svc:/system/webconsole:console
online May_17 svc:/application/autoreg:default
offline May_17 svc:/application/print/ipp-listener:default
offline May_17 svc:/application/print/rfc1179:default
bash-3.00# svcs -a |wc -l

2.How to check specific service status ?

bash-3.00# svcs zones
online May_17 svc:/system/zones:default
bash-3.00# svcs vxdbd
online May_17 svc:/system/vxdbd:default
bash-3.00# svcs -a |grep zones
disabled May_17 svc:/system/tsol-zones:default
online May_17 svc:/system/zones:default

3.How to see complete service information and log file name ?

bash-3.00# svcs -l svc:/system/zones:default
fmri svc:/system/zones:default
name Zones autoboot and graceful shutdown
enabled true
state online
next_state none
state_time Fri May 17 20:08:30 2013
logfile /var/svc/log/system-zones:default.log
restarter svc:/system/svc/restarter:default
dependency require_all/none svc:/milestone/multi-user-server (online)

4.To see how many services depends on particular service ?(Ex:svc:/system/zones:default

bash-3.00# svcs -D svc:/system/zones:default

Here none of the system services are depends on zones services.

5.To see what are the services required to start particular service ? 

bash-3.00# svcs -d svc:/system/zones:default
online May_17 svc:/milestone/multi-user-server:default

i.e “Zones” service depends on “multi-user-server” service. 

6.How do you see service dependency map ?

bash-3.00# svcs -p svc:/application/graphical-login/cde-login:default
online May_17 svc:/application/graphical-login/cde-login:default
May_17 3429 dtlogin
May_17 3692 fbconsole
May_17 3733 Xorg
May_17 4070 dtlogin
May_17 4145 dtgreet

7.How to check SMF services status using one command ?
The below command will report if there is an issue with SMF services.

bash-3.00# svcs -xv
svc:/application/print/server:default (LP print server)
State: disabled since Fri May 17 20:07:30 2013
Reason: Disabled by an administrator.
See: http://sun.com/msg/SMF-8000-05
See: man -M /usr/share/man -s 1M lpsched
Impact: 2 dependent services are not running:

Thank you for reading this article.Please leave a comment if you have any doubt. I will get back to you.


Leave a Reply

Your email address will not be published. Required fields are marked *