SMF - Service Management Facility

Display all services	svcs -a
Display specific service	svcs {service}
Start service	svcadm enable -t {service}
Stop service	svcadm disable -t {service}
Restart service	svcadm restart {service}
Refresh service	svcadm refresh {service}
Start in Maintenance status	svcadm clear {service}
Enable service	svcadm enable {service}
Disable service	svcadm disable {service}
List dependencies	svcs -d {service}
List dependents	svcs -D {service}
List all service information	svcs -l {service}
List service PIDs	svcs -p {service}
Display service state information	svcs -xv {service}
Service logfiles	/var/svc/log
/etc/svc/volatile
Enable non-SMF service	inetadm -e {service}
Disable non-SMF service	inetadm -d {service}

FMRI

(Fault Managed Resource Identifier) the following examples for the Solaris service syslogd are all equivalent:

svc://localhost/system/system-log:default

svc:/system/system-log:default

system/system-log:default

Likewise the SMF tools allow abbreviated forms of the FMRIs to be used. The abbreviation must be unique, must match the trailing part of the service name (although the “:default” can be left off), and it must begin after a “/”. So the following are acceptable abbreviations of the above FMRI:

system-log:default

system-log

Service States

uninitialized: This state is the initial state for all services before their configuration has been read or before their restarter has started.

disabled: The service instance is not enabled and is not running.

offline: The service instance is enabled, but cannot be started until its dependencies are met.

online: The service instance is enabled and has successfully started.

degraded: The service instance is enabled and running, but at less than full capacity.

maintenance: The service instance has encountered an error that must be resolved by the administrator.

legacy_run: This state is used only for legacy services. Legacy services cannot be controlled by SMF commands.

SMF Milestones and Run Levels

SMF Milestone	Run Level
milestone none	N/A
milestone single-user	S
milestone multi-user	2
milestone multi-user-server	3
milestone all	3