service(8) to Solaris SMF command lookup

If as a Linux native you find yourself on a Solaris box, you'll noticed that from Solaris 10 SYS V rc-style scripts are no longer used to control daemon processes. Instead, the SMF system is used.

Below are some service(8) commands and their Solaris counterparts:

service httpd restart || svcadm restart httpd

service --status-all || svcs -a

service httpd --full-restart || svcadm disable -s httpd && svcadm enable -s httpd

A word about "service names" under Solaris SMF. They are not so much names, more patterns matching an identifying path-like string (or FRMI in the lingo). There may be more than one service that matches the pattern, httpd, in this case. "dns" is one such example, as it matches the services:

svc:/network/dns/client:default

svc:/network/dns/server:default

both. In this case, you have to increase the pattern until there is only one unique match: svcadm restart dns/server for example. For a fuller explanation, see: http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.jsp

Arrow