Toolserver:Admin:SMF
Appearance
This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.
The Service Management Facility (SMF) is used to manage services in Solaris. It replaces the old /etc/init.d
system.
- Introduction to SMF
- Solaris 10: System Administration Guide: Basic Administration: Managing Services (Overview)
- To list all running services:
% svcs STATE STIME FMRI legacy_run Jan_02 lrc:/etc/rcS_d/S50sk98sol legacy_run Jan_02 lrc:/etc/rc2_d/S10lu online Jan_02 svc:/system/svc/restarter:default online Jan_02 svc:/network/pfil:default online Jan_02 svc:/network/loopback:default ...
- Use
svcs -a
to list all services, including disabled ones.
- Disable a service:
% svcadm disable <service>
- Enable a service:
% svcadm enable <service>
. - Re-read a service's configuration:
% svcadm restart <service>
- If a service breaks for some reason, it will be placed in the
maintenance
state. To clear this and restart the service (after fixing the problem):svcadm clear <service>
. - List all information about a service:
% svcs -vx mysql-51 svc:/application/ts/mysql-51:default (MySQL) State: online since Sat Mar 06 07:02:07 2010 See: /var/svc/log/application-ts-mysql-51:default.log Impact: None.
- If the service fails, look at its logfile (from
svcs -vx
) for more information.